GET /snapshot
Since 0.6
Response
Response: WorldStateView
Everything needed to restore the world to this frame.
| Field | Type | Present | Description |
|---|---|---|---|
frame | integer | always | The frame this state was captured at. |
time | number | always | Simulated seconds since the scene loaded. frame multiplied by the fixed timestep; carried so a snapshot lines up with the time on an event without the client doing arithmetic. |
rng_seed | integer | always | The deterministic RNG seed in effect. |
entities | EntityStateView[] | always | Every entity's restorable state. |
hud | Props | always | HUD fields the scene's hud components are showing. Values are strings or numbers; a field with no value is omitted rather than set to null. |
goals | GoalStateView[] | always | Goal progress, in declaration order. |
opaque | OpaqueState | sometimes | Solver state the physics backend cannot rebuild from transforms and velocities alone — contact islands, sleeping flags, warm-start impulses. |
session_paused | boolean | sometimes | Whether ctx.session.pause() was holding the world. Absent when it was not. A held world counts frames without advancing time, so a capture taken after a pause has time behind frame × the timestep, and a restore keeps that time rather than recomputing it. |
Response: EntityStateView
One entity's restorable state.
| Field | Type | Present | Description |
|---|---|---|---|
id | string | always | The entity's stable scene id. |
name | string | always | Human-readable label, so a snapshot reads without a second call to /entities. |
tags | Tags | sometimes | Scene tags. Omitted when the entity has none. |
position | number[3] | always | World-space position. |
rotation | number[4] | always | World-space rotation, [x, y, z, w]. |
scale | number[3] | always | Local scale. |
velocity | Velocity | sometimes | Linear and angular velocity. Absent for an entity with no rigid body, which is not the same thing as a rigid body at rest. |
script | ScriptStateView | sometimes | The behavior's ctx.state, if it has one. |
anim | AnimStateView | sometimes | Animator playhead, if it has one. |
overrides | { string: Props } | sometimes | What a behavior has written over this entity's components with entity.set, by component type. Omitted for an entity nothing has written to, which is almost all of them. |
reparent | ReparentView | sometimes | Where a behaviour moved this entity with entity.setParent, when that is not the parent the scene gave it. Omitted for every entity still where the scene put it; a restore that omits it puts the entity back under the scene's parent. |
Response: AnimStateView
One animator's restorable playhead.
| Field | Type | Present | Description |
|---|---|---|---|
state | string | always | Current state machine state. |
time | number | always | Playhead in seconds. |
Response: ReparentView
A behaviour's reparent, as a snapshot carries it: the new parent's scene id, or null for the top of the scene.
| Field | Type | Present | Description |
|---|---|---|---|
parent | string | sometimes | The parent's scene id; null when the entity was moved to the top of the scene. |
Response: ScriptStateView
One behavior's restorable ctx.state.
| Field | Type | Present | Description |
|---|---|---|---|
module | string | always | The module specifier. |
state | Props | always | ctx.state. Always an object. |
Response: Velocity
Linear and angular velocity in world space.
| Field | Type | Present | Description |
|---|---|---|---|
linear | number[3] | always | Metres per second, [x, y, z]. |
angular | number[3] | always | Radians per second about each world axis, [x, y, z]. |
Response: GoalStateView
One goal's progress.
| Field | Type | Present | Description |
|---|---|---|---|
id | string | always | The goal's authored id, from its goal component. |
labelKey | string | always | The string-table key for the goal's display text. |
order | integer | sometimes | Declaration order, when the goal component gives one. |
reached | boolean | always | Whether the goal has been reached. |
at_frame | integer | sometimes | The frame it was reached on. Absent while it has not been. |
Response: OpaqueState
Backend state a snapshot carries but nothing outside the backend interprets.
| Field | Type | Present | Description |
|---|---|---|---|
backend | string | always | Which backend wrote this, e.g. rapier3d. A snapshot is only restorable into the same one. |
version | integer | always | The backend's format version. A mismatch means the blob cannot be restored. |
data | string | always | The blob, base64. |
Example
curl "http://127.0.0.1:7700/snapshot"
Start a server with argus run --serve; the port is --port (7700 by default). The request and response fields are in the query API guide.