Skip to content
Snippets Groups Projects
Commit c8248473 authored by Robert Long's avatar Robert Long
Browse files

Set default position for directional and hemisphere lights.

parent e88021f6
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,7 @@ AFRAME.registerComponent("directional-light", {
init() {
const el = this.el;
this.light = new THREE.DirectionalLight();
this.light.position.set(0, 0, 0);
this.light.target.position.set(0, 0, 1);
this.light.add(this.light.target);
this.el.setObject3D("directional-light", this.light);
......
......@@ -8,6 +8,7 @@ AFRAME.registerComponent("hemisphere-light", {
init() {
const el = this.el;
this.light = new THREE.HemisphereLight();
this.light.position.set(0, 0, 0);
this.el.setObject3D("hemisphere-light", this.light);
this.el.sceneEl.systems.light.registerLight(el);
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment