PIXI.ArrayResource
class ArrayResource extends PIXI.AbstractMultiResource
A resource that contains a number of sources.
Constructor
new PIXI.ArrayResource(source: number | Array, options: ISize) → {}
Name | Type | Attributes | Description |
---|---|---|---|
source | number | Array<any> |
Number of items in array or the collection of image URLs to use. Can also be resources, image elements, canvas, etc. |
|
options | ISize |
<optional> |
Options to apply to PIXI.autoDetectResource |
options.width | number |
<optional> |
Width of the resource |
options.height | number |
<optional> |
Height of the resource |
Summary
Methods from ArrayResource
this |
|
void |
|
boolean |
|
Properties inherited from AbstractMultiResource
PIXI.BaseTexture |
Bound baseTexture, there can only be one. |
Array<number> |
|
Array<PIXI.BaseTexture> |
|
number |
Number of elements in array. |
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 AbstractMultiResource
this |
|
void |
Destroy this BaseImageResource. |
Promise<this> |
|
void |
|
void |
|
Methods inherited from Resource
void |
|
void |
|
boolean |
|
void |
Has been updated trigger event. |
Public Methods
addBaseTextureAt(baseTexture: PIXI.BaseTexture, index: number) → {this}
Set a baseTexture by ID, ArrayResource just takes resource from it, nothing more
Name | Type | Description |
---|---|---|
baseTexture | PIXI.BaseTexture | |
index | number |
Zero-based index of resource to set |
Type | Description |
---|---|
this |
|
bind(baseTexture: PIXI.BaseTexture) → {void}
Add binding
Name | Type | Description |
---|---|---|
baseTexture | PIXI.BaseTexture |
Type | Description |
---|---|
void |
upload(renderer: PIXI.Renderer, texture: PIXI.BaseTexture, glTexture: PIXI.GLTexture) → {boolean}
Upload the resources to the GPU.
Name | Type | Description |
---|---|---|
renderer | PIXI.Renderer | |
texture | PIXI.BaseTexture | |
glTexture | PIXI.GLTexture |
Type | Description |
---|---|
boolean |
|