Phaser API Documentation

  Version: 
<static> BuildEquilateral(x, y, length)

Description:

Builds an equilateral triangle. In the equilateral triangle, all the sides are the same length (congruent) and all the angles are the same size (congruent). The x/y specifies the top-middle of the triangle (x1/y1) and length is the length of each side.

Parameters:

name type description
x number

x coordinate of the top point of the triangle.

y number

y coordinate of the top point of the triangle.

length number

Length of each side of the triangle.

Returns:
Description:

The Triangle object of the given size.

Since: 3.0.0