API

Function runFrameInterpolation

  • Drive a per-frame interpolation from a scene's render loop until it completes, is canceled via the abort signal, or the step throws. This owns the scene._beforeRender registration and guarantees the callback is detached on every exit path (completion, cancellation, or error). It is entity-agnostic — it knows nothing about cameras or transforms.

    Parameters

    • scene: SceneContext

      The scene whose render loop advances the interpolation.

    • step: FrameInterpolationStep

      The per-frame update. Return false to finish; throw to cancel.

    • Optionalsignal: AbortSignal

      Optional abort signal. When it aborts, the loop is detached and the returned promise rejects with the signal's reason. If it is already aborted, step never runs.

    Returns Promise<void>

    A promise that resolves when step returns false (completed) and rejects if step throws or the signal aborts.