Преглед на файлове

Fix mismatch info (#88)

light should be added to `camera` not `scene`
Seemspyo преди 5 години
родител
ревизия
c17cb2587d
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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};