Phaser API Documentation

  Version: 
preRenderCanvas(renderer, mask, camera)

Description:

Sets the clipping path of a 2D canvas context to the Geometry Mask's underlying Graphics object.

Parameters:

name type description
renderer Phaser.Renderer.Canvas.CanvasRenderer

The Canvas Renderer instance to set the clipping path on.

mask Phaser.GameObjects.GameObject

The Game Object being rendered.

camera Phaser.Cameras.Scene2D.Camera

The camera the Game Object is being rendered through.

Examples:
Since: 3.0.0