PIXI.BufferResource
class BufferResource extends PIXI.Resource
Buffer resource with data of typed array.
Constructor
new PIXI.BufferResource(source: Float32Array | Uint8Array | Uint16Array | Int32Array | Uint32Array, options: ISize) → {}
| Name | Type | Description |
|---|---|---|
| source | Float32Array | Uint8Array | Uint16Array | Int32Array | Uint32Array |
Source buffer |
| options | ISize |
Options |
| options.width | number |
Width of the texture |
| options.height | number |
Height of the texture |
Summary
Properties from BufferResource
| Float32Array | Uint8Array | Uint16Array | Int32Array | Uint32Array |
Source array Cannot be |
Methods from BufferResource
| boolean |
|
| void |
Destroy and don't use after this. |
| boolean |
|
Properties inherited from Resource
| boolean |
|
| number |
|
| boolean |
|
| string |
The url of the resource |
| boolean |
|
| number |
|
| number |
Internal height of the resource. |
| number |
Internal width of the resource. |
Methods inherited from Resource
| void |
|
| void |
|
| void |
|
| boolean |
|
| void |
|
| void |
Has been updated trigger event. |
| Promise<PIXI.Resource> |
|
Public Properties
data: Float32Array | Uint8Array | Uint16Array | Int32Array | Uint32Array
Source array Cannot be ClampedUint8Array because it cant be uploaded to WebGL
Public Methods
static test(source: unknown) → {boolean}
Used to auto-detect the type of resource.
| Name | Type | Description |
|---|---|---|
| source | unknown |
The source object |
| Type | Description |
|---|---|
| boolean |
|
dispose() → {void}
Destroy and don't use after this.
| Type | Description |
|---|---|
| void |
upload(renderer: PIXI.Renderer, baseTexture: PIXI.BaseTexture, glTexture: PIXI.GLTexture) → {boolean}
Upload the texture to the GPU.
| Name | Type | Description |
|---|---|---|
| renderer | PIXI.Renderer |
Upload to the renderer |
| baseTexture | PIXI.BaseTexture |
Reference to parent texture |
| glTexture | PIXI.GLTexture |
glTexture |
| Type | Description |
|---|---|
| boolean |
|