Phaser API Documentation

  Version: 
contains(x, y)

Description:

Checks whether a given points lies within the triangle.

Parameters:

name type description
x number

The x coordinate of the point to check.

y number

The y coordinate of the point to check.

Returns:
Description:

true if the coordinate pair is within the triangle, otherwise false.

Type:
  • boolean
Since: 3.0.0