Phaser API Documentation

  Version: 
<static> ContainsPoint(rect, point)

Description:

Determines whether the specified point is contained within the rectangular region defined by this Rectangle object.

Parameters:

name type description
rect Phaser.Geom.Rectangle

The Rectangle object.

point Phaser.Geom.Point

The point object to be checked. Can be a Phaser Point object or any object with x and y values.

Returns:
Description:

A value of true if the Rectangle object contains the specified point, otherwise false.

Type:
  • boolean
Since: 3.0.0