SpotLight constructor
CameraRenderer or GPUCurtains used to create this SpotLight.
SpotLightBaseParams used to create this SpotLight.
Readonly
uuidThe universal unique id of this Light
CameraRenderer used by this Light
CameraRenderer corresponding BufferBinding that holds all the bindings to send to the shaders.
Empty object to store any additional data or custom properties into your Light.
function assigned to the onBeforeRender callback
Options used to create this SpotLight.
SpotShadow associated with this SpotLight.
Transformation object of the Object3D
Matrices object of the Object3D
Vec3 holding the actual position of this Object3D from its worldMatrix.
Children Object3D in the scene graph, used to compute their own worldMatrix.
Whether at least one of this Object3D matrix needs an update.
Get this SpotLight angle.
Set this SpotLight angle and update the CameraRenderer corresponding BufferBinding.
The new SpotLight angle in the [0, PI / 2]
range.
Get this SpotLight penumbra.
Set this SpotLight penumbra and update the CameraRenderer corresponding BufferBinding.
The new SpotLight penumbra in the [0, 1]
range.
Get this SpotLight range.
Set this SpotLight range and update the CameraRenderer corresponding BufferBinding.
The new SpotLight range.
Get our quaternion
Set our quaternion
new quaternion
Get our model matrix
Set our model matrix
new model matrix
Get our world matrix
Set our world matrix
new world matrix
Set or reset this Light CameraRenderer corresponding BufferBinding.
Update the CameraRenderer corresponding BufferBinding input value and tell the renderer camera, lights and shadows bind group to update.
name of the property to update.
new value of the property.
Called by the Scene before updating the matrix stack.
Callback to execute before updating the Scene matrix stack. This means it is called early and allows to update transformations values before actually setting the Light matrices. The callback won't be called if the renderer is not ready.
callback to run just before updating the Scene matrix stack.
Set or reset this SpotLight CameraRenderer.
New CameraRenderer or GPUCurtains instance to use.
Resend all properties to the CameraRenderer corresponding BufferBinding. Called when the maximum number of SpotLight has been overflowed or when updating the SpotLight renderer.
Set the SpotLight position and direction based on the target and the worldMatrix translation.
If the model matrix has been updated, set the new position and direction from the worldMatrix translation.
type of this light.
Destroy this SpotLight and associated SpotShadow.
Set our transforms properties and vectors onChange callbacks
Tell our model matrix to update
Set our model matrix and world matrix
Set our model matrix shouldUpdate flag to true (tell it to update)
Set our world matrix shouldUpdate flag to true (tell it to update)
Update our model matrix
Update our model matrix.
Whether to update the parent worldMatrix beforehand. Default to false
.
Whether to update the children worldMatrix afterward. Default to true
.
Create a spot light, that is emitted from a single point in one direction, along a cone that increases in size the further from the light it gets.
This light can cast SpotShadow.
Example