Last active: 2 years ago
gistpad-scratch
const target = new THREE.Object3D();
target.position.set(0, 10, 0);
const light = new THREE.SpotLight();
light.position.set(0, 70, 70);
light.angle = 0.4;
light.castShadow = true;
light.penumbra = 0.3;
light.target.add(target);
three.scene.add(light);
three.scene.add(light.target);
target.add(light);
three.scene.add(target);
const render = (time: DOMHighResTimeStamp) => {
three.controls.update();
target.rotation.y = time;
stats.update();
};