Skip to main content

BBox

Axis-Aligned Bounding Box.

Properties

PropertyTypeDescription
xnumberLeft boundary
ynumberTop boundary
rightnumberRight boundary
bottomnumberBottom boundary
widthnumberWidth
heightnumberHeight
leftnumberLeft boundary (alias for x)
topnumberTop boundary (alias for y)

Methods

contains

contains(point: Vector2): boolean

Checks if a point is inside the bounding box.

intersects

intersects(other: BBox): boolean

Checks if it intersects with another bounding box.