瀏覽代碼

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