API

Type Alias FrameInterpolationStep

FrameInterpolationStep: (deltaSeconds: number) => boolean

Per-frame update callback driven by runFrameInterpolation. Called once per rendered frame with the frame's delta time in seconds.

Type Declaration

    • (deltaSeconds: number): boolean
    • Parameters

      • deltaSeconds: number

        Elapsed time since the previous frame, in seconds.

      Returns boolean

      true to keep interpolating next frame, or false when the goal has been reached (natural completion). To cancel the interpolation, throw — the thrown value becomes the returned promise's rejection reason.