An effect source is constructed by providing configuration options.
Optionaloptions: BaseEffectSourceOptions = {}Options which modify the base effect source instance
Internal_The vision mode activation flag for handlers
The animation configuration applied to this source
Records of blinding strings with a boolean value. By default, if any of this record is true, the source is blinded.
The color of the source as an RGB vector.
The data of this source.
Track the status of rendering layers
The polygon of light perception.
The unconstrained LOS polygon.
Some other object which is responsible for this source.
The geometric shape of the effect source which is generated later.
ReadonlysourceThe 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.
The vision mode linked to this VisionSource
Data overrides that could happen with blindness vision mode.
Protected_A collection of boolean flags which control rendering and refresh behavior for the source.
Protected_PIXI Geometry generated to draw meshes.
Static_Static_StaticdefaultEffect source default data.
Whether or not the source is disabled
The elevation of the point source
The ID of the Level the point source is in
The x-coordinate of the source location
The y-coordinate of the source location
StaticEDGE_The offset in pixels applied to create soft edges.
StaticeffectsStaticsourceThe type of source represented by this data structure. Each subclass must implement this attribute.
Protected Static_The corresponding lighting levels for bright light.
Protected Static_The corresponding lighting levels for dim light.
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.
An alias for the shape of the vision 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 source temporarily blinded?
Is this RenderedEffectSource a temporary preview?
Light perception radius of this vision source, taking into account if the source is blinded.
If this vision source background is rendered into the lighting container.
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.
Static_Create the polygon shape (or shapes) for this source using configured data.
Subclass specific data initialization steps.
Provided data for configuration
Update shader uniforms used for the background layer.
Update shader uniforms used for the coloration layer.
Update shader uniforms used by every rendered layer.
Update shader uniforms used for the illumination layer.
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.
Optionaloptions: { intensity?: number; reverse?: boolean; speed?: number } = {}Options which affect the time animation
Optionalintensity?: numberThe animation intensity, from 1 to 10
Optionalreverse?: booleanReverse the animation direction
Optionalspeed?: 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
Optionalreset?: 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_ProtectedCreates the polygon that represents light perception. If the light perception radius is unconstrained, no new polygon instance is created; instead the LOS polygon of this vision source is returned.
The new polygon or this.los.
Protected_ProtectedCreate a restricted FOV polygon by limiting the radius of the unrestricted LOS polygon. If the vision radius is unconstrained, no new polygon instance is created; instead the LOS polygon of this vision source is returned.
The new polygon or this.los.
Protected_ProtectedCreate 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_ProtectedDecide whether to render soft edges with a blur.
Protected Abstract_ProtectedCreate 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_ProtectedResponsible for assigning the Vision Mode and calling the activation and deactivation handlers.
Protected_ProtectedUpdate layer uniforms according to vision mode uniforms, if any.
The shader being updated.
The targeted layer.
StaticgetGet corrected color according to level, dim color, bright color and background color.
The lighting level (one of CONST.LIGHTING_LEVELS)
OptionalcolorBackground: ColorStaticgetGet corrected level according to level and active vision mode data.
The lighting level (one of CONST.LIGHTING_LEVELS)
The corrected level.
A specialized subclass of RenderedEffectSource which represents a source of point-based vision.