- Adventure — explore a world with held movement, look, and interaction controls.
- Directing — steer a story with text instructions, pause, resume, and rewind.
@reactor-models/happy-oyster SDK. It
provides the HappyOysterModel class, React bindings, world lifecycle methods, live controls, and
the <HappyOysterVideo> element.
At a glance
Install
- npm
- pnpm
Choose an experience
Usemode: "adventure" for movement controls or mode: "directing" for text steering. Set it
before connecting:
key.
World lifecycle
A session has one current world. Worlds persist after a session ends, so save theencrypted_world_id returned by createWorld() and use attachWorld() to return later.
connect()opens the Reactor session and synchronizes the firstworldStatesnapshot.createWorld(params)builds a new world for the client’s selected mode.attachWorld(encryptedWorldId)reopens an existing world of the same mode.startTravel()begins the live world stream and reports how long that stream may run.- Adventure uses
move,look,interact,release, andstop. - Directing uses
instruct,pause,resume, andrewind.
startTravel() reports an Adventure travel’s granted
length as maxExperienceTimeSec, readable on the client and from useHappyOyster(). The
startTravel reference covers both.
The model publishes authoritative worldState and travelState snapshots. Drive UI from those
snapshots instead of reconstructing state from individual calls.
Quick start
The fastest path to a working HappyOyster app is thecreate-reactor-app CLI, which scaffolds a
runnable project for you. You can also clone the
open-source reference frontend
directly, or follow the tutorial for a guided
walkthrough.