new PIXI.CubeResource (source, options) overrides
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
source |
Array<string | PIXI.Resource> |
<optional> |
Collection of URLs or resources to use as the sides of the cube. |
|
options |
object |
<optional> |
ImageResource options |
|
options.width |
number |
<optional> |
Width of resource |
|
options.height |
number |
<optional> |
Height of resource |
|
options.autoLoad |
number |
<optional> |
true |
Whether to auto-load resources |
options.linkBaseTexture |
number |
<optional> |
true |
In case BaseTextures are supplied, whether to copy them or use |
Extends
Members
Number of texture sides to store for CubeResources
- Default Value:
- 6
In case BaseTextures are supplied, whether to use same resource or bind baseTexture itself
Methods
Used to auto-detect the type of resource.
Name | Type | Description |
---|---|---|
source |
object |
The source object |
Returns:
Type | Description |
---|---|
boolean | true if source is an array of 6 elements |
bind (baseTexture) void overrides
Add binding
Name | Type | Description |
---|---|---|
baseTexture |
PIXI.BaseTexture |
parent base texture |
upload (renderer, _baseTexture, glTexture) boolean overrides
Upload the resource
Name | Type | Description |
---|---|---|
renderer |
PIXI.Renderer | |
_baseTexture |
PIXI.BaseTexture | |
glTexture |
PIXI.GLTexture |
Returns:
Type | Description |
---|---|
boolean | true is success |
Inherited Properties
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.
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
internal boolean protected inherited
true
if resource is created by BaseTexture
useful for doing cleanup with BaseTexture destroy
and not cleaning up resources that were created
externally.
Inherited Methods
From class PIXI.ArrayResource
addBaseTextureAt (baseTexture, index) PIXI.ArrayResource inherited
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 |
---|---|
PIXI.ArrayResource | Instance for chaining |
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 | true is success |
unbind (baseTexture) void inherited
Unbind to a parent BaseTexture
Name | Type | Description |
---|---|---|
baseTexture |
PIXI.BaseTexture |
Parent texture |
update () void inherited
Has been updated trigger event
dispose () void protected inherited
Clean up anything, this happens when destroying is ready.
load () Promise<void> protected inherited
This can be overridden to start preloading a resource or do any other prepare step.
Returns:
Type | Description |
---|---|
Promise<void> | Handle the validate event |