An effect source is constructed by providing configuration options.
Optional
options: BaseEffectSourceOptions = {}Options which modify the base effect source instance
A ratio of dim:bright as part of the source radius
Protected
_paddingPadding applied on the darkness source shape for visual appearance only. Note: for now, padding is increased radius. It might evolve in a future release.
Protected
_visualThe optional geometric shape is solely utilized for visual representation regarding darkness sources. Used only when an additional radius is added for visuals.
Static
_brightStatic
_dimStatic
_initializeStatic
_refreshStatic
defaultEffect source default data.
Static
EDGE_The offset in pixels applied to create soft edges.
Static
effectsStatic
sourceA convenience accessor to the darkness layer mesh.
Static
_layersStatic
ANIMATIONSUpdate shader uniforms used for the background layer.
Update shader uniforms used for the coloration layer.
Update shader uniforms used for the illumination layer.
An animation with flickering ratio and light intensity
Delta time
Optional
options: {Additional options which modify the flame animation
Optional
amplification?: numberNoise amplification (>1) or dampening (<1)
Optional
intensity?: numberThe animation intensity, from 1 to 10
Optional
reverse?: booleanReverse the animation direction
Optional
speed?: numberThe animation speed, from 0 to 10
A basic "pulse" animation which expands and contracts.
Delta time
Optional
options: { intensity?: number; reverse?: boolean; speed?: number } = {}Additional options which modify the pulse 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
A sound-reactive animation that uses bass/mid/treble blending to control certain shader uniforms. "speed" is interpreted as how quickly we adapt to changes in audio. No time-based pulsing is used by default, but we incorporate dt into smoothing so that behavior is consistent across varying frame rates.
The delta time since the last frame, in milliseconds.
Optional
options: { intensity?: number; reverse?: boolean; speed?: number } = {}Additional options for customizing the audio reaction.
Optional
intensity?: numberA blend factor in [0..10] that transitions from bass (near 0) to treble (near 10) Mid frequencies dominate around intensity=5.
Optional
reverse?: booleanWhether to invert the final amplitude as 1 - amplitude.
Optional
speed?: numberA smoothing factor in [0..10], effectively updates/second.
An animation with flickering ratio and light intensity.
Delta time
Optional
options: { intensity?: number; reverse?: boolean; speed?: number } = {}Additional options which modify the flame 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
Protected
_updateProtected
Update the uniforms of the shader on the darkness 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.
A specialized subclass of the BaseLightSource which renders a source of darkness as a point-based effect.
Mixes
PointEffectSource