new IsoSprite(game, x, y, z, key, frame)
Parameters:
Name | Type | Description |
---|---|---|
game |
Phaser.Game | A reference to the currently running game. |
x |
number | The x coordinate (in 3D space) to position the IsoSprite at. |
y |
number | The y coordinate (in 3D space) to position the IsoSprite at. |
z |
number | The z coordinate (in 3D space) to position the IsoSprite at. |
key |
string | Phaser.RenderTexture | Phaser.BitmapData | PIXI.Texture | This is the image or texture used by the IsoSprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. |
frame |
string | number | If this IsoSprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. |
- Source:
Extends
- Phaser.Sprite
Members
-
<readonly> depth
-
The non-unit distance of the IsoSprite from the 'front' of the scene. Used to correctly depth sort a group of IsoSprites.
- Source:
Properties:
Name Type Description depth
number A calculated value used for depth sorting.
-
<readonly> isoBounds
-
A Cube object representing the derived boundsof the IsoSprite.
- Source:
Properties:
Name Type Description isoBounds
Point3 The derived 3D bounds of the IsoSprite.
-
<readonly> isoPosition
-
A Point3 object representing the axonometric position of the IsoSprite.
- Source:
Properties:
Name Type Description isoPosition
Point3 The axonometric position of the IsoSprite.
-
isoX
-
The axonometric position of the IsoSprite on the x axis. Increasing the x coordinate will move the object down and to the right on the screen.
- Source:
Properties:
Name Type Description isoX
number The axonometric position of the IsoSprite on the x axis.
-
isoY
-
The axonometric position of the IsoSprite on the y axis. Increasing the y coordinate will move the object down and to the left on the screen.
- Source:
Properties:
Name Type Description isoY
number The axonometric position of the IsoSprite on the y axis.
-
isoZ
-
The axonometric position of the IsoSprite on the z axis. Increasing the z coordinate will move the object directly upwards on the screen.
- Source:
Properties:
Name Type Description isoZ
number The axonometric position of the IsoSprite on the z axis.
-
snap
-
- Default Value:
-
- 0
- Source:
Properties:
Name Type Description snap
number Snap this IsoSprite's position to the specified value; handy for keeping pixel art snapped to whole pixels.
-
<readonly> type
-
- Source:
Properties:
Name Type Description type
number The const type of this object.
Methods
-
postUpdate()
-
Internal function called by the World postUpdate cycle.
- Source: