Phaser API Documentation

  Version: 
<static> Offset(triangle, x, y)

Description:

Moves each point (vertex) of a Triangle by a given offset, thus moving the entire Triangle by that offset.

Parameters:

name type description
triangle Phaser.Geom.Triangle

The Triangle to move.

x number

The horizontal offset (distance) by which to move each point. Can be positive or negative.

y number

The vertical offset (distance) by which to move each point. Can be positive or negative.

Returns:
Description:

The modified Triangle.

Since: 3.0.0