Weird results when shading


after some trial and error I managed to see shadows. Although I check that cameras are identical for drawing and shadows, the shadow is incomplete and wrong. I seems that the width of the shadow is too small. The cube is part of a group and setting castShadow for alle of them, using perspective camera, directional light and LambertMaterial.
The cube itstelf does not receive shadows at all, only the ground plane.
Any ideas?
Many thanks

You probably have to configure the view frustum of the shadow camera correctly. There is a helper class called CameraHelper that can be useful when doing this:

scene.add( new THREE.CameraHelper( ) );

Depending on the type of light, the shadow camera is represented by a perspective or orthographic camera. For directional lights (which have an orthographic view frustum) code could look like so: = 2000; = - 2000; = - 2000; = 2000; = 1; = 2000;