
This page groups the runtime management helpers that sit above raw draw/update code.
Deterministic scene lifecycle helper:
define(sceneKey, definition)register(sceneKey, definition)start(sceneKey)switchTo(sceneKey)update(dt)getState()schedule(delay, callback, options?)pauseEvent(eventId)resumeEvent(eventId)cancelEvent(eventId)getEventState(eventId)Use cases:
Important boundary:
aura.scene is still the low-level lifecycle helper.Registry-backed starters and authored projects now ship three JS-first helpers:
src/runtime/scene-flow.jssrc/runtime/screen-shell.jssrc/starter-utils/triggers.jsThese are scaffold/runtime surfaces, not new aura.* namespaces.
Use scene-flow.js when you want app-style scene handoff instead of only
manual switchTo(...) orchestration.
Committed surface:
replace(sceneId, data?)push(sceneId, data?)pop(result?)current()canPop()getState()This covers the common authored flow cases:
State snapshots use schema aurajs.scene-flow.v1.
Use screen-shell.js when you want mounted authored screens instead of
starter-local booleans for HUD, overlays, and pause/settings menus.
Committed surface:
setHud(screenId, data?)clearHud()showOverlay(screenId, data?)clearOverlay()pushModal(screenId, data?)popModal(result?)getState()This gives one explicit runtime model for:
State snapshots use schema aurajs.screen-shell.v1.
Use src/starter-utils/triggers.js when you want reusable entered/stayed/left
tracking and prompt readiness without hand-rolling previous-frame overlap
bookkeeping.
Committed helper families:
createRectTrigger2D(...)createProximityTrigger3D(...)createVolumeTrigger3D(...)createTriggerTracker(...)stepTriggerTracker(...)createInteractionPromptState(...)updateInteractionPromptState(...)State snapshots use schemas:
aurajs.trigger-tracker.v1aurajs.interaction-prompt.v1Common use cases:
For one complete authored proof, see examples/scene-flow-frontier.
Structured state export/apply helper installed by the CLI/runtime bootstrap layer.
Canonical surface:
export(options?)apply(payload, options?)diff(before, after, options?)patch(state, patchPayload, options?)Compatibility aliases:
exportState(...)applyState(...)diffState(...)patchState(...)Important notes:
aura.state is not a core Rust-host namespace install like aura.window or aura.draw2d.Use cases:
Runtime diagnostics and overlay helpers:
log(...)drawRect(...)drawCircle(...)drawText(...)showScene3dWireframe(enabled)showPhysics3dColliders(enabled)cacheStats()resetCaches()enableInspector(enabled)inspectorStats()Use cases:
Headless/conformance-only assertion helper:
assert(condition, message?)equal(actual, expected, message?)Important note:
aura.test as a test harness surface, not as a shipping gameplay runtime API.auramaxx test and conformance flows.These runtime helpers connect directly to CLI tooling:
auramaxx playauramaxx state exportauramaxx state diffauramaxx state patchauramaxx state applyauramaxx inspect exportauramaxx action schemaauramaxx action runauramaxx session state exportauramaxx session inspect exportauramaxx session action schemaauramaxx session action runauramaxx state slot save|restore|listauramaxx state checkpoint save|restore|listauramaxx dev --restore-slot <name>auramaxx dev --restore-checkpoint <name>For operator-level details, see:
docs/game-state-cli-contract-v1.mddocs/state-cli-playbook.md