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) → {}
Parameters:
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
static SIDES = 6

Number of texture sides to store for CubeResources.

boolean
protected linkBaseTexture

Methods from CubeResource

Properties inherited from AbstractMultiResource

PIXI.BaseTexture
baseTexture

Bound baseTexture, there can only be one.

Array<number>
itemDirtyIds
Array<PIXI.BaseTexture>
items
number
length

Number of elements in array.

Properties inherited from Resource

boolean
destroyed = false
number
height
boolean
internal
string
src

The url of the resource

boolean
valid
number
width
number
protected _height

Internal height of the resource.

number
protected _width

Internal width of the resource.

Methods inherited from AbstractMultiResource

Methods inherited from Resource

void
destroy()
void
resize(width: number, height: number)
boolean
style(_renderer: PIXI.Renderer, _baseTexture: PIXI.BaseTexture, _glTexture: PIXI.GLTexture)
void
update()

Has been updated trigger event.

Public Properties


SIDES CubeResource.ts:172
static SIDES: number = 6

Number of texture sides to store for CubeResources.

Protected Properties


linkBaseTexture CubeResource.ts:29
protected linkBaseTexture: boolean

In case BaseTextures are supplied, whether to use same resource or bind baseTexture itself.

Public Methods


test CubeResource.ts:175
static test(source: unknown) → {boolean}

Used to auto-detect the type of resource.

Parameters:
Name Type Description
source unknown

The source object

Returns:
Type Description
boolean

true if source is an array of 6 elements

bind CubeResource.ts:74
bind(baseTexture: PIXI.BaseTexture) → {void}

Add binding.

Parameters:
Name Type Description
baseTexture PIXI.BaseTexture

parent base texture

Returns:
Type Description
void
upload CubeResource.ts:130
upload(renderer: PIXI.Renderer, _baseTexture: PIXI.BaseTexture, glTexture: PIXI.GLTexture) → {boolean}

Upload the resource

Parameters:
Name Type Description
renderer PIXI.Renderer
_baseTexture PIXI.BaseTexture
glTexture PIXI.GLTexture
Returns:
Type Description
boolean

true is success


Powered by webdoc!