Options
All
  • Public
  • Public/Protected
  • All
Menu

Flexible wrapper around ArrayBuffer that also provides typed array views on demand.

memberof

PIXI

Hierarchy

  • ViewableBuffer

Index

Constructors

constructor

  • Parameters

    • length: number

      The size of the buffer in bytes.

    Returns ViewableBuffer

  • Parameters

    • arrayBuffer: ArrayBuffer

      The source array buffer.

    Returns ViewableBuffer

Properties

Private _int16View

_int16View: any

Private _int32View

_int32View: any

Private _int8View

_int8View: any

Private _uint16View

_uint16View: any

Private _uint8View

_uint8View: any

float32View

float32View: Float32Array

rawBinaryData

rawBinaryData: ArrayBuffer

size

size: number

uint32View

uint32View: Uint32Array

Accessors

int16View

  • get int16View(): Int16Array
  • View on the raw binary data as a Int16Array.

    member

    {Int16Array}

    Returns Int16Array

int32View

  • get int32View(): Int32Array
  • View on the raw binary data as a Int32Array.

    member

    {Int32Array}

    Returns Int32Array

int8View

  • get int8View(): Int8Array
  • View on the raw binary data as a Int8Array.

    member

    {Int8Array}

    Returns Int8Array

uint16View

  • get uint16View(): Uint16Array
  • View on the raw binary data as a Uint16Array.

    member

    {Uint16Array}

    Returns Uint16Array

uint8View

  • get uint8View(): Uint8Array
  • View on the raw binary data as a Uint8Array.

    member

    {Uint8Array}

    Returns Uint8Array

Methods

destroy

  • destroy(): void
  • Destroys all buffer references. Do not use after calling this.

    Returns void

view

  • Returns the view of the given type.

    Parameters

    • type: string

      One of int8, uint8, int16, uint16, int32, uint32, and float32.

    Returns ITypedArray

    typed array of given type

Static sizeOf

  • sizeOf(type: string): number
  • Parameters

    • type: string

    Returns number

Generated using TypeDoc