Phaser API Documentation

  Version: 

Member of: Phaser.Geom.Polygon

<static> Translate(polygon, x, y)

Description:

Tranlates the points of the given Polygon.

Parameters:

name type description
polygon Phaser.Geom.Polygon

The Polygon to modify.

x number

The amount to horizontally translate the points by.

y number

The amount to vertically translate the points by.

Returns:
Description:

The modified Polygon.

Since: 3.50.0