Phaser API Documentation

  Version: 
Only webGL setDropShadow([x], [y], [color], [alpha])

Description:

Sets a drop shadow effect on this Bitmap Text.

This is a WebGL only feature and only works with Static Bitmap Text, not Dynamic.

You can set the vertical and horizontal offset of the shadow, as well as the color and alpha.

Once a shadow has been enabled you can modify the dropShadowX and dropShadowY properties of this Bitmap Text directly to adjust the position of the shadow in real-time.

If you wish to clear the shadow, call this method with no parameters specified.

Parameters:

name type arguments Default description
x number <optional> 0

The horizontal offset of the drop shadow.

y number <optional> 0

The vertical offset of the drop shadow.

color number <optional> 0x000000

The color of the drop shadow, given as a hex value, i.e. 0x000000 for black.

alpha number <optional> 0.5

The alpha of the drop shadow, given as a float between 0 and 1. This is combined with the Bitmap Text alpha as well.

Returns:
Description:

This BitmapText Object.