Class: PixiTexture

phina.pixi.PixiTexture(key)

new PixiTexture(key)

pixi用textureアセットクラス
phina Asset class wrapping.PIXI.Texture
Parameters:
Name Type Description
key string Name of the key to get this object from AssetManager properties: todo
Properties:
Name Type Description
width number
height number
Source:

Extends

  • phina.asset.Asset

Methods

(static) createFrame() → {PIXI.Texture}

static version of createFrame
Source:
Returns:
Type
PIXI.Texture

(static) fromCanvas() → {PixiTexture}

static version of fromCanvas
Source:
Returns:
Type
PixiTexture

(static) fromShape() → {PixiTexture}

static version of fromShape
Source:
Returns:
Type
PixiTexture

(private) _load(resolve) → {void}

_load returns resolve result
Parameters:
Name Type Description
resolve function
Source:
Returns:
Type
void

createFrame(xopt, yopt, widthopt, heightopt) → {PIXI.Texture}

create and return new PIXI.texture
You can set frame by passing parameters
新しいPIXI.textureを返す
矩形パラメータを渡すことでフレーム指定も可能
Parameters:
Name Type Attributes Description
x number | object <optional>
Could be a param object
y number <optional>
frame rect origin y
width number <optional>
frame rect width
height number <optional>
frame rect height
Source:
Returns:
Type
PIXI.Texture

fromCanvas(canvas) → {this}

Create new Pixi texture from HTMLcanvas
Parameters:
Name Type Description
canvas HTMLCanvasElement
Source:
Returns:
Type
this

fromShape(shape) → {this}

Create new Pixi texture from phina Shape class
Parameters:
Name Type Description
shape phina.display.Shape
Source:
Returns:
Type
this

update() → {this}

Update texture
Source:
Returns:
Type
this