Whether to currently animate light sources.
Whether to currently animate vision sources.
A layer of background alteration effects which change the appearance of the primary group render texture.
A layer which adds color-based effects to the scene.
A layer which adds darkness effects to the scene.
A mapping of darkness sources which are active within the rendered Scene.
A layer which adds illumination-based effects to the scene.
A mapping of CanvasLayer classes which belong to this group.
A mapping of light sources which are active within the rendered Scene.
A Collection of vision sources which are currently active within the rendered Scene.
A set of vision mask filters used in visual effects group
Static
Abstract
groupThe name of this canvas group.
Static
tearIf this canvas group should teardown non-layers children.
The name used by hooks to construct their hook string. Note: You should override this getter if hookName should not return the class constructor name.
The canonical name of the canvas group is the name of the constructor that is the immediate child of the defined base class.
Activate light source animation for AmbientLight objects within this layer
Activate post-processing effects for a certain effects channel.
The filter mode to target.
Optional
postProcessingModes: string[] = []The post-processing modes to apply to this filter.
Optional
uniforms: Object = {}The uniforms to update.
Animate a smooth transition of the darkness overlay to a target value. Only begin animating if another animation is not already in progress.
The target darkness level between 0 and 1
The desired animation time in milliseconds. Default is 10 seconds
A Promise which resolves once the animation is complete
Clear all effects containers and animated sources.
Deactivate light source animation for AmbientLight objects within this layer
Draw the canvas group and all its components.
Optional
options: object = {}A Promise which resolves once the group is fully drawn
Get the darkness level at the given point.
The point.
The darkness level.
Initialize positive light sources which exist within the active Scene. Packages can use the "initializeLightSources" hook to programmatically add light sources.
Initialize all sources that generate edges (Darkness and certain Light sources).
Darkness sources always generate edges. Light sources only do so if their priority is strictly greater than 0.
The edgesSources
array will be rebuilt and sorted by descending priority, in the case of a tie,
DarknessSources take precedence. Otherwise, the existing array is used as-is.
Regardless of whether the array is rebuilt, each source is re-initialized to ensure their geometry is refreshed.
Refresh the active display of lighting.
Refresh the state and uniforms of all light sources and darkness sources objects.
Refresh the state and uniforms of all VisionSource objects.
Reset post-processing modes on all Visual Effects masking filters.
Remove and destroy all layers from the base canvas.
Optional
options: object = {}Test whether the point is inside darkness.
The point to test.
Optional
options: { condition?: (source: PointDarknessSource) => boolean } = {}Optional
condition?: (source: PointDarknessSource) => booleanOptional condition a source must satisfy in order to be tested.
Is inside darkness?
Test whether the point is inside light.
The point to test.
Optional
options: { condition?: (source: PointLightSource) => boolean } = {}Optional
condition?: (source: PointLightSource) => booleanOptional condition a source must satisfy in order to be tested.
Is inside light?
Activate vision masking for visual effects
Optional
enabled: boolean = trueWhether to enable or disable vision masking
A container group which contains visual effects rendered above the primary group.
TODO: The effects canvas group is now only performing shape initialization, logic that needs to happen at the placeable or object level is now their burden.
Hook Events