An effect source is constructed by providing configuration options.
Optionaloptions: 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_refreshStaticdefaultEffect source default data.
StaticEDGE_The offset in pixels applied to create soft edges.
StaticeffectsStaticsourceA convenience accessor to the darkness layer mesh.
Static_layersStaticANIMATIONSUpdate 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
Optionaloptions: {Additional options which modify the flame animation
Optionalamplification?: numberNoise amplification (>1) or dampening (<1)
Optionalintensity?: numberThe animation intensity, from 1 to 10
Optionalreverse?: booleanReverse the animation direction
Optionalspeed?: numberThe animation speed, from 0 to 10
A basic "pulse" animation which expands and contracts.
Delta time
Optionaloptions: { intensity?: number; reverse?: boolean; speed?: number } = {}Additional options which modify the pulse animation
Optionalintensity?: numberThe animation intensity, from 1 to 10
Optionalreverse?: booleanReverse the animation direction
Optionalspeed?: 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.
Optionaloptions: { intensity?: number; reverse?: boolean; speed?: number } = {}Additional options for customizing the audio reaction.
Optionalintensity?: numberA blend factor in [0..10] that transitions from bass (near 0) to treble (near 10) Mid frequencies dominate around intensity=5.
Optionalreverse?: booleanWhether to invert the final amplitude as 1 - amplitude.
Optionalspeed?: numberA smoothing factor in [0..10], effectively updates/second.
An animation with flickering ratio and light intensity.
Delta time
Optionaloptions: { intensity?: number; reverse?: boolean; speed?: number } = {}Additional options which modify the flame animation
Optionalintensity?: numberThe animation intensity, from 1 to 10
Optionalreverse?: booleanReverse the animation direction
Optionalspeed?: numberThe animation speed, from 0 to 10
Protected_updateProtectedUpdate the uniforms of the shader on the darkness 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 the BaseLightSource which renders a source of darkness as a point-based effect.
Mixes
PointEffectSource