Phaser API Documentation

  Version: 
setTo([x1], [y1], [x2], [y2], [x3], [y3])

Description:

Sets the data for the lines that make up this Triangle shape.

Parameters:

name type arguments description
x1 number <optional>

The horizontal position of the first point in the triangle.

y1 number <optional>

The vertical position of the first point in the triangle.

x2 number <optional>

The horizontal position of the second point in the triangle.

y2 number <optional>

The vertical position of the second point in the triangle.

x3 number <optional>

The horizontal position of the third point in the triangle.

y3 number <optional>

The vertical position of the third point in the triangle.

Returns:
Description:

This Game Object instance.

Since: 3.13.0