light should be added to `camera` not `scene`
@@ -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};