Browse Source

Fix mismatch info (#88)

light should be added to `camera` not `scene`
Seemspyo 5 years ago
parent
commit
c17cb2587d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      threejs/threejs-multiple-scenes-controls.html

+ 1 - 1
threejs/threejs-multiple-scenes-controls.html

@@ -82,7 +82,7 @@ function main() {
       const intensity = 1;
       const light = new THREE.DirectionalLight(color, intensity);
       light.position.set(-1, 2, 4);
-      scene.add(light);
+      camera.add(light);
     }
 
     return {scene, camera, controls};