diff --git a/src/components/directional-light.js b/src/components/directional-light.js index 7db6bc2cde1fc611a8e9ed92b89736d47c04b6f0..cd501d7107f4f579ab85f9ddb5274e8ddf8bc7f1 100644 --- a/src/components/directional-light.js +++ b/src/components/directional-light.js @@ -9,6 +9,7 @@ AFRAME.registerComponent("directional-light", { const el = this.el; this.light = new THREE.DirectionalLight(); this.light.target.position.set(0, 0, 1); + this.light.add(this.light.target); this.el.setObject3D("directional-light", this.light); this.el.sceneEl.systems.light.registerLight(el); }, diff --git a/src/components/hemisphere-light.js b/src/components/hemisphere-light.js index 43e2d730af5830b2b632312d0a96656fcd4ccdc0..ec26e4c16f032c23172efd4185698c4f3381fab5 100644 --- a/src/components/hemisphere-light.js +++ b/src/components/hemisphere-light.js @@ -14,7 +14,7 @@ AFRAME.registerComponent("hemisphere-light", { update(prevData) { if (this.data.skyColor !== prevData.skyColor) { - this.light.skyColor.set(this.data.skyColor); + this.light.color.set(this.data.skyColor); } if (this.data.groundColor !== prevData.groundColor) { diff --git a/src/components/spot-light.js b/src/components/spot-light.js index 930ff89b5e970381286f4d4932928479ebc50e14..bcfd65dae2f03679c019235cd1338986bf5dd2ed 100644 --- a/src/components/spot-light.js +++ b/src/components/spot-light.js @@ -12,6 +12,7 @@ AFRAME.registerComponent("spot-light", { const el = this.el; this.light = new THREE.SpotLight(); this.light.target.position.set(0, 0, 1); + this.light.add(this.light.target); this.light.decay = 2; this.el.setObject3D("spot-light", this.light); this.el.sceneEl.systems.light.registerLight(el);