Class: PixiSprite

phina.pixi.PixiSprite(image, widthopt, heightopt, xopt, yopt)

new PixiSprite(image, widthopt, heightopt, xopt, yopt)

Parameters:
Name Type Attributes Description
image string | phina.pixi.PixiTexture | PIXI.Texture String should be a key name
width number <optional>
height number <optional>
x number <optional>
y number <optional>
Source:

Extends

Methods

(private) _setFrame(image) → {void}

Parameters:
Name Type Description
image phina.pixi.PixiTexture | PIXI.Sprite
Source:
Returns:
Type
void

(private) _setUpInteraction() → {void}

Add interaction event to the element (temp)
Inherited From:
Source:
Returns:
Type
void

activateInteraction() → {this}

Inherited From:
Source:
Returns:
Type
this

addChild(child) → {this}

Add child to internal Pixi container
Parameters:
Name Type Description
child PIXI.DisplayObject | phina.pixi.PixiElement
Inherited From:
Source:
Returns:
Type
this

addFilter(filter, clear) → {this}

Set PIXI.Filter to the PIXI element
Parameters:
Name Type Description
filter PIXI.Filter
clear boolean clears the filters
Inherited From:
Source:
Returns:
Type
this

clearFilter() → {this}

Inherited From:
Source:
Returns:
Type
this

getPixiChildren() → {Array}

Get all children in Pixi container
Parameters:
Type Description
void
Inherited From:
Source:
Returns:
Type
Array

removeChild(child) → {this}

Remove child from internal Pixi container
Parameters:
Name Type Description
child PIXI.DisplayObject | phina.pixi.PixiElement
Inherited From:
Source:
Returns:
Type
this

resetFrame(index, widthopt, heightopt) → {this}

set frame and update texture
Parameters:
Name Type Attributes Description
index number | object Could be a param object
width number <optional>
width of frame
height number <optional>
height of frame
Source:
Returns:
Type
this

setAlpha() → {this}

Inherited From:
Source:
Returns:
Type
this

setFilters(filters) → {this}

Set PIXI.filters with array or rest paramenter
Parameters:
Name Type Description
filters Array.<PIXI.Filter> | PIXI.Filter
Inherited From:
Source:
Returns:
Type
this

setFrameIndex(index, widthopt, heightopt) → {this}

Parameters:
Name Type Attributes Description
index number | object The index of the frame. Could be a param object
width number <optional>
width of frame
height number <optional>
height of frame
Source:
Returns:
Type
this

setImage(image, widthopt, heightopt, xopt, yopt) → {this}

Set the texture/image.
Parameters:
Name Type Attributes Description
image string | phina.pixi.PixiTexture | PIXI.Texture
width number <optional>
height number <optional>
x number <optional>
y number <optional>
Source:
Returns:
Type
this

setInteractive() → {this}

Inherited From:
Source:
Returns:
Type
this

setOrigin() → {this}

Inherited From:
Source:
Returns:
Type
this

setPosition() → {this}

Inherited From:
Source:
Returns:
Type
this

setRotation() → {this}

Inherited From:
Source:
Returns:
Type
this

setScale() → {this}

Inherited From:
Source:
Returns:
Type
this

setSize() → {this}

Inherited From:
Source:
Returns:
Type
this

setVisible() → {this}

Inherited From:
Source:
Returns:
Type
this