Documentation
    Preparing search index...

    Interface PhysicsSnapshot

    A solver snapshot plus the validity key §34 requires.

    §34: "Snapshots are opaque adapter data: a snapshot is valid only for the same adapter, adapter version, and world configuration that produced it", and a replay "refuses to run against a different solver". The world therefore never hands out a bare ArrayBuffer: PhysicsWorld.restoreSnapshot checks the two recorded fields before the bytes reach the adapter, which turns "restored into the wrong solver" from silent corruption into an error at the call site.

    interface PhysicsSnapshot {
        adapterName: string;
        adapterVersion: string;
        configuration?: PhysicsSnapshotConfiguration;
        data: ArrayBuffer;
    }
    Index
    adapterName: string

    PhysicsSolverAdapter.name at capture time, e.g. "rapier2d".

    adapterVersion: string

    PhysicsSolverAdapter.version at capture time.

    The world configuration the bytes were captured under (2026-08-04 — closing the recorded Phase 5 gap "world-configuration mismatch is not refused; name/version only").

    Optional because two legitimate producers cannot supply it: snapshots decoded from the §34 replay document (whose format records adapter identity, not world configuration) and captures made before the field existed. When present, PhysicsWorld.restoreSnapshot refuses a mismatch field by field; when absent, the name/version check is the whole §34 guarantee, exactly as before.

    data: ArrayBuffer

    The adapter's opaque bytes (§34).