Defines the lighting of one light through a set of opaque objects.
Options to be applied to the light.
Private
Optional
The source of the lighting.
new Light() Copy
new Light()
An array of OpaqueObject objects which stop the light and create shadows.
OpaqueObject
[] Copy
[]
Draw the shadows that are cast by the objects. You usually don't have to use it if you use render().
The canvas context onto which the shadows will be drawn.
Compute the shadows to cast.
Width of the canvas context.
Height of the canvas context.
Create caches for canvas contexts.
Width of the contexts.
Height of the contexts.
Returns the light and shadows onto the given context as canvas.
The picture of the light and shadow.
Draws the light and shadows onto the given context.
The canvas context on which to draw.
Defines the lighting of one light through a set of opaque objects.