Phaser API Documentation

  Version: 
beginMask(mask, maskedObject, camera)

Description:

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

Parameters:

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.

Examples: