[name]

A class containing utility functions for [page:BufferGeometry BufferGeometry] instances.

Methods

[method:BufferGeometry mergeBufferGeometries]( [param:Array geometries], [param:Boolean useGroups] )

geometries -- Array of [page:BufferGeometry BufferGeometry] instances.
useGroups -- Whether groups should be generated for the merged geometry or not.

Merges a set of geometries into a single instance. All geometries must have compatible attributes. If merge does not succeed, the method returns null.

[method:BufferAttribute mergeBufferAttributes]( [param:Array attributes] )

attributes -- Array of [page:BufferAttribute BufferAttribute] instances.

Merges a set of attributes into a single instance. All attributes must have compatible properties and types, and [page:InterleavedBufferAttribute InterleavedBufferAttributes] are not supported. If merge does not succeed, the method returns null.

[method:InterleavedBufferAttribute interleaveAttributes]( [param:Array attributes] )

attributes -- Array of [page:BufferAttribute BufferAttribute] instances.

Interleaves a set of attributes and returns a new array of corresponding attributes that share a single InterleavedBuffer instance. All attributes must have compatible types. If merge does not succeed, the method returns null.

[method:Number estimateBytesUsed]( [param:BufferGeometry geometry] )

geometry -- Instance of [page:BufferGeometry BufferGeometry] to estimate the memory use of.

Returns the amount of bytes used by all attributes to represent the geometry.

[method:BufferGeometry mergeVertices]( [param:BufferGeometry geometry], [param:Number tolerance] )

geometry -- Instance of [page:BufferGeometry BufferGeometry] to merge the vertices of.
tolerance -- The maximum allowable difference between vertex attributes to merge. Defaults to 1e-4.

Returns a new [page:BufferGeometry BufferGeometry] with vertices for which all similar vertex attributes (within tolerance) are merged.

[method:BufferGeometry toTrianglesDrawMode]( [param:BufferGeometry geometry], [param:TrianglesDrawMode drawMode] )

geometry -- Instance of [page:BufferGeometry BufferGeometry].
drawMode -- The draw mode of the given geometry.

Returns a new indexed [page:BufferGeometry BufferGeometry] based on the [page:DrawModes THREE.TrianglesDrawMode] draw mode. This mode corresponds to the *gl.TRIANGLES* WebGL primitive.

Source

[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/utils/BufferGeometryUtils.js examples/jsm/utils/BufferGeometryUtils.js]