The current vision container which provides line-of-sight for vision sources and field-of-view of light sources.
The canonical line-of-sight polygon which defines current Token visibility.
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.
Matrix used for visibility rendering transformation.
Dimensions of the visibility overlay texture and base texture used for tiling texture into the visibility filter.
The SpriteMesh which holds a cached texture of lights field of vision. These elements are less likely to change during the course of a game.
Map of the point sources active and updateId states
The maximum allowable visibility texture size.
A status flag for whether the layer initialization workflow has succeeded.
Does the currently viewed Scene support Token field of vision?
The configured options used for the saved fog-of-war texture.
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.
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.
Customize behaviors of this CanvasLayer by modifying some behaviors at a class level.
Return a reference to the active instance of this canvas layer
Initialize all Token vision sources which are present on this layer
Update the display of the sight layer. Organize sources into rendering queues and draw lighting containers for each source
Update vision (and fog if necessary)
Reset the exploration container with the fog sprite
Restrict the visibility of certain canvas assets (like Tokens or DoorControls) based on the visibility polygon These assets should only be displayed if they are visible given the current player's field of view
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.
Additional options which modify visibility testing.
Whether the point is currently visible.
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.
Deconstruct data used in the current layer in preparation to re-draw the canvas
Identify whether there is one singular vision source active (excluding previews).
A singular source, or null
Configure the visibility of individual lighting channels based on the currently active vision source(s).
Update the lighting according to vision mode options.
Refresh the tint of the post processing filters.
Create the exploration container with its exploration sprite.
The newly created exploration container.
Create the vision container and all its children.
The created vision container.
Check if the lightsSprite render texture cache needs to be fully redrawn.
return true if the lights need to be redrawn.
Cache into the lightsSprite render texture elements contained into vision.fov.lights Note: A full cache redraw needs the texture to be cleared.
If the texture need to be cleared before rendering.
Load the scene fog overlay if provided and attach the fog overlay sprite to this layer.
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.
Give 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.
PointSource
{PIXI.Container} explored The exploration container which tracks exploration progress
{CanvasVisionContainer} vision The container of current vision exploration