Prechádzať zdrojové kódy

Fix mismatch info (#88)

light should be added to `camera` not `scene`
Seemspyo 5 rokov pred
rodič
commit
c17cb2587d

+ 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};