PIXI.CubeResource
class CubeResource extends PIXI.AbstractMultiResource
Resource for a CubeTexture which contains six resources.
Constructor
new PIXI.CubeResource(source: Array<string | PIXI.Resource>, options: ICubeResourceOptions) → {}
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 | ICubeResourceOptions |
<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 |
Summary
Properties from CubeResource
number |
Number of texture sides to store for CubeResources. |
boolean |
|
Methods from CubeResource
boolean |
|
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 |
|
this |
|
void |
Destroy this BaseImageResource. |
Promise<this> |
|
void |
|
void |
|
Methods inherited from Resource
void |
|
void |
|
boolean |
|
void |
Has been updated trigger event. |
Public Properties
static SIDES: number = 6
Number of texture sides to store for CubeResources.
Protected Properties
protected linkBaseTexture: boolean
In case BaseTextures are supplied, whether to use same resource or bind baseTexture itself.
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 |
|
bind(baseTexture: PIXI.BaseTexture) → {void}
Add binding.
Name | Type | Description |
---|---|---|
baseTexture | PIXI.BaseTexture |
parent base texture |
Type | Description |
---|---|
void |
upload(renderer: PIXI.Renderer, _baseTexture: PIXI.BaseTexture, glTexture: PIXI.GLTexture) → {boolean}
Upload the resource
Name | Type | Description |
---|---|---|
renderer | PIXI.Renderer | |
_baseTexture | PIXI.BaseTexture | |
glTexture | PIXI.GLTexture |
Type | Description |
---|---|
boolean |
true is success |