Abstract
An effect source is constructed by providing configuration options.
Optional
options: BaseEffectSourceOptions = {}Options which modify the base effect source instance
The animation configuration applied to this source
The color of the source as an RGB vector.
The data of this source.
Track the status of rendering layers
Some other object which is responsible for this source.
The geometric shape of the effect source which is generated later.
The source id linked to this effect source.
Records of suppression strings with a boolean value. If any of this record is true, the source is suppressed.
Protected
_flagsA collection of boolean flags which control rendering and refresh behavior for the source.
Protected
_geometryPIXI Geometry generated to draw meshes.
Static
defaultEffect source default data.
Whether or not the source is disabled
The elevation of the point source
The x-coordinate of the source location
The y-coordinate of the source location
Static
EDGE_The offset in pixels applied to create soft edges.
Static
Abstract
effectsThe target collection into the effects canvas group.
Static
sourceThe type of source represented by this data structure. Each subclass must implement this attribute.
Protected
Static
_initializeKeys of the data object which require shaders to be re-initialized.
Protected
Static
_refreshKeys of the data object which require uniforms to be refreshed.
Is this source currently active? A source is active if it is attached to an effect collection and is not disabled or suppressed.
Is this source attached to an effect collection?
A convenience accessor to the background layer mesh.
A convenience accessor to the coloration layer mesh.
The EffectsCanvasGroup collection linked to this effect source.
The elevation bound to this source.
Has the rendered source at least one active layer?
A convenience accessor to the illumination layer mesh.
Is the rendered source animated?
Is this RenderedEffectSource a temporary preview?
Is this source temporarily suppressed?
Returns the update ID associated with this source. The update ID is increased whenever the shape of the source changes.
The x-coordinate of the point source origin.
The y-coordinate of the point source origin.
Protected
Static
_layersSubclass specific data initialization steps.
Provided data for configuration
Add this BaseEffectSource instance to the active collection.
Animate the PointSource, if an animation is enabled and if it currently has rendered containers.
Delta time.
Generic time-based animation used for Rendered Point Sources.
Delta time.
Optional
options: { intensity?: number; reverse?: boolean; speed?: number } = {}Options which affect the time animation
Optional
intensity?: numberThe animation intensity, from 1 to 10
Optional
reverse?: booleanReverse the animation direction
Optional
speed?: numberThe animation speed, from 0 to 10
Steps that must be performed when the source is destroyed.
Render the containers used to represent this light source within the LightingLayer
Initialize and configure the source using provided data.
Provided data for configuration
Additional options which modify source initialization
Optional
reset?: booleanShould source data be reset to default values before applying changes?
The initialized source
Refresh the state and uniforms of the source. Only active sources are refreshed.
Remove this BaseEffectSource instance from the active collection.
Test whether the point is contained within the shape of the source.
The point.
Is inside the source?
Protected
_configureProtected
Specific configuration for a layer.
Protected
_configureProtected
Configure which shaders are used for each rendered layer.
An object whose keys are layer identifiers and whose values are shader classes.
Protected
Abstract
_createProtected
Create the polygon shape (or shapes) for this source using configured data.
Protected
_drawProtected
Create a Mesh for a certain rendered layer of this source.
The layer key in layers to draw
The drawn mesh for this layer, or null if no mesh is required
Protected
_initializeProtected
Decide whether to render soft edges with a blur.
Protected
_updateProtected
Update shader uniforms used for the background layer.
Protected
_updateProtected
Update shader uniforms used for the coloration layer.
Protected
_updateProtected
Update shader uniforms used by every rendered layer.
Protected
Abstract
_updateProtected
Create the geometry for the source shape that is used in shaders and compute its bounds for culling purpose. Triangulate the form and create buffers.
Protected
_updateProtected
Update shader uniforms used for the illumination layer.
Static
getGet corrected color according to level, dim color, bright color and background color.
The lighting level (one of CONST.LIGHTING_LEVELS)
Optional
colorBackground: ColorStatic
getGet corrected level according to level and active vision mode data.
The lighting level (one of CONST.LIGHTING_LEVELS)
The corrected level.
An abstract class which extends the base PointSource to provide common functionality for rendering. This class is extended by both the LightSource and VisionSource subclasses.