Documentation
    Preparing search index...

    Interface ReplayRecording

    A complete §34 replay document — the P10-2 envelope.

    Directly JSON.stringify-able: every field is JSON already, with the two binary blobs base64-encoded. Absent optionals are absent keys, never null.

    interface ReplayRecording {
        adapterName: string;
        adapterVersion: string;
        finalChecksum: number;
        fixedDeltaTime: number;
        formatVersion: number;
        frames: readonly ReplayFrameRecord[];
        initialSnapshot: string;
        inputs: readonly ReplayInputRecord[];
        metadata?: { readonly [key: string]: JsonValue };
        periodicSnapshots?: readonly ReplaySnapshotRecord[];
        seed?: number;
        worldConfiguration?: JsonValue;
    }

    Hierarchy (View Summary)

    Index
    adapterName: string

    PhysicsSolverAdapter.name, e.g. "rapier2d".

    adapterVersion: string

    PhysicsSolverAdapter.version.

    finalChecksum: number

    The §33 checksum of the target when recording ended, as a uint32.

    fixedDeltaTime: number

    The fixed simulation step, in seconds (§10).

    formatVersion: number

    The lowest format version that can express this document — 2 when it carries a ReplayRecording.worldConfiguration, MINIMUM_REPLAY_FORMAT_VERSION otherwise. This is not always LATEST_REPLAY_FORMAT_VERSION, which is only the upper bound this build can reach.

    frames: readonly ReplayFrameRecord[]

    One entry per recorded frame, in order (§10).

    initialSnapshot: string

    The solver's state before step 0, base64.

    inputs: readonly ReplayInputRecord[]

    External inputs in recorded (insertion) order; steps non-decreasing.

    metadata?: { readonly [key: string]: JsonValue }

    Free-form caller data — a scenario name, a build id, a date the caller supplied. Nothing in this package reads a clock (§33).

    periodicSnapshots?: readonly ReplaySnapshotRecord[]

    Mid-run snapshots, if the recorder was asked for them; steps ascending.

    seed?: number

    Seed of the run's RNG (§33), when the caller supplied one.

    worldConfiguration?: JsonValue

    The world configuration the run was captured under — §34's "solver settings" (2026-08-06, PH-6).

    Whatever the target put on ReplaySnapshot.configuration at ReplayRecorder.begin. For a PhysicsWorld that is its PhysicsSnapshotConfiguration: dimension, resolved gravity, resolved §32 sleeping, §33 determinism tier, and §28 solver iterations when set — every field of which changes what stepping the restored bytes produces.

    Opaque here. This module validates it as JSON and carries it; it never reads a field. ReplayPlayer re-attaches it to every snapshot it restores, and the solver decides whether it matches — PhysicsWorld.restoreSnapshot refuses a mismatch field by field, which is the §34 refusal this format previously could not reach.

    Absent when the target supplied none, which is every recording made before this field existed and every target that does not report a configuration. An absent configuration restores exactly as it always did: the adapter name/version check is then the whole §34 guarantee.