Phaser API Documentation

beginMask(mask, maskedObject, camera)


Binds necessary resources and renders the mask to a separated framebuffer. The framebuffer for the masked object is also bound for further use.


name type description
mask Phaser.GameObjects.GameObject

GameObject used as mask.

maskedObject Phaser.GameObjects.GameObject

GameObject masked by the mask GameObject.

camera Phaser.Cameras.Scene2D.Camera

The camera rendering the current mask.