Skip to main content
Version: Phaser v4.0.0-rc.6

Phaser.GameObjects.Components

Scope: static

Source: src/gameobjects/components/index.js#L7

Static functions

Static functions

Static functions

ToJSON

<static> ToJSON(gameObject)

Description:

Build a JSON representation of the given Game Object.

This is typically extended further by Game Object specific implementations.

Parameters:

nametypeoptionaldescription
gameObjectPhaser.GameObjects.GameObjectNoThe Game Object to export as JSON.

Returns: Phaser.Types.GameObjects.JSONGameObject - A JSON representation of the Game Object.

Source: src/gameobjects/components/ToJSON.js#L7
Since: 3.0.0