BBox
Axis-Aligned Bounding Box.
Properties
| Property | Type | Description |
|---|---|---|
x | number | Left boundary |
y | number | Top boundary |
right | number | Right boundary |
bottom | number | Bottom boundary |
width | number | Width |
height | number | Height |
left | number | Left boundary (alias for x) |
top | number | Top 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.