I just start to create a game use three.js by copy and modify the example code,
One thing really confuse me is the shadow of lights.
First , the shadow edge is not sharp, it has some jags / sawtooth . see code snaps here : http://jsfiddle.net/f17Lz5ux/5131/
The mentioned values just define the frustum of the shadow camera which is used for calculating the shadow map of a light source. To achieve good shadow quality, the frustums should be as small/tight as possible.
You should be aware that right, left, top and bottom are only values of an orthographic shadow camera. SpotLight has a perspective shadow camera so these values are ignored.
Thanks for your reply.
I have a problem with directional light shadow, when at scene initialize, the player is stand on (0,0,0) which is in the light shadow camera’s frustums, but when the player move some way , it goes out of the frustums, so I need to change light shadow camera when I change the player’s position ? or set the frustums as large as possible ?