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 fog 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.
Dimensions of the fog overlay texture and base texture used for tiling texture into the visibility filter.
A status flag for whether the layer initialization workflow has succeeded.
Does the currently viewed Scene support Token field of vision?
The canonical name of the CanvasLayer
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
Options which affect how visibility is refreshed
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).
The current sources
A singular source, or null
Call activation and deactivation handlers for the vision modes whose state has changed.
The new collection of active sources
The set of previously active sources
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.
Load the scene fog overlay if provided and attach the fog overlay sprite to this layer.
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.Graphics} unexplored The unexplored background which spans the entire canvas
{PIXI.Container} explored The exploration container which tracks exploration progress
{PIXI.Container} revealed A container of regions which have previously been revealed
{PIXI.Sprite} saved The saved fog exploration texture
{PIXI.Container} pending Pending exploration which has not yet been committed to the texture
{CanvasVisionContainer} vision The container of current vision exploration