From 234337232c89514985fcd0b14194cac0652782de Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Mon, 6 Nov 2017 20:30:36 +0100 Subject: [PATCH] release --- src/game-lib-d3-particle.js | 4 ++++ src/game-lib-system-particle.js | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/src/game-lib-d3-particle.js b/src/game-lib-d3-particle.js index e94657a..aef19d7 100644 --- a/src/game-lib-d3-particle.js +++ b/src/game-lib-d3-particle.js @@ -159,7 +159,11 @@ GameLib.D3.Particle.prototype.clone = function(camera) { var direction = lookAt.sub(position).negate(); + this.instance.visible = false; + var instance = this.instance.clone(); + instance.visible = true; + instance.lookAt(direction); instance.userData.direction = this.direction.instance; diff --git a/src/game-lib-system-particle.js b/src/game-lib-system-particle.js index 88b8aa8..6901e95 100644 --- a/src/game-lib-system-particle.js +++ b/src/game-lib-system-particle.js @@ -72,6 +72,11 @@ GameLib.System.Particle.prototype.instanceCreated = function(data) { this.particleEngines.push(data.component); } + if (data.component instanceof GameLib.D3.Camera) { + console.log('new camera'); + this.camera = data.component; + } + }; /**