BufferAttribute<TData extends NativeArray<num>> class abstract

This class stores data for an attribute (such as vertex positions, face indices, normals, colors, UVs, and any custom attributes ) associated with a BufferGeometry, which allows for more efficient passing of data to the GPU. See that page for details and a usage example. When working with vector-like data, the .fromBufferAttribute( attribute, index ) helper methods on Vector2, Vector3, Vector4, and Color classes may be helpful.

Inheritance
Implementers

Constructors

BufferAttribute(TData arrayList, int itemSize, [bool normalized = false])
array -- Must be a TypedArray. Used to instantiate the buffer.

Properties

array ↔ TData
getter/setter pairinherited
buffer int?
getter/setter pairinherited
count int
getter/setter pairinherited
data InterleavedBuffer?
getter/setter pairinherited
elementSize int?
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
isBufferAttribute bool
getter/setter pair
itemSize int
getter/setter pairinherited
length int
no setter
name String?
getter/setter pairinherited
needsUpdate bool
no getter
normalized bool
getter/setter pairinherited
onUploadCallback ↔ void Function()?
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type String
getter/setter pairinherited
updateRange Map<String, int>?
getter/setter pairinherited
usage int
getter/setter pairinherited
version int
getter/setter pairinherited

Methods

applyMatrix3(Matrix3 m) BufferAttribute<NativeArray<num>>
Applies matrix m to every Vector3 element of this BufferAttribute.
applyMatrix4(Matrix4 m) → void
Applies matrix m to every Vector3 element of this BufferAttribute.
applyNormalMatrix(Matrix3 m) BufferAttribute<NativeArray<num>>
Applies normal matrix m to every Vector3 element of this BufferAttribute.
clone() BufferAttribute<NativeArray<num>>
Return a copy of this bufferAttribute.
copy(BufferAttribute<NativeArray<num>> source) BufferAttribute<NativeArray<num>>
Copies another BufferAttribute to this BufferAttribute.
copyArray(TData array) BufferAttribute<NativeArray<num>>
Copy the array given here (which can be a normal array or TypedArray) into array.
copyAt(int index1, BufferAttribute<NativeArray<num>> attribute, int index2) BufferAttribute<NativeArray<num>>
Copy a vector from bufferAttributeindex2 to arrayindex1.
copyColorsArray(List<Color> colors) BufferAttribute<NativeArray<num>>
Copy the Color array given here into array.
copyVector2sArray(List<Vector2> vectors) BufferAttribute<NativeArray<num>>
Copy the Vector2 array given here into array.
copyVector3sArray(List<Vector3> vectors) BufferAttribute<NativeArray<num>>
Copy the Vector3 array given here into array.
copyVector4sArray(List<Vector4> vectors) BufferAttribute<NativeArray<num>>
Copy the Vector4 array given here into array.
dispose() → void
inherited
getAt(int index) double?
getFrom(String key, int index) num?
getW(int index) num?
Returns the w component of the vector at the given index.
getX(int index) num?
Returns the x component of the vector at the given index.
getY(int index) num?
Returns the y component of the vector at the given index.
getZ(int index) num?
Returns the z component of the vector at the given index.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onUpload(void callback()?) BufferAttribute<NativeArray<num>>
set(dynamic value, {int offset = 0}) BufferAttribute<NativeArray<num>>
value - an List or [TypedData from which to copy values.
setFrom(String key, int index, num number) → void
setUsage(int value) BufferAttribute<NativeArray<num>>
setW(int index, double w) BufferAttribute<NativeArray<num>>
Sets the w component of the vector at the given index.
setX(int index, num x) BufferAttribute<NativeArray<num>>
Sets the x component of the vector at the given index.
setXY(int index, double x, double y) BufferAttribute<NativeArray<num>>
Sets the x and y components of the vector at the given index.
setXYZ(int index, double x, double y, double z) → void
Sets the x, y and z components of the vector at the given index.
setXYZW(int index, num x, num y, num z, num w) BufferAttribute<NativeArray<num>>
Sets the x, y, z and w components of the vector at the given index.
setY(int index, num y) BufferAttribute<NativeArray<num>>
Sets the y component of the vector at the given index.
setZ(int index, num z) BufferAttribute<NativeArray<num>>
Sets the z component of the vector at the given index.
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited
transformDirection(Matrix4 m) BufferAttribute<NativeArray<num>>
Applies matrix m to every Vector3 element of this BufferAttribute, interpreting the elements as a direction vectors.

Operators

operator ==(Object other) bool
The equality operator.
inherited