浏览代码

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.