API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classBounds

@codexo/exojs / math / stable

Mutable axis-aligned bounding box accumulator. Starts as the empty bounds (`-Infinity..Infinity` reversed) and grows monotonically as points or rectangles are merged in via Bounds.addCoords and Bounds.addRect. Used during scene-graph traversal to accumulate a subtree's combined extent for culling and hit-testing. The Bounds.getRect accessor lazily folds the current min/max into a shared Rectangle - copy the result if you need to retain it across further accumulation.

4
props
5
methods
0
events
Import
import { Bounds } from '@codexo/exojs'

Mutable axis-aligned bounding box accumulator. Starts as the empty bounds (`-Infinity..Infinity` reversed) and grows monotonically as points or rectangles are merged in via Bounds.addCoords and Bounds.addRect. Used during scene-graph traversal to accumulate a subtree's combined extent for culling and hit-testing.

The Bounds.getRect accessor lazily folds the current min/max into a shared Rectangle - copy the result if you need to retain it across further accumulation.

Constructors1
new(): Bounds
Methods5
addCoords(x: number, y: number): this
Expand the bounds to include (x, y).
Expand the bounds to include rectangle. When transform is provided the rectangle's corners are transformed into the bounds' coordinate space first (via Rectangle.temp - does not mutate rectangle).
destroy(): void
Materialize the accumulated min/max as a Rectangle. Returns the same instance across calls - copy if you need to retain it past the next mutation.
reset(): this
Restore the empty-bounds state for reuse across frames.
Properties4
maxX: number
maxY: number
minX: number
minY: number
Source