Sfoglia il codice sorgente

put camera on light

Gregg Tavares 6 anni fa
parent
commit
12e303530d
1 ha cambiato i file con 7 aggiunte e 0 eliminazioni
  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.