Class: ViewableBuffer
Defined in: node_modules/pixi.js/lib/utils/data/ViewableBuffer.d.ts:7
Flexible wrapper around ArrayBuffer that also provides typed array views on demand.
Advanced
Constructors
Constructor
> new ViewableBuffer(length): ViewableBuffer
Defined in: node_modules/pixi.js/lib/utils/data/ViewableBuffer.d.ts:27
Parameters
length
number
The size of the buffer in bytes.
Returns
ViewableBuffer
Constructor
> new ViewableBuffer(arrayBuffer): ViewableBuffer
Defined in: node_modules/pixi.js/lib/utils/data/ViewableBuffer.d.ts:31
Parameters
arrayBuffer
ArrayBufferLike
The source array buffer.
Returns
ViewableBuffer
Properties
float32View
> float32View: Float32Array
Defined in: node_modules/pixi.js/lib/utils/data/ViewableBuffer.d.ts:15
View on the raw binary data as a Float32Array.
rawBinaryData
> rawBinaryData: ArrayBufferLike
Defined in: node_modules/pixi.js/lib/utils/data/ViewableBuffer.d.ts:11
Underlying ArrayBuffer that holds all the data and is of capacity this.size.
size
> size: number
Defined in: node_modules/pixi.js/lib/utils/data/ViewableBuffer.d.ts:9
The size of the buffer in bytes.
uint16View
> uint16View: Uint16Array
Defined in: node_modules/pixi.js/lib/utils/data/ViewableBuffer.d.ts:17
View on the raw binary data as a Uint16Array.
uint32View
> uint32View: Uint32Array
Defined in: node_modules/pixi.js/lib/utils/data/ViewableBuffer.d.ts:13
View on the raw binary data as a Uint32Array.
Accessors
bigUint64View
Get Signature
> get bigUint64View(): BigUint64Array
Defined in: node_modules/pixi.js/lib/utils/data/ViewableBuffer.d.ts:43
View on the raw binary data as a BigUint64Array.
Returns
BigUint64Array
float64View
Get Signature
> get float64View(): Float64Array
Defined in: node_modules/pixi.js/lib/utils/data/ViewableBuffer.d.ts:41
View on the raw binary data as a Float64Array.
Returns
Float64Array
int16View
Get Signature
> get int16View(): Int16Array
Defined in: node_modules/pixi.js/lib/utils/data/ViewableBuffer.d.ts:37
View on the raw binary data as a Int16Array.
Returns
Int16Array
int32View
Get Signature
> get int32View(): Int32Array
Defined in: node_modules/pixi.js/lib/utils/data/ViewableBuffer.d.ts:39
View on the raw binary data as a Int32Array.
Returns
Int32Array
int8View
Get Signature
> get int8View(): Int8Array
Defined in: node_modules/pixi.js/lib/utils/data/ViewableBuffer.d.ts:33
View on the raw binary data as a Int8Array.
Returns
Int8Array
uint8View
Get Signature
> get uint8View(): Uint8Array
Defined in: node_modules/pixi.js/lib/utils/data/ViewableBuffer.d.ts:35
View on the raw binary data as a Uint8Array.
Returns
Uint8Array
Methods
destroy()
> destroy(): void
Defined in: node_modules/pixi.js/lib/utils/data/ViewableBuffer.d.ts:52
Destroys all buffer references. Do not use after calling this.
Returns
void
view()
> view(type): TypedArray
Defined in: node_modules/pixi.js/lib/utils/data/ViewableBuffer.d.ts:50
Returns the view of the given type.
Parameters
type
string
One of int8, uint8, int16,
uint16, int32, uint32, and float32.
Returns
- typed array of given type
sizeOf()
> static sizeOf(type): number
Defined in: node_modules/pixi.js/lib/utils/data/ViewableBuffer.d.ts:59
Returns the size of the given type in bytes.
Parameters
type
string
One of int8, uint8, int16,
uint16, int32, uint32, and float32.
Returns
number
- size of the type in bytes