CubeGeometry is the quadrilateral primitive geometry class. It is typically used for creating a cube or irregular quadrilateral of the dimensions provided within the (optional) 'width', 'height', & 'depth' constructor arguments.
— Width of the sides on the X axis.
— Height of the sides on the Y axis.
— Depth of the sides on the Z axis.
— Number of segmented faces along the width of the sides.
— Number of segmented faces along the height of the sides.
— Number of segmented faces along the depth of the sides.
Bounding box.
Bounding sphere.
Set to true if an array has changed in length.
Array of vertex colors, matching number and order of vertices. Used in ParticleSystem, Line and Ribbon. Meshes use per-face-use-of-vertex colors embedded directly in faces. To signal an update in this array, Geometry.colorsNeedUpdate needs to be set to true.
Set to true if the colors array has been updated.
Set to true if attribute buffers will need to change in runtime (using "dirty" flags). Unless set to true internal typed arrays corresponding to buffers will be deleted once sent to GPU. Defaults to true.
Set to true if the faces array has been updated.
Array of face UV layers. Each UV layer is an array of UV matching order and number of vertices in faces. To signal an update in this array, Geometry.uvsNeedUpdate needs to be set to true.
Array of triangles or/and quads. The array of faces describe how each vertex in the model is connected with each other. To signal an update in this array, Geometry.elementsNeedUpdate needs to be set to true.
True if geometry has tangents. Set in Geometry.computeTangents.
Unique number of this geometry instance
Set to true if the linedistances array has been updated.
Array of morph colors. Morph colors have similar structure as morph targets, each color set is a Javascript object:
morphColor = { name: "colorName", colors: [ new THREE.Color(), ... ] }
Array of morph normals. Morph normals have similar structure as morph targets, each normal set is a Javascript object:
morphNormal = { name: "NormalName", normals: [ new THREE.Vector3(), ... ] }
Array of morph targets. Each morph target is a Javascript object:
{ name: "targetName", vertices: [ new THREE.Vector3(), ... ] }
Morph vertices match number and order of primary vertices.
Name for this geometry. Default is an empty string.
Set to true if the normals array has been updated.
Array of skinning indices, matching number and order of vertices.
Array of skinning weights, matching number and order of vertices.
Set to true if the tangents in the faces has been updated.
Set to true if the uvs array has been updated.
The array of vertices hold every position of points of the model. To signal an update in this array, Geometry.verticesNeedUpdate needs to be set to true.
Set to true if the vertices array has been updated.
Bakes matrix transform directly into vertex coordinates.
Creates a new clone of the Geometry.
Computes bounding box of the geometry, updating {@link Geometry.boundingBox} attribute.
Computes bounding sphere of the geometry, updating Geometry.boundingSphere attribute. Neither bounding boxes or bounding spheres are computed by default. They need to be explicitly computed, otherwise they are null.
Computes face normals.
Computes morph normals.
Computes vertex tangents. Based on http://www.terathon.com/code/tangent.html Geometry must have vertex UVs (layer 0 will be used).
Computes vertex normals by averaging face normals. Face normals must be existing / computed beforehand.
Removes The object from memory. Don't forget to call this method when you remove an geometry because it can cuase meomory leaks.
Checks for duplicate vertices using hashmap. Duplicated vertices are removed and faces' vertices are updated.
number