Documentation
    Preparing search index...

    Interface ReplayPlayerOptions

    How a ReplayPlayer is wired to the host that owns the simulation.

    interface ReplayPlayerOptions {
        maximumSubSteps?: number;
        onStep?: ReplayStepListener;
        stepFn: (fixedDeltaTime: number) => void;
        target: ReplayTarget;
        verifyChecksums?: boolean;
    }
    Index
    maximumSubSteps?: number

    Clamp on fixed steps per ReplayPlayer.advanceRealtime call (§10). An integer >= 1; default DEFAULT_REPLAY_MAXIMUM_SUB_STEPS.

    Initial value of ReplayPlayer.onStep.

    stepFn: (fixedDeltaTime: number) => void

    Advances the host's world by exactly one fixed step.

    Called with the recording's fixedDeltaTime (seconds) so the closure does not have to close over it, and called once per replayed step — never with a variable delta, never twice for one step. See the module note for why the player asks for this instead of driving a scheduler.

    target: ReplayTarget

    The simulation to replay into: it restores the recorded snapshots, receives the recorded inputs, and reports the §33 checksum.

    verifyChecksums?: boolean

    Initial value of ReplayPlayer.verifyChecksums. Default false.