new PIXI.ArrayResource (source, options) overrides
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 |
Extends
Methods
addBaseTextureAt (baseTexture, index) this overrides
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 |
Returns:
Type | Description |
---|---|
this |
|
bind (baseTexture) void overrides
Add binding
Name | Type | Description |
---|---|---|
baseTexture |
PIXI.BaseTexture |
upload (renderer, texture, glTexture) boolean overrides
Upload the resources to the GPU.
Name | Type | Description |
---|---|---|
renderer |
PIXI.Renderer | |
texture |
PIXI.BaseTexture | |
glTexture |
PIXI.GLTexture |
Returns:
Type | Description |
---|---|
boolean |
|
Inherited Properties
From class PIXI.AbstractMultiResource
baseTexture PIXI.BaseTexture inherited
Bound baseTexture, there can only be one.
itemDirtyIds Array<number> readonly inherited
Dirty IDs for each part.
items Array<PIXI.BaseTexture> readonly inherited
Collection of partial baseTextures that correspond to resources.
length number readonly inherited
Number of elements in array.
From class PIXI.Resource
destroyed boolean readonly inherited
If resource has been destroyed.
- Default Value:
- false
height number readonly inherited
The height of the resource.
internal boolean inherited
true
if resource is created by BaseTexture
useful for doing cleanup with BaseTexture destroy
and not cleaning up resources that were created
externally.
src string inherited
The url of the resource
valid boolean readonly inherited
Has been validated
width number readonly inherited
The width of the resource.
_height number protected inherited
Internal height of the resource.
_width number protected inherited
Internal width of the resource.
Inherited Methods
From class PIXI.AbstractMultiResource
addResourceAt (resource, index) this inherited
Set a resource by ID
Name | Type | Description |
---|---|---|
resource |
PIXI.Resource | |
index |
number |
Zero-based index of resource to set |
Returns:
Type | Description |
---|---|
this |
|
dispose () void inherited
Destroy this BaseImageResource.
load () Promise<this> inherited
Load all the resources simultaneously
Returns:
Type | Description |
---|---|
Promise<this> |
|
unbind (baseTexture) void inherited
Unset the parent base texture.
Name | Type | Description |
---|---|---|
baseTexture |
PIXI.BaseTexture |
initFromArray (resources, options) void protected inherited
Used from ArrayResource and CubeResource constructors.
Name | Type | Attributes | Description |
---|---|---|---|
resources |
Array<any> |
Can be resources, image elements, canvas, etc. , length should be same as constructor length |
|
options |
IAutoDetectOptions |
<optional> |
Detect options for resources |
From class PIXI.Resource
destroy () void inherited
Call when destroying resource, unbind any BaseTexture object before calling this method, as reference counts are maintained internally.
resize (width, height) void inherited
Trigger a resize event
Name | Type | Description |
---|---|---|
width |
number |
X dimension |
height |
number |
Y dimension |
style (_renderer, _baseTexture, _glTexture) boolean inherited
Set the style, optional to override
Name | Type | Description |
---|---|---|
_renderer |
PIXI.Renderer |
yeah, renderer! |
_baseTexture |
PIXI.BaseTexture |
the texture |
_glTexture |
PIXI.GLTexture |
texture instance for this webgl context |
Returns:
Type | Description |
---|---|
boolean |
|
update () void inherited
Has been updated trigger event.