Create an AABB at position (x, y) with the given width and height. All values default to 0.
The x position of the left edge (default 0).
The y position of the top edge (default 0).
The width of the box (default 0). Must be ≥ 0.
The height of the box (default 0). Must be ≥ 0.
Height of the box (maxy − miny). Must be ≥ 0.
Height of the box (maxy − miny). Must be ≥ 0.
The bottom-right corner as a Vec2 (maxx, maxy). The returned Vec2 is a live view; mutating it updates the AABB.
Set the bottom-right corner. The new max must not be below the current min.
A Vec2 whose components become the new (maxx, maxy).
The top-left corner as a Vec2 (minx, miny). The returned Vec2 is a live view; mutating it updates the AABB.
Set the top-left corner. The new min must not exceed the current max.
A Vec2 whose components become the new (minx, miny).
Width of the box (maxx − minx). Must be ≥ 0.
Width of the box (maxx − minx). Must be ≥ 0.
The x position of the left edge (minx). Setting shifts the box horizontally.
The x position of the left edge (minx). Setting shifts the box horizontally.
The y position of the top edge (miny). Setting shifts the box vertically.
The y position of the top edge (miny). Setting shifts the box vertically.
Return a new AABB with the same bounds. Alias for copy().
A new AABB with the same position and dimensions.
Check whether this AABB is equal to another, within an optional epsilon tolerance.
The AABB to compare against.
Maximum allowed difference per component (default 0).
true if all four bounds (minx, miny, maxx, maxy) differ by at most epsilon.
String representation in the form { x: … y: … w: … h: … }.
A human-readable string of this AABB's position and dimensions.
Staticfrom
Axis-aligned bounding box defined by min/max corners or x/y/width/height.
Internally wraps a ZPP_AABB and is registered as the public
nape.geom.AABBclass in the compiled namespace.Converted from nape-compiled.js lines 14950–15653.