Skip to content

The play-helpers package

@patterkit/play-helpers is an optional companion for the JavaScript runtime that smooths common host wiring. None of it is required to play, the core Engine does everything; these just save you a little boilerplate.

  • Save/load: saveState / loadState, and serializeState / deserializeState for a string you can drop straight into localStorage or a file. See Save and load.
  • Property setters: getProperty, setProperty, and a batched setProperties(engine, { "@hp": 10, "@scene.locked": false }).
  • A state logger: createStateLogger(engine) to trace each step and diff state over time while you’re debugging.

MIT-licensed open source · Made by · patterkit.com