Show:

Matter.Bounds

The Matter.Bounds module contains methods for creating and manipulating axis-aligned bounding boxes (AABB).

Methods

Matter.Bounds.contains

(bounds, point)
Boolean

Returns true if the bounds contains the given point.

Parameters

Returns

Boolean

True if the bounds contain the point, otherwise false

Matter.Bounds.create

(vertices)
Bounds

Creates a new axis-aligned bounding box (AABB) for the given vertices.

Parameters

Returns

Bounds

A new bounds object

Matter.Bounds.overlaps

(boundsA, boundsB)
Boolean

Returns true if the two bounds intersect.

Parameters

Returns

Boolean

True if the bounds overlap, otherwise false

Matter.Bounds.shift

(bounds, position)

Shifts the bounds to the given position.

Parameters

Matter.Bounds.translate

(bounds, vector)

Translates the bounds by the given vector.

Parameters

Matter.Bounds.update

(bounds, vertices, velocity)

Updates bounds using the given vertices and extends the bounds given a velocity.

Parameters

0.13.0