the current renderer instance
Optionaloptions: {effect options
Optionalcolor?: number[]shadow color as [r, g, b] (0.0–1.0)
OptionaloffsetX?: numbershadow x offset in texels
OptionaloffsetY?: numbershadow y offset in texels
Optionalopacity?: numbershadow opacity (0.0–1.0)
OptionaltextureSize?: number[]texture dimensions [width, height]
destroy this shader effect
set the shadow offset
x offset in texels
y offset in texels
set the texture size
texture width in pixels
texture height in pixels
Set the uniform to the given value
the uniform name
the value to assign to that uniform
A shader effect that adds a drop shadow beneath the sprite. Works by sampling the texture at an offset — if the offset position has an opaque pixel but the current position doesn't, the shadow is drawn.
See
Renderable.shader for usage
Example