BufferGeometry
BufferGeometry is the base class for all mesh, line, and point geometry. It stores vertex data — positions, indices, normals, UVs, colors, and any custom attributes — in GPU-friendly typed-array buffers.
Properties
id— Auto-incrementing numeric id (readonly).uuid— Globally unique string id.type— Class name string (e.g.'BufferGeometry','BoxGeometry').index— OptionalBufferAttributeof triangle indices, ornullfor non-indexed geometry.attributes— Dictionary of namedBufferAttributes (position,normal,uv,color, …). Access viagetAttribute/setAttributerather than touching this directly.morphAttributes— Dictionary of morph-target attribute arrays.boundingBox—Box3computed bycomputeBoundingBox(), otherwisenull.drawRange—{ start, count }describing which portion of the geometry to draw. Set viasetDrawRange.userData— Free-form object for attaching custom data.
Attributes & indices
getIndex()— Returns the current index attribute, ornull.setIndex(index)— Sets the index from aBufferAttributeor a plain array (auto-picksUint16/Uint32).getAttribute(name)— Returns the attribute registered undername.setAttribute(name, attribute)— Registers aBufferAttributeundername.deleteAttribute(name)— Removes the named attribute.hasAttribute(name)— Returnstrueif the attribute exists.setDrawRange(start, count)— Limits rendering to a sub-range of indices/vertices.
Transformations
These bake the transform into the vertex buffers; use them as one-time operations rather than per frame (use Object3D.position/rotation/scale for realtime movement).
applyMatrix4(matrix)— Apply an arbitrary 4×4 transform (also transforms normals/tangents).applyQuaternion(q)— Apply a rotation.rotateX(angle)/rotateY(angle)/rotateZ(angle)— Rotate around a world axis (radians).translate(x, y, z)— Translate the vertices.scale(x, y, z)— Scale the vertices.lookAt(vector)— Rotate the geometry so its local+Zfaces the given point.center()— Translate the geometry so its bounding box is centered on the origin.
Lifecycle
clone()— Return a deep copy.copy(source)— Copy data from anotherBufferGeometryinto this one.toJSON()— Serialize the geometry to a plain JSON object.dispose()— Fire thedisposeevent and free associated GPU resources. Call when the geometry is no longer needed.