webgpu-utils

    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

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    cursor: number = 0
    numComponents: number
    typedArray: T

    Accessors

    • get numElements(): number

      Returns number

    Methods

    • Parameters

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

      Returns void

    • Parameters

      • index: number = 0

      Returns void

    MMNEPVFCICPMFPCPTTAAATR