An sprite using a loaded srpite texture created by add.sprite
reference to the render object
Parameter | Type | Description |
---|---|---|
pixi | Pixi.js object | reference to the pixi render object (internal) |
type | String | the type of the Entity |
reference to id of the render object.
Parameter | Type | Description |
---|---|---|
id | String | reference to id of the render object |
position of the render object
Parameter | Type | Description |
---|---|---|
x | Number | x coordinate of the render object |
y | Number | y coordinate of the render object |
rotation of the render object
Parameter | Type | Description | Default |
---|---|---|---|
rotation | Number | rotation of the render object | 0 |
the position and rotation point of the render object
Parameter | Type | Description | Default |
---|---|---|---|
x | Number | x coordinate of the anchor point | 0 |
y | Number | y coordinate of the anchor point | 0 |
alpha of the render object
Parameter | Type | Description | Default |
---|---|---|---|
alpha | Number | alpha of the render object | 1 |
the scale of the render object
Parameter | Type | Description |
---|---|---|
width | Number | width of the render object |
height | Number | height of the render object |
tint of the render object
Parameter | Type | Description | Default |
---|---|---|---|
tint | Hex | tint of the render object | 0xffffff |
zIndex of the render object
Parameter | Type | Description | Default |
---|---|---|---|
zIndex | Number | zIndex of the render object | 0 |
frame management of a sprite
Parameter | Type | Description |
---|---|---|
frame | Number | frame the sprite is using |
totalFrames | Number | totalFrames the sprite has |
addAnimation | Function | add an animation (name, frames, frameTime) |
deleteAnimation | Function | delete an animation (name) |
getAnimation | Function | get an animation (name) |