PIXI.ViewableBuffer

class ViewableBuffer

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

Constructor


new PIXI.ViewableBuffer(length: number | ArrayBuffer | Uint8Array) → {}
Parameters:
Name Type Description
length number | ArrayBuffer | Uint8Array

The size of the buffer in bytes.

new PIXI.ViewableBuffer(arrayBuffer: ArrayBuffer) → {}
Parameters:
Name Type Description
arrayBuffer ArrayBuffer

The source array buffer.

Summary


Properties from ViewableBuffer

Float32Array
float32View

View on the raw binary data as a Float32Array.

Int16Array
int16View

View on the raw binary data as a Int16Array.

Int32Array
int32View

View on the raw binary data as a Int32Array.

Int8Array
int8View

View on the raw binary data as a Int8Array.

ArrayBuffer
rawBinaryData

Underlying ArrayBuffer that holds all the data and is of capacity this.size.

Uint16Array
uint16View

View on the raw binary data as a Uint16Array.

Uint32Array
uint32View

View on the raw binary data as a Uint32Array.

Uint8Array
uint8View

View on the raw binary data as a Uint8Array.

Methods from ViewableBuffer

void
destroy()

Destroys all buffer references. Do not use after calling this.

ITypedArray
view(type: string)

Public Properties


float32View ViewableBuffer.ts:17
float32View: Float32Array

View on the raw binary data as a Float32Array.

int16View ViewableBuffer.ts:77
int16View: Int16Array

View on the raw binary data as a Int16Array.

int32View ViewableBuffer.ts:99
int32View: Int32Array

View on the raw binary data as a Int32Array.

int8View ViewableBuffer.ts:55
int8View: Int8Array

View on the raw binary data as a Int8Array.

rawBinaryData ViewableBuffer.ts:11
rawBinaryData: ArrayBuffer

Underlying ArrayBuffer that holds all the data and is of capacity this.size.

uint16View ViewableBuffer.ts:88
uint16View: Uint16Array

View on the raw binary data as a Uint16Array.

uint32View ViewableBuffer.ts:14
uint32View: Uint32Array

View on the raw binary data as a Uint32Array.

uint8View ViewableBuffer.ts:66
uint8View: Uint8Array

View on the raw binary data as a Uint8Array.

Public Methods


destroy ViewableBuffer.ts:121
destroy() → {void}

Destroys all buffer references. Do not use after calling this.

Returns:
Type Description
void
view ViewableBuffer.ts:110
view(type: string) → {ITypedArray}

Returns the view of the given type.

Parameters:
Name Type Description
type string

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

Returns:
Type Description
ITypedArray
  • typed array of given type

Powered by webdoc!