Phaser API Documentation

  Version: 
setBitmap(maskObject)

Description:

Sets a new Game Object or Dynamic Texture for this Bitmap Mask to use.

If a Game Object it must have a texture, such as a Sprite.

You can update the source of the mask as often as you like.

Parameters:

name type description
maskObject Phaser.GameObjects.GameObject | Phaser.Textures.DynamicTexture

The Game Object or Dynamic Texture that will be used as the mask. If a Game Object, it must have a texture, such as a Sprite.

Since: 3.0.0