Class TypedArrayWrapper<T>

A class to provide push on a typed array.

example:

const positions = new TypedArrayWrapper(new Float32Array(300), 3);
positions.push(1, 2, 3); // add a position
positions.push([4, 5, 6]); // add a position
positions.push(new Float32Array(6)); // add 2 positions
const data = positions.typedArray;

Type Parameters

Hierarchy

  • TypedArrayWrapper

Constructors

Properties

Accessors

Methods

Constructors

Properties

cursor: number = 0
numComponents: number
typedArray: T

Accessors

  • get numElements(): number
  • Returns number

Methods

  • Parameters

    • Rest ...data: (number | Iterable<number>)[]

    Returns void

  • Parameters

    • index: number = 0

    Returns void

Generated using TypeDoc