TagsA - Z



class ShadowLight extends Light


void : undefined

position : Vector3

direction : Vector3

shadowMinZ : number

shadowMaxZ : number

customProjectionMatrixBuilder : (viewMatrix: Matrix, renderList: Array<AbstractMesh>, result: Matrix) => void

transformedPosition : Vector3

transformedDirection : Vector3


computeTransformedInformation() boolean

Computes the light transformed position/direction in case the light is parented. Returns true if parented, else false.

getDepthScale() number

Return the depth scale used for the shadow map.

getShadowDirection(faceIndex) Vector3

Returns the light direction (Vector3) for any passed face index.


Name Type Description
optional faceIndex number

getAbsolutePosition() Vector3

Returns the DirectionalLight absolute position in the World.

setDirectionToTarget(target) Vector3

Sets the DirectionalLight direction toward the passed target (Vector3).

Returns the updated DirectionalLight direction (Vector3).


Name Type Description
target Vector3

getRotation() Vector3

Returns the light rotation (Vector3).

needCube() boolean

Boolean : false by default.

needProjectionMatrixCompute() boolean

Specifies wether or not the projection matrix should be recomputed this frame.

forceProjectionMatrixCompute() void

Forces the shadow generator to recompute the projection matrix even if position and direction did not changed.

setShadowProjectionMatrix(matrix, viewMatrix, renderList) IShadowLight

Sets the projection matrix according to the type of light and custom projection matrix definition.

Returns the light.


Name Type Description
matrix Matrix
viewMatrix Matrix
renderList Array<AbstractMesh>