Phaser API Documentation

  Version: 
Filter
This is a beta release of our new docs system. Found an issue?
Please tell us about it in the #📖-newdocs-feedback channel on the Phaser Discord
Namespace: GameObjects
Phaser.Types.GameObjects

Namespace

Type Definitions

Face
Focus
Focus
Properties:
name type description
vertex1 Phaser.Types.GameObjects.Vertex

The first face vertex.

vertex2 Phaser.Types.GameObjects.Vertex

The second face vertex.

vertex3 Phaser.Types.GameObjects.Vertex

The third face vertex.

isCounterClockwise boolean

Are the vertices counter-clockwise?

Type:
object
Since: 3.50.0
Focus
Focus
GameObjectConfig
Focus
Focus
Properties:
name type arguments Default description
x number | object <optional> 0

The x position of the Game Object.

y number | object <optional> 0

The y position of the Game Object.

depth number <optional> 0

The depth of the GameObject.

flipX boolean <optional> false

The horizontally flipped state of the Game Object.

flipY boolean <optional> false

The vertically flipped state of the Game Object.

scale number | object <optional> null

The scale of the GameObject.

scrollFactor number | object <optional> null

The scroll factor of the GameObject.

rotation number | object <optional> 0

The rotation angle of the Game Object, in radians.

angle number | object <optional> null

The rotation angle of the Game Object, in degrees.

alpha number | object <optional> 1

The alpha (opacity) of the Game Object.

origin number | object <optional> null

The origin of the Game Object.

scaleMode number <optional> ScaleModes.DEFAULT

The scale mode of the GameObject.

blendMode number <optional> BlendModes.DEFAULT

The blend mode of the GameObject.

visible boolean <optional> true

The visible state of the Game Object.

add boolean <optional> true

Add the GameObject to the scene.

Type:
object
Since: 3.0.0
Focus
Focus
GetCalcMatrixResults
Focus
Focus
Properties:
name type description
camera Phaser.GameObjects.Components.TransformMatrix

The calculated Camera matrix.

sprite Phaser.GameObjects.Components.TransformMatrix

The calculated Sprite (Game Object) matrix.

calc Phaser.GameObjects.Components.TransformMatrix

The calculated results matrix, factoring all others in.

Type:
object
Focus
Focus
JSONGameObject
Focus
Focus
Properties:
name type description
name string

The name of this Game Object.

type string

A textual representation of this Game Object, i.e. sprite.

x number

The x position of this Game Object.

y number

The y position of this Game Object.

scale object

The scale of this Game Object

scale.x number

The horizontal scale of this Game Object.

scale.y number

The vertical scale of this Game Object.

origin object

The origin of this Game Object.

origin.x number

The horizontal origin of this Game Object.

origin.y number

The vertical origin of this Game Object.

flipX boolean

The horizontally flipped state of the Game Object.

flipY boolean

The vertically flipped state of the Game Object.

rotation number

The angle of this Game Object in radians.

alpha number

The alpha value of the Game Object.

visible boolean

The visible state of the Game Object.

scaleMode number

The Scale Mode being used by this Game Object.

blendMode number | string

Sets the Blend Mode being used by this Game Object.

textureKey string

The texture key of this Game Object.

frameKey string

The frame key of this Game Object.

data object

The data of this Game Object.

Type:
object
Since: 3.0.0
Focus
Focus
Vertex
Focus
Focus
Properties:
name type description
x number

The x coordinate of the vertex.

y number

The y coordinate of the vertex.

z number

The z coordinate of the vertex.

normalX number

The x normal of the vertex.

normalY number

The y normal of the vertex.

normalZ number

The z normal of the vertex.

u number

UV u texture coordinate of the vertex.

v number

UV v texture coordinate of the vertex.

alpha number

The alpha value of the vertex.

Type:
object
Since: 3.50.0
Focus
Focus