ReadonlycenterBox centre, (min + max) / 2. NaN when the geometry has no vertices.
ReadonlymaxHighest corner. -Infinity on every axis when the geometry has no vertices.
ReadonlyminLowest corner. +Infinity on every axis when the geometry has no vertices.
ReadonlyradiusCircumradius of the box, |max − min| / 2. NaN when the geometry has no vertices.
§53's
BoundingVolume: a geometry's extent in its own local space, as both an axis-aligned box and the sphere that circumscribes it.Everything here is live. The vectors belong to the geometry, are rewritten in place by the next recompute, and must not be mutated by callers; copy them if you need to keep them. (The same rule
resolveWorldTransformstates for a returned world matrix.)An empty geometry has no volume, and says so rather than pretending: the box is the identity element of bounds union (
min = +Infinity,max = -Infinity, so folding an empty geometry into a scene bound contributes nothing), andcenter/radiusareNaN— the volume of no points is not a point at the origin. Consumers gate onNumber.isFinite(volume.radius), which is the same finiteness gatecomputeWorldBoundingSpherealready applies for the same reason.