Private
Optional
#cachePrivate
Optional
#gradientPrivate
Optional
#vismaskPrivate
Optional
#vismaskThe angle of the orientation of the lamp.
0
The color emitted by the lamp. The color can be specified in any CSS format.
"rgba(250,220,150,0.8)"
The intensity of the light penetration in objects.
0.8
Intensity of the light.
100
Whether the light is hidden or not.
false
The id of the light object.
0
Position of the light object.
new Vec2()
The size of the lamp. Bigger lamps cast smoother shadows.
0
The roughness of the oriented effect.
0
The number of points which will be used for shadow projection. It defines the quality of the rendering.
1
Static
Private
#uniqueInvoke a function for every sample generated by the lamp. The samples for lamps are generated using a "spiral" algorithm.
Function to be called for every sample. The function will be passed a vector representing the position of the sample.
Private
getRenders the lamp's gradient onto a cached canvas at the given position.
The position of the center of the gradient to render.
Protected
getProtected
getCreates a canvas context with the visible mask rendered onto it.
A canvas context with the visible mask rendered onto it.
Render a mask representing the visibility. (Used by DarkMask
)
The canvas context onto which the mask will be rendered.
A circular light rendered as a radial gradient. Lamps can also be "oriented" in a specific direction.