Reputation: 89
See http://www.xpos.nl/clock/ for problem at hand.
The page also has links to video's of an animation and real clock of what I'm trying to achive with three.js.
It's a clock with 2 leds rotating around a pin in the center. The shadows make the hands of the clock.
I'm a complete novice when it comes to three.js/webgl, but with some help of 'experts' on three.js I/we got this far: http://www.xpos.nl/clock/ (the clock ticks with one minute per second to speed up the animation)
The one thing is missing: the hands of the clock. The center pin does not show the shadows the spotlights should cast.
Why does the center pin does not have any shadows?
Upvotes: 1
Views: 418
Reputation: 104823
To cast shadows in three.js, you must add:
renderer.shadowMap.enabled = true;
light.castShadow = true;
three.js r.73
Upvotes: 1