This creates a new THREE.BufferGeometry | BufferGeometry object.
Unique number for this THREE.BufferGeometry | BufferGeometry instance.
UUID of this object instance.
Optional name for this THREE.BufferGeometry | BufferGeometry instance.
Readonly
typeA Read-only string to check if this
object type.
Allows for vertices to be re-used across multiple triangles; this is called using "indexed triangles".
Each triangle is associated with the indices of three vertices. This attribute therefore stores the index of each vertex for each triangular face.
If this attribute is not set, the THREE.WebGLRenderer | renderer assumes that each three contiguous positions represent a single triangle.
This hashmap has as id the name of the attribute to be set and as value the THREE.BufferAttribute | buffer to set it to. Rather than accessing this property directly,
use .setAttribute and .getAttribute to access attributes of this geometry.
Hashmap of THREE.BufferAttribute | BufferAttributes holding details of the geometry's morph targets.
Once the geometry has been rendered, the morph attribute data cannot be changed.
You will have to call .dispose(), and create a new instance of THREE.BufferGeometry | BufferGeometry.
{}
Used to control the morph target behavior; when set to true, the morph target data is treated as relative offsets, rather than as absolute positions/normals.
Split the geometry into groups, each of which will be rendered in a separate WebGL draw call. This allows an array of materials to be used with the geometry.
Bounding box for the THREE.BufferGeometry | BufferGeometry, which can be calculated with .computeBoundingBox().
Bounding sphere for the THREE.BufferGeometry | BufferGeometry, which can be calculated with .computeBoundingSphere().
Determines the part of the geometry to render. This should not be set directly, instead use .setDrawRange(...).
An object that can be used to store custom data about the BufferGeometry. It should not hold references to functions as these will not be cloned.
Readonly
isRead-only flag to check if a given object is of type BufferGeometry.
Return the .index buffer.
Set the THREE.BufferGeometry.index | .index buffer.
Sets an attribute to this geometry with the specified name.
Use this rather than the attributes property, because an internal hashmap of .attributes is maintained to speed up iterating over attributes.
Returns the attribute with the specified name.
Deletes the attribute with the specified name.
Returns true if the attribute with the specified name exists.
Adds a group to this geometry
Optional
materialIndex: numberthe groups property for details.
Set the .drawRange property
is the number of vertices or indices to render. Expects a Integer
Applies the matrix transform to the geometry.
Applies the rotation represented by the quaternion to the geometry.
Rotates the geometry to face a point in space.
A world vector to look at.
Computes the bounding sphere of the geometry, and updates the .boundingSphere attribute. The engine
automatically computes the bounding sphere when it is needed, e.g., for ray casting or view frustum culling. You
may need to recompute the bounding sphere if the geometry vertices are modified.
Computes vertex normals for the given vertex data. For indexed geometries, the method sets each vertex normal to
be the average of the face normals of the faces that share that vertex. For non-indexed geometries, vertices are
not shared, and the method sets each vertex normal to be the same as the face normal.
Return a non-index version of an indexed BufferGeometry.
Convert the buffer geometry to three.js JSON Object/Scene format.
Copies another BufferGeometry to this BufferGeometry.
Adds a listener to an event type.
The type of event to listen to.
The function that gets called when the event is fired.
Checks if listener is added to an event type.
The type of event to listen to.
The function that gets called when the event is fired.
Removes a listener from an event type.
The type of the listener that gets removed.
The listener function that gets removed.
Fire an event type.
A representation of mesh, line, or point geometry
Includes vertex positions, face indices, normals, colors, UVs, and custom attributes within buffers, reducing the cost of passing all this data to the GPU.
Remarks
To read and edit data in BufferGeometry attributes, see THREE.BufferAttribute | BufferAttribute documentation.
Example
Example
See