Must be a TypedArray. Used to instantiate the buffer. This array should have itemSize * numVertices
The number of values of the array that should be associated with a particular vertex. For instance, if this attribute is storing a 3-component vector (such as a position, normal, or color), then itemSize should be 3.
Applies to integer data only. Indicates how the underlying data in the buffer maps to the values in the GLSL code. For instance, if array is an instance of UInt16Array, and normalized is true, the values 0 - +65535 in the array data will be mapped to 0.0f - +1.0f in the GLSL attribute. An Int16Array (signed) would map from -32767 - +32767 to -1.0f - +1.0f. If normalized is false, the values will be converted to floats unmodified, i.e. 32767 becomes 32767.0f.
Must be a TypedArray. Used to instantiate the buffer. This array should have itemSize * numVertices
The number of values of the array that should be associated with a particular vertex. For instance, if this attribute is storing a 3-component vector (such as a position, normal, or color), then itemSize should be 3.
Applies to integer data only. Indicates how the underlying data in the buffer maps to the values in the GLSL code. For instance, if array is an instance of UInt16Array, and normalized is true, the values 0 - +65535 in the array data will be mapped to 0.0f - +1.0f in the GLSL attribute. An Int16Array (signed) would map from -32767 - +32767 to -1.0f - +1.0f. If normalized is false, the values will be converted to floats unmodified, i.e. 32767 becomes 32767.0f.
The array holding data stored in the buffer.
The length of vectors that are being stored in the array.
Optional name for this attribute instance. Default is an empty string.
Indicates how the underlying data in the buffer maps to the values in the GLSL shader code. See the constructor above for details.
Object containing:
Defines the intended usage pattern of the data store for optimization purposes. Corresponds to the usage parameter of WebGLRenderingContext.bufferData(). Default is StaticDrawUsage. See usage constants for all possible values.
A version number, incremented every time the needsUpdate property is set to true.
Flag to indicate that this attribute has changed and should be re-sent to the GPU. Set this to true when you modify the value of the array. Setting this to true also increments the version.
Applies matrix m to every Vector3 element of this BufferAttribute.
Applies matrix m to every Vector3 element of this BufferAttribute.
Applies normal matrix m to every Vector3 element of this BufferAttribute.
Return a copy of this bufferAttribute.
Copies another BufferAttribute to this BufferAttribute.
Copy the array given here (which can be a normal array or TypedArray) into array. See TypedArray.set for notes on requirements if copying a TypedArray.
Copy a vector from bufferAttribute[index2] to array[index1].
Copy an array representing RGB color values into array.
Returns the w component of the vector at the given index.
Returns the x component of the vector at the given index.
Returns the y component of the vector at the given index.
Returns the z component of the vector at the given index.
Sets the value of the onUploadCallback property. In the WebGL / Buffergeometry this is used to free memory after the buffer has been transferred to the GPU.
A callback function that is executed after the Renderer has transferred the attribute array data to the GPU.
Calls TypedArray.set( value, offset ) on the array. In particular, see that page for requirements on value being a TypedArray.
An Array or TypedArray from which to copy values.
index of the array at which to start copying.
Sets the w component of the vector at the given index.
Sets the x component of the vector at the given index.
Sets the x and y components of the vector at the given index.
Sets the x, y and z components of the vector at the given index.
Sets the x, y, z and w components of the vector at the given index.
Sets the y component of the vector at the given index.
Sets the z component of the vector at the given index.
Applies matrix m to every Vector3 element of this BufferAttribute, interpreting the elements as a direction vectors.
Generated using TypeDoc
Int16 buffer attribute