BufferGeometryUtils

A class containing utility functions for BufferGeometry instances.

Methods

.computeTangents (geometry : BufferGeometry) : null

geometry -- A BufferGeometry instance, which must have index, position, normal, and uv attributes.

Calculates and adds tangent attribute to a geometry.

.mergeBufferGeometries (geometries : Array, useGroups : Boolean) : BufferGeometry

geometries -- Array of 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.

.mergeBufferAttributes (attributes : Array) : BufferAttribute

attributes -- Array of BufferAttribute instances.

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

.interleaveAttributes (attributes : Array) : InterleavedBufferAttribute

attributes -- Array of 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.

.estimateBytesUsed (geometry : BufferGeometry) : Number

geometry -- Instance of BufferGeometry to estimate the memory use of.

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

.mergeVertices (geometry : BufferGeometry, tolerance : Number) : BufferGeometry

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

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

Source

For more info on how to obtain the source code of this module see this page.