BitmapData#shadow()

shadow(color, blur, x, y) → {Phaser.BitmapData}

Sets the shadow properties of this BitmapDatas context which will affect all draw operations made to it.
You can cancel an existing shadow by calling this method and passing no parameters.
Note: At the time of writing (October 2014) Chrome still doesn't support shadowBlur used with drawImage.

Parameters
Name Type Argument Default Description
color string

The color of the shadow, given in a CSS format, i.e. #000000 or rgba(0,0,0,1). If null or undefined the shadow will be reset.

blur number <optional>
5

The amount the shadow will be blurred by. Low values = a crisp shadow, high values = a softer shadow.

x number <optional>
10

The horizontal offset of the shadow in pixels.

y number <optional>
10

The vertical offset of the shadow in pixels.

Returns

This BitmapData object for method chaining.

Source code: gameobjects/BitmapData.js (Line 1706)
doc_phaser
2017-02-14 10:37:15
Comments
Leave a Comment

Please login to continue.