Import
SunLightShadow is an addon, and must be imported explicitly, see Installation#Addons.
import { SunLightShadow } from 'three/addons/lights/SunLightShadow.js';
Properties
.isSunLightShadow : boolean (readonly)
This flag can be used for type testing.
Default is true.
Methods
.getCamera( cascadeIndex : number ) : OrthographicCamera
Returns the shadow camera of the given cascade.
| cascadeIndex |
The cascade index. Default is |
- Overrides: LightShadow#getCamera
- Returns: The shadow camera.
.getFrustum( cascadeIndex : number ) : Frustum
Returns the shadow camera frustum of the given cascade. Used internally by the renderer to cull objects.
| cascadeIndex |
The cascade index. Default is |
- Overrides: LightShadow#getFrustum
- Returns: The shadow camera frustum.
.getMatrix( cascadeIndex : number ) : Matrix4
Returns the shadow matrix of the given cascade.
| cascadeIndex |
The cascade index. Default is |
- Returns: The shadow matrix.
.updateMatrices( light : Light, viewCamera : Camera )
Update the matrices for the cascade cameras and shadows, used internally by the renderer.
| light |
The light for which the shadow is being rendered. |
| viewCamera |
The camera the scene is rendered with. |
- Overrides: LightShadow#updateMatrices