local-space box around all positions; null until computed
local-space sphere around all positions; null until computed
Incremented on every structural change (attributes added/removed, index set)
Compute (and cache in boundingBox) the axis-aligned box around every
vertex of the position attribute, indexed or not. Empty without
positions.
Compute (and cache in boundingSphere) a sphere around every vertex:
centred on the bounding box, with the radius of the farthest vertex
from that centre. Tighter than the sphere around the box, at the cost
of a second pass over the positions.
minimal BufferGeometry class to provide an API similar to THREE.
A geometry is plain data; the renderer creates and caches the GPU buffers for it. Adding/removing attributes or changing the index bumps
version, which makes the renderer rebuild its buffers. To change the contents of an existing attribute, write intoattribute.dataand setattribute.needsUpdate = true.boundingBoxandboundingSphereare the extent of thepositionattribute in the geometry's own space, computed on demand bycomputeBoundingBox()/computeBoundingSphere()and cached. Set them tonullafter changing positions so they are recomputed.