Skip to main content

Function: stateToJSON()

stateToJSON(state): string

Defined in: core/StateManager.ts:184

Convert a MobjectState to a plain JSON string. Useful for persisting to localStorage or sending over the network.

Parameters

state

MobjectState

Returns

string