Class InterleavedBufferAttribute

Constructors

  • Create a new instance of THREE.InterleavedBufferAttribute | InterleavedBufferAttribute.

    Parameters

    • interleavedBuffer: InterleavedBuffer
    • itemSize: number
    • offset: number
    • Optionalnormalized: boolean

      Default false.

    Returns InterleavedBufferAttribute

Properties

name: string

Optional name for this attribute instance.

''

The InterleavedBuffer instance passed in the constructor.

itemSize: number

How many values make up each item.

Expects a Integer

offset: number

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

Expects a Integer

normalized: boolean

false

isInterleavedBufferAttribute: true

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

This is a constant value

true

Accessors

  • get count(): number
  • 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.

    Returns number

    get-only property.

  • get array(): TypedArray
  • The value of data.array.

    Returns TypedArray

    get-only property.

  • set needsUpdate(value): void
  • Flag to indicate that the .data (InterleavedBuffer) attribute has changed and should be re-sent to the GPU.

    Parameters

    • value: boolean

    Returns void

    Setting this to have the same result of setting true also increments the InterleavedBuffer.needsUpdate of .data.

Methods

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

    Parameters

    Returns this

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

    Parameters

    Returns this

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

    Parameters

    Returns this

  • Returns the given component of the vector at the given index.

    Parameters

    • index: number
    • component: number

    Returns number

  • Sets the given component of the vector at the given index.

    Parameters

    • index: number
    • component: number
    • value: number

    Returns this

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

    Parameters

    • index: number

      Expects a Integer

    Returns number

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

    Parameters

    • index: number

      Expects a Integer

    • x: number

      Expects a Float

    Returns this

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

    Parameters

    • index: number

      Expects a Integer

    Returns number

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

    Parameters

    • index: number

      Expects a Integer

    • y: number

      Expects a Float

    Returns this

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

    Parameters

    • index: number

      Expects a Integer

    Returns number

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

    Parameters

    • index: number

      Expects a Integer

    • z: number

      Expects a Float

    Returns this

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

    Parameters

    • index: number

      Expects a Integer

    Returns number

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

    Parameters

    • index: number

      Expects a Integer

    • z: number

    Returns this

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

    Parameters

    • index: number

      Expects a Integer

    • x: number

      Expects a Float

    • y: number

      Expects a Float

    Returns this

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

    Parameters

    • index: number

      Expects a Integer

    • x: number

      Expects a Float

    • y: number

      Expects a Float

    • z: number

      Expects a Float

    Returns this

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

    Parameters

    • index: number

      Expects a Integer

    • x: number

      Expects a Float

    • y: number

      Expects a Float

    • z: number

      Expects a Float

    • w: number

      Expects a Float

    Returns this

  • Creates a clone of this InterleavedBufferAttribute.

    Parameters

    • Optionaldata: {}

      This object holds shared array buffers required for properly cloning geometries with interleaved attributes.

      Returns BufferAttribute

    • Serializes this InterleavedBufferAttribute.
      Converting to JSON Geometry format v4,

      Parameters

      • Optionaldata: {}

        This object holds shared array buffers required for properly serializing geometries with interleaved attributes.

        Returns {
            isInterleavedBufferAttribute: true;
            itemSize: number;
            data: string;
            offset: number;
            normalized: boolean;
        }

        • isInterleavedBufferAttribute: true
        • itemSize: number
        • data: string
        • offset: number
        • normalized: boolean