Matter.Bounds

Defined in: src/geometry/Bounds.js:1

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

BooleanTrue if the bounds contain the point, otherwise false

@ src/geometry/Bounds.js:67

Matter.Bounds.create

(vertices)

Bounds

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

Parameters

Returns

BoundsA new bounds object

@ src/geometry/Bounds.js:13

Matter.Bounds.overlaps

(boundsA, boundsB)

Boolean

Returns true if the two bounds intersect.

Parameters

Returns

BooleanTrue if the bounds overlap, otherwise false

@ src/geometry/Bounds.js:79

Matter.Bounds.shift

(bounds, position)

Shifts the bounds to the given position.

Parameters

@ src/geometry/Bounds.js:104

Matter.Bounds.translate

(bounds, vector)

Translates the bounds by the given vector.

Parameters

@ src/geometry/Bounds.js:91

Matter.Bounds.update

(bounds, vertices, velocity)

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

Parameters

@ src/geometry/Bounds.js:31

Item Index

Methods