Documentation
    Preparing search index...

    Interface TimeState

    The §9 time record, verbatim in field set and order.

    Every duration in this record is in SECONDS, never milliseconds. That is the one unit mistake worth guarding against: performance.now() and requestAnimationFrame both hand you milliseconds, so feeding one straight into step is the natural error, it type-checks, and it produces motion 1000x too fast rather than an exception. Each field repeats the unit because a reader meets the field, not this paragraph.

    The fields are writable because exactly one owner — the Scheduler — advances them. Everyone else receives the value as ReadonlyTimeState.

    interface TimeState {
        deltaTime: number;
        droppedTime: number;
        fixedDeltaTime: number;
        frame: number;
        interpolationAlpha: number;
        paused: boolean;
        realTime: number;
        renderTime: number;
        simulationStep: number;
        simulationTime: number;
        timeScale: number;
        unscaledDeltaTime: number;
    }
    Index
    deltaTime: number

    Scaled frame delta in SECONDS: unscaledDeltaTime * timeScale, or 0 while paused.

    droppedTime: number

    Simulation time in SECONDS discarded by the substep clamp (§9, §10).

    fixedDeltaTime: number

    Constant simulation step size in SECONDS (Appendix A default 1/60).

    frame: number

    Number of completed step calls (frames).

    interpolationAlpha: number

    Leftover-accumulator fraction in [0, 1] used to interpolate the render pose (§10, §43).

    paused: boolean

    Pause flag. Freezes the accumulator and zeroes deltaTime (§10).

    realTime: number

    Wall-clock time in SECONDS, accumulated from the injected elapsed values. Unscaled.

    renderTime: number

    Presentation clock, in SECONDS: advances by deltaTime, so it slows under timeScale and freezes while paused (§9, scaled-time domain).

    simulationStep: number

    Number of completed fixed simulation steps.

    simulationTime: number

    Deterministic physics clock, in SECONDS: advances by fixedDeltaTime per fixed step.

    timeScale: number

    Simulation time scale. Preserved across pause and resume (§10).

    unscaledDeltaTime: number

    Unscaled frame delta in SECONDS: exactly the elapsed value injected into step.