The object type for a Light Source. This is a Scene in the case of a global light source This is an AmbientLight placeable object when the source is provided by an AmbientLightDocument This is a Token placeable object when the source is provided by a TokenDocument
The light or darkness container for this source
The light or darkness container for this source
This visible color container for this source
The computed polygon which expresses the area of effect of this light source
The object of data which configures how the source is rendered
Internal flag for whether this is a darkness source
To know if a light source is a preview or not. False by default.
The ratio of dim:bright as part of the source radius
The animation configuration applied to this source
The maximum radius of emission for this source
A flag for whether this source is currently rendered or not.
A Graphics object with pre-computed geometry used for masking based on line-of-sight.
Additional information which controls whether certain behaviors of the source must be enforced
To track meshes initialization
Track which uniforms need to be reset
To track if a source is temporarily shutdown to avoid glitches
Record the current visibility state of this LightSource and its respective channels.
The type of source represented by this data structure. Each subclass must implement this attribute.
The offset in pixels applied to create soft edges.
Keys in the LightSourceData structure which, when modified, change the appearance of the light
To know if a light source is completely disabled.
The x-coordinate of the point source origin.
The y-coordinate of the point source origin.
The type of source represented by this data structure.
The elevation of the object bound to this base source, if any. Returns the canvas primary background elevation otherwise.
Initialize the source with provided object data.
Initial data provided to the point source.
A reference to the initialized source.
Create all meshes needed with this PointSource
Steps that must be performed when the base source is destroyed.
Update the visible state of the component channels of this LightSource.
Is any channel of this light source active?
Render the containers used to represent this light source within the LightingLayer
Create a Mesh for the background component of this source which will be added to CanvasBackgroundEffects.
The background mesh for this LightSource, or null
Create a Mesh for the illumination component of this source which will be added to CanvasIlluminationEffects.
The illumination mesh for this LightSource, or null
Create a Mesh for the coloration component of this source which will be added to CanvasColorationEffects.
The coloration mesh for this LightSource, or null
An animation with flickering ratio and light intensity
Delta time
Additional options which modify the flame animation
An animation with flickering ratio and light intensity
Delta time
Additional options which modify the flame animation
A basic "pulse" animation which expands and contracts.
Delta time
Additional options which modify the pulse animation
Emanate waves of light from the source origin point
Delta time
Additional options which modify the animation
Test whether this LightSource provides visibility to see a certain target object.
The visibility test configuration
The sequence of tests to perform
The target object being tested
Is the target object visible to this source?
Can this LightSource theoretically detect a certain object based on its properties? This check should not consider the relative positions of either object, only their state.
The target object being tested
Can the target object theoretically be detected by this vision source?
A point is contained with the area of the source if it is within both the FOV circle and the LOS polygon.
The point to test
Is the point contained
Animate the BaseSource, if an animation is enabled and if it currently has rendered containers.
Delta time.
Initialize the PointSource with new input data
Initial data provided to the light source
The changes compared to the prior data
Record internal status flags which modify how the light source is rendered
Update all layer uniforms.
Create or update the source geometry with a polygon shape Triangulate the form and create buffers
The pixi polygon
Create the LOS polygon for this Light Source instance using provided parameters.
Create or update the source geometry and create meshes if necessary
A pixi polygon
Create a new Mesh for this source using a provided shader class
The subclass of AdaptiveLightingShader being used for this Mesh
The created Mesh
Update the position and size of the mesh each time it is drawn.
The Mesh being updated
The updated Mesh
Initialize the shaders used for this source, swapping to a different shader if the animation has changed.
Initialize the blend mode and vertical sorting of this source relative to others in the container.
Test whether this light source is currently suppressed?
Update shader uniforms by providing data from this PointSource
Update shader uniforms by providing data from this PointSource
Update shader uniforms by providing data from this PointSource
Update shader uniforms shared by all shader types
The shader being updated
Map luminosity value to exposure value luminosity[-1 , 0 [ => Darkness => map to exposure ] 0, 1] luminosity[ 0 , 0.5[ => Light => map to exposure [-0.5, 0[ luminosity[ 0.5, 1 ] => Light => map to exposure [ 0, 1]
The luminosity value
The exposure value
A specialized subclass of the PointSource abstraction which is used to control the rendering of light sources.
The light-emitting object that generates this light source