Class: ShadowCaster

ShadowCaster(shadowCaster, shadowReceiver) → {ShadowCaster}

Renders a colored image representing the shadowCaster on the reciever

Found in Chapter 8, page 501 of the textbook

Example: 8.7 Shadow Shaders

Constructor

new ShadowCaster(shadowCaster, shadowReceiver) → {ShadowCaster}

Parameters:
Name Type Description
shadowCaster GameObject the object casting the shadow, must contain at least a LightRenderable
shadowReceiver GameObject the object receiving the shadow, must contain at least a SpriteRenderable
Source:
Returns:
a new ShadowCaster instance
Type
ShadowCaster

Methods

draw(aCamera)

Draw this ShadowCaster to the Camera. Interacts with any overlapping Light
Parameters:
Name Type Description
aCamera Camera the Camera to draw to
Source:

setShadowColor(c)

Set the color of the shadow
Parameters:
Name Type Description
c vec4 [R,G,B,A] color array
Source: