Skip to main content

InterleavedBufferAttribute

Constructor

InterleavedBufferAttribute

function InterleavedBufferAttribute( interleavedBuffer: InterleavedBuffer,
itemSize: Integer, offset: Integer, normalized: Boolean ): void;

Properties

data

data: InterleavedBuffer;  

The InterleavedBuffer instance passed in the constructor.

array

array: TypedArray;  

The value of data.array.

count

count: Integer;  

The value of data.count. If the buffer is storing a 3-component item (such as a position, normal, or color), then this will count the number of such items stored.

isInterleavedBufferAttribute

isInterleavedBufferAttribute: Boolean;  

Read-only flag to check if a given object is of type InterleavedBufferAttribute.

itemSize

itemSize: Integer;  

How many values make up each item.

name

name: String;  

Optional name for this attribute instance. Default is an empty string.

needsUpdate

needsUpdate: Boolean;  

Default is false. Setting this to true will send the entire interleaved buffer (not just the specific attribute data) to the GPU again.

normalized

normalized: Boolean;  

Default is false.

offset

offset: Integer;  

The offset in the underlying array buffer where an item starts.

Methods

applyMatrix4

function applyMatrix4( m: Matrix4 ): this;  

Applies matrix m to every Vector3 element of this InterleavedBufferAttribute.

applyNormalMatrix

function applyNormalMatrix( m: Matrix3 ): this;  

Applies normal matrix m to every Vector3 element of this InterleavedBufferAttribute.

transformDirection

function transformDirection( m: Matrix4 ): this;  

Applies matrix m to every Vector3 element of this InterleavedBufferAttribute, interpreting the elements as a direction vectors.

getX

function getX( index: Integer ): Number;  

Returns the x component of the item at the given index.

getY

function getY( index: Integer ): Number;  

Returns the y component of the item at the given index.

getZ

function getZ( index: Integer ): Number;  

Returns the z component of the item at the given index.

getW

function getW( index: Integer ): Number;  

Returns the w component of the item at the given index.

setX

function setX( index: Integer, x: Float ): this;  

Sets the x component of the item at the given index.

setY

function setY( index: Integer, y: Float ): this;  

Sets the y component of the item at the given index.

setZ

function setZ( index: Integer, z: Float ): this;  

Sets the z component of the item at the given index.

setW

function setW( index: Integer, w: Float ): this;  

Sets the w component of the item at the given index.

setXY

function setXY( index: Integer, x: Float, y: Float ): this;  

Sets the x and y components of the item at the given index.

setXYZ

function setXYZ( index: Integer, x: Float, y: Float, z: Float ): this;  

Sets the x, y and z components of the item at the given index.

setXYZW

function setXYZW( index: Integer, x: Float, y: Float, z: Float, w: Float ):
this;

Sets the x, y, z and w components of the item at the given index.

Source

src/core/InterleavedBufferAttribute.js