An instanced version of InterleavedBuffer.

Hierarchy (view full)

Constructors

Properties

array: TypedArray

A TypedArray with a shared buffer. Stores the geometry data.

count: number

Gives the total number of elements in the array.

Expects a Integer

0
meshPerAttribute: number

1

stride: number

The number of TypedArray elements per vertex.

Expects a Integer

updateRange: {
    count: number;
    offset: number;
}

Object containing offset and count.

Type declaration

  • count: number

    -1

  • offset: number

    0

{ offset: number = 0; count: number = -1 }

Will be removed in r169. Use "addUpdateRange()" instead.

updateRanges: {
    count: number;
    start: number;
}[]

This can be used to only update some components of stored data. Use the .addUpdateRange function to add ranges to this array.

Type declaration

  • count: number

    The number of components to update.

  • start: number

    Position at which to start update.

usage: Usage

Defines the intended usage pattern of the data store for optimization purposes. Corresponds to the usage parameter of WebGLRenderingContext.bufferData.

After the initial use of a buffer, its usage cannot be changed. Instead, instantiate a new one and set the desired usage before the next render.

THREE.StaticDrawUsage.

uuid: string

UUID of this object instance.

This gets automatically assigned and shouldn't be edited.

version: number

A version number, incremented every time the needsUpdate property is set to true.

Expects a Integer

0

Accessors

  • set needsUpdate(value): void
  • 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.

    Parameters

    • value: boolean

    Returns void

    Setting this to true also increments the version.

Methods

  • Adds a range of data in the data array to be updated on the GPU. Adds an object describing the range to the .updateRanges array.

    Parameters

    • start: number
    • count: number

    Returns void

  • Clears the .updateRanges array.

    Returns void

  • Copies data from attribute[index2] to array[index1].

    Parameters

    Returns this

  • Calls TypedArray.set( value, offset ) on the array.

    Parameters

    • value: ArrayLike<number>

      The source TypedArray.

    • offset: number

      index of the array at which to start copying. Expects a Integer. Default 0.

    Returns this

    RangeError When offset is negative or is too large.

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

    Parameters

    • data: {}

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

      Returns {
          buffer: string;
          stride: number;
          type: string;
          uuid: string;
      }

      • buffer: string
      • stride: number
      • type: string
      • uuid: string