illuminated.DarkMask Class
Defines the dark layer which hides the dark area not illuminated by a set of lights.
Constructor
illuminated.DarkMask
(
-
[options]
Parameters:
-
[options]
Object optionalOptions to be applied to this light.
-
[lights]
Array optionalAn array of illuminated.Light objects that illuminate the rest of the scene.
-
[color]
String optionalThe color of the dark area in RGBA format.
-
Methods
compute
(
-
w
-
h
Compute the dark mask.
Parameters:
-
w
NumberWidth of the canvas context.
-
h
NumberHeight of the canvas context.
render
(
-
ctx
Draws the dark mask onto the given context.
Parameters:
-
ctx
CanvasRenderingContext2DThe canvas context on which to draw.
Properties
color
String
The color of the dark area in RGBA format.
Default: 'rgba(0,0,0,0.9)'
lights
Array
An array of illuminated.Light objects that illuminate the rest of the scene.
Default: []