Optional
_stateInternal state of the GameObject, do not modify, but you can pass an initial state to the GameObject (use "_state": { ...gameObject, ...newProperties})
Optional
backgroundCSS color, background color of the GameObject (only applies to polygons)
Optional
blocksArray of GameObjects that are blocked by this GameObject
Optional
boundsSet the bounds of the GameObject, by default bounds are not enabled
Optional
boundsSet to true to enable bounds, default is false
Optional
convexSet to true to make the GameObject convex, default is false
Initial coordinates of the sprite
Optional
gameOptions for the GameObject (applied to clones when cloned using GameObject.From())
Height of the sprite
Optional
hitboxSet the hitbox of the GameObject, by default hitbox is not enabled
Optional
idA unique id for the GameObject, generated automatically by default
Optional
metaAny meta data you want to store in the GameObject (Do not overwrite "label", "player", or "id" if you are using a MultiPlayerSceneManager)
Optional
physicsSet to true to enable physics, default is false
Optional
physicsOptions passed to matter.js engine
Optional
pointsSet the points of the GameObject, by default points are not enabled
Optional
squareSet to true to make the GameObject a square, default is false
Optional
typeSet the type of the GameObject, by defualt is "gameObject", "polygon", or "sprite"
Url of the image
Width of the sprite
Generated using TypeDoc
For configuring the properties of a sprite
SpriteOptions
Example