Phaser API Documentation

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

Description:

Sets all three points of the triangle. Leaving out any coordinate sets it to be 0.

Parameters:

name type arguments description
x1 number <optional>

x coordinate of the first point.

y1 number <optional>

y coordinate of the first point.

x2 number <optional>

x coordinate of the second point.

y2 number <optional>

y coordinate of the second point.

x3 number <optional>

x coordinate of the third point.

y3 number <optional>

y coordinate of the third point.

Returns:
Description:

This Triangle object.

Since: 3.0.0