BufferAttribute<TData extends TypedDataList> 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
gpuType ↔ int
getter/setter pair
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
updateRanges ↔ List<Ranges>
getter/setter pair
usage ↔ int
getter/setter pairinherited
version ↔ int
getter/setter pairinherited

Methods

addUpdateRange(int start, int count) → void
applyMatrix3(Matrix3 m) → BufferAttribute<TypedDataList>
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<TypedDataList>
Applies normal matrix m to every Vector3 element of this BufferAttribute.
clearUpdateRanges() → void
clone([Map<String, dynamic>? data]) → BufferAttribute<TypedDataList>
Return a copy of this bufferAttribute.
copy(BufferAttribute<TypedDataList> source) → BufferAttribute<TypedDataList>
Copies another BufferAttribute to this BufferAttribute.
copyArray(TData array) → BufferAttribute<TypedDataList>
Copy the array given here (which can be a normal array or TypedArray) into array.
copyAt(int index1, BufferAttribute<TypedDataList> attribute, int index2) → BufferAttribute<TypedDataList>
Copy a vector from bufferAttributeindex2 to arrayindex1.
copyColorsArray(List<Color> colors) → BufferAttribute<TypedDataList>
Copy the Color array given here into array.
copyVector2sArray(List<Vector2> vectors) → BufferAttribute<TypedDataList>
Copy the Vector2 array given here into array.
copyVector3sArray(List<Vector3> vectors) → BufferAttribute<TypedDataList>
Copy the Vector3 array given here into array.
copyVector4sArray(List<Vector4> vectors) → BufferAttribute<TypedDataList>
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<TypedDataList>
set(dynamic value, {int offset = 0}) → BufferAttribute<TypedDataList>
value - an List or [TypedData from which to copy values.
setFrom(String key, int index, num number) → void
setUsage(int value) → BufferAttribute<TypedDataList>
setW(int index, double w) → BufferAttribute<TypedDataList>
Sets the w component of the vector at the given index.
setX(int index, num x) → BufferAttribute<TypedDataList>
Sets the x component of the vector at the given index.
setXY(int index, double x, double y) → BufferAttribute<TypedDataList>
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<TypedDataList>
Sets the x, y, z and w components of the vector at the given index.
setY(int index, num y) → BufferAttribute<TypedDataList>
Sets the y component of the vector at the given index.
setZ(int index, num z) → BufferAttribute<TypedDataList>
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<TypedDataList>
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

Static Methods

fromUnknown(TypedData arrayList, int itemSize, [bool normalized = false]) → BufferAttribute<TypedDataList>