The exploration container which tracks exploration progress.
A mapping of CanvasLayer classes which belong to this group.
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
The optional visibility overlay sprite that should be drawn instead of the unexplored color in the fog of war.
The currently revealed vision.
The active vision source data object
Static
groupStatic
tearIf this canvas group should teardown non-layers children.
Optional overrides for exploration sprite dimensions.
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.
A status flag for whether the group initialization workflow has succeeded.
The canonical name of the canvas group is the name of the constructor that is the immediate child of the defined base class.
Internal
Indicates whether containment filtering is required when rendering vision into a texture.
The configured options used for the saved fog-of-war texture.
Does the currently viewed Scene support Token field of vision?
Internal
Create the visibility test config.
The point in space to test
Optional
options: { object?: null | object; tolerance?: number } = {}Additional options which modify visibility testing.
Optional
object?: null | objectAn optional reference to the object whose visibility is being tested
Optional
tolerance?: numberA 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.
Draw the canvas group and all its components.
Optional
options: object = {}A Promise which resolves once the group is fully drawn
Initialize all Token vision sources which are present on this group.
Initialize the vision mode.
Update the display of the visibility group. 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
Remove and destroy all layers from the base canvas.
Optional
options: object = {}Test whether a target point on the Canvas is visible based on the current vision and LOS polygons.
The point in space to test
Optional
options: { object?: null | object; tolerance?: number } = {}Additional options which modify visibility testing.
Optional
object?: null | objectAn optional reference to the object whose visibility is being tested
Optional
tolerance?: numberA 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.
Whether the point is currently visible.
Protected
_createProtected
Create CanvasLayer instances which belong to the canvas group.
The visibility group which implements dynamic vision, lighting, and fog of war This group uses an event-driven workflow to perform the minimal required calculation in response to changes.
Hook Events