Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
source |
number | Array.<*> |
Number of items in array or the collection of image URLs to use. Can also be resources, image elements, canvas, etc. |
|||||||||
options |
object |
optional
Options to apply to PIXI.resources.autoDetectResource
|
Extends
Members
-
_height number protected inherited
-
Internal height of the resource
-
_width number protected inherited
-
Internal width of the resource
-
destroyed boolean readonly inherited
-
If resource has been destroyed
- Default Value:
- false
-
height number readonly inherited
-
The height of the resource.
-
Dirty IDs for each part
-
items Array.<PIXI.BaseTexture> readonly
-
Collection of resources.
-
Number of elements in array
-
onResize Runner inherited
-
Mini-runner for handling resize events
-
onUpdate Runner inherited
-
Mini-runner for handling update events
-
valid boolean readonly inherited
-
Has been validated
-
width number readonly inherited
-
The width of the resource.
Methods
-
addResourceAt (resource, index)PIXI.resources.ArrayResource
-
Set a resource by ID
Name Type Description resource
PIXI.resources.Resource index
number Zero-based index of resource to set
Returns:
Type Description PIXI.resources.ArrayResource Instance for chaining -
Bind to a parent BaseTexture
Name Type Description baseTexture
PIXI.BaseTexture Parent texture
-
destroy () inherited
-
Call when destroying resource, unbind any BaseTexture object before calling this method, as reference counts are maintained internally.
-
Clean up anything, this happens when destroying is ready.
-
This can be overriden to start preloading a resource or do any other prepare step.
Returns:
Type Description Promise Handle the validate event -
resize () inherited
-
Trigger a resize event
-
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.glCore.Texture texture instance for this webgl context
Returns:
Type Description boolean true
is success -
Unbind to a parent BaseTexture
Name Type Description baseTexture
PIXI.BaseTexture Parent texture
-
update () inherited
-
Has been updated trigger event
-
upload (renderer, texture, glTexture) overrides
-
Upload the resources to the GPU.
Name Type Description renderer
PIXI.Renderer texture
PIXI.BaseTexture glTexture
PIXI.glCore.Texture