Abstract
An effect source is constructed by providing configuration options.
Optional
options: BaseEffectSourceOptions = {}Options which modify the base effect source instance
The data of this source.
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.
Static
defaultEffect source default data.
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.
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?
The EffectsCanvasGroup collection linked to this effect source.
The elevation bound to this source.
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.
Abstract
_initializeSubclass specific data initialization steps.
Provided data for configuration
Add this BaseEffectSource instance to the active collection.
Steps that must be performed when the source is destroyed.
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
Subclass specific configuration steps. Occurs after data initialization and shape computation. Only called if the source is attached and not disabled.
Changes to the source data which were applied
Protected
Abstract
_createProtected
Create the polygon shape (or shapes) for this source using configured data.
Protected
_destroyProtected
Subclass specific destruction steps.
Protected
Abstract
_refreshProtected
Subclass-specific refresh steps.
TODO - Re-document after ESM refactor. An abstract base class which defines a framework for effect sources which originate radially from a specific point. This abstraction is used by the LightSource, VisionSource, SoundSource, and MovementSource subclasses.
Example: A standard PointSource lifecycle: