The currently revealed vision.
The exploration container which tracks exploration progress.
The optional visibility overlay sprite that should be drawn instead of the unexplored color in the fog of war.
The active vision source data object
Define whether each lighting layer is enabled, required, or disabled by this vision mode. The value for each lighting channel is a number in LIGHTING_VISIBILITY
Options for this layer instance.
Private
#cachedThe graphics used to render cached light sources.
Private
#renderMatrix used for visibility rendering transformation.
Private
#visibilityDimensions of the visibility overlay texture and base texture used for tiling texture into the visibility filter.
Private
#cachedThe map with the active cached light source IDs as keys and their update IDs as values.
Private
#texturePrivate
#explorationPrivate
#drawingAn internal reference to a Promise in-progress to draw the CanvasLayer.
Private
#drawnIs the layer drawn?
Static
Private
#MAXIMUM_The maximum allowable visibility texture size.
A status flag for whether the layer initialization workflow has succeeded.
Internal
Indicates whether containment filtering is required when rendering vision into a texture.
Does the currently viewed Scene support Token field of vision?
The configured options used for the saved fog-of-war texture.
Optional overrides for exploration sprite dimensions.
The canonical name of the CanvasLayer is the name of the constructor that is the immediate child of the defined baseClass for the layer type.
canvas.lighting.name -> "LightingLayer"
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.
Static
layerCustomize behaviors of this CanvasLayer by modifying some behaviors at a class level.
Static
instanceReturn a reference to the active instance of this canvas layer
Test whether a target point on the Canvas is visible based on the current vision and LOS polygons.
The point in space to test, an object with coordinates x and y.
Optional
options: { Additional options which modify visibility testing.
A numeric radial offset which allows for a non-exact match. For example, if tolerance is 2 then the test will pass if the point is within 2px of a vision polygon.
An optional reference to the object whose visibility is being tested
Whether the point is currently visible.
Internal
Create the visibility test config.
The point in space to test, an object with coordinates x and y.
Optional
options: { Additional options which modify visibility testing.
A numeric radial offset which allows for a non-exact match. For example, if tolerance is 2 then the test will pass if the point is within 2px of a vision polygon.
An optional reference to the object whose visibility is being tested
Draw the canvas layer, rendering its internal components and returning a Promise. The Promise resolves to the drawn layer once its contents are successfully rendered.
Optional
options: object = {}Options which configure how the layer is drawn
Deconstruct data used in the current layer in preparation to re-draw the canvas
Optional
options: object = {}Options which configure how the layer is deconstructed
Private
#getPrivate
#configurePrivate
#updatePrivate
#updatePrivate
#createPrivate
#createPrivate
#refreshPrivate
#shouldPrivate
#checkPrivate
#cachePrivate
#drawPrivate
#configurePrivate
Configure the fog texture will all required options. Choose an adaptive fog rendering resolution which downscales the saved fog textures for larger dimension Scenes. It is important that the width and height of the fog texture is evenly divisible by the downscaling resolution.
Static
Private
#requireGive the visibility requirement of the lighting background shader.
The single Vision Mode active at the moment (if any).
The visibility Layer which implements dynamic vision, lighting, and fog of war This layer uses an event-driven workflow to perform the minimal required calculation in response to changes.
See
PointSource
Hook Events