Class: ViewableBuffer

PIXI.ViewableBuffer

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

new PIXI.ViewableBuffer (size)

Name Type Description
size number

The size of the buffer in bytes.

Members

float32View Float32Array

View on the raw binary data as a Float32Array.

int8View Int8Array

View on the raw binary data as a Int8Array.

int16View Int16Array

View on the raw binary data as a Int16Array.

int32View Int32Array

View on the raw binary data as a Int32Array.

rawBinaryData ArrayBuffer

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

uint8View Uint8Array

View on the raw binary data as a Uint8Array.

uint16View Uint16Array

View on the raw binary data as a Uint16Array.

uint32View Uint32Array

View on the raw binary data as a Uint32Array.

Methods

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

view (type)object

Returns the view of the given type.

Name Type Description
type string

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

Returns:
Type Description
object typed array of given type