소스 검색

put camera on light

Gregg Tavares 6 년 전
부모
커밋
12e303530d
1개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  1. 7 0
      threejs/lessons/threejs-picking.md

+ 7 - 0
threejs/lessons/threejs-picking.md

@@ -42,6 +42,13 @@ and in the `render` function we'll spin the camera pole.
 cameraPole.rotation.y = time * .1;
 ```
 
+Also let's put the light on the camera so the light moves with it.
+
+```
+-scene.add(light);
++camera.add(light);
+```
+
 Let's generate 100 cubes with random colors in random positions, orientations,
 and scales.