BufferUtils

Common utilities for working with Uint8Array and Buffer objects.

Static methods

  • assertView(view: Uint8Array | null): Uint8Array | null
  • concat(arrays: Uint8Array[]): Uint8Array
  • createBufferFromDataURI(dataURI: string): Uint8Array
  • decodeText(array: Uint8Array): string
  • encodeText(text: string): Uint8Array
  • equals(a: Uint8Array, b: Uint8Array): boolean
  • pad(srcArray: Uint8Array, paddingByte?: number): Uint8Array
  • padNumber(v: number): number
  • toView(a: TypedArray, byteOffset?: number, byteLength?: number): Uint8Array
  • Returns a Uint8Array view of a typed array, with the same underlying ArrayBuffer.

    A shorthand for:

    const buffer = new Uint8Array(
        array.buffer,
        array.byteOffset + byteOffset,
        Math.min(array.byteLength, byteLength)
    );
    
Function symbol, where the argument and output are a box labeled 'glTF'.

Made by Don McCurdy. Documentation built with greendoc and published under Creative Commons Attribution 3.0.