Documentation
    Preparing search index...

    Interface ReplayTarget

    What the recorder (and the replay player) need from a simulation.

    PhysicsWorld satisfies this shape already; so does any application-level object that can checksum, capture, and restore itself.

    interface ReplayTarget {
        applyInput?(step: number, payload: JsonValue): void;
        checksum(): number;
        createSnapshot(): ReplaySnapshot;
        restoreSnapshot(snapshot: ReplaySnapshot): void;
    }
    Index
    • Applies one recorded external input during replay (P10-1).

      Optional so that PhysicsWorld, which has no such method, still satisfies the contract. The recorder never calls it.

      Parameters

      Returns void

    • The §33 per-step determinism checksum, as a uint32.

      Returns number

    • Captures the target's state, with the adapter identity §34 requires.

      Returns ReplaySnapshot

    • Restores a snapshot this target produced; refuses a foreign one (§34).

      Parameters

      Returns void