Explorar el Código

Fix mismatch info (#88)

light should be added to `camera` not `scene`
Seemspyo hace 5 años
padre
commit
c17cb2587d
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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};