G-code Preview — API Reference
    Preparing search index...

    What the controller needs from its owner: set a pixel ratio and request a render. The optional members default sensibly: getPixelRatio → 1, requestFrame/cancelFrame → the global requestAnimationFrame/cancelAnimationFrame. With no frame scheduler available the factor stays at its proactive value for the whole gesture (no adaptation). A supplied requestFrame is only ever cancelled through cancelFrame (never the global one — its handles are foreign); without cancelFrame, a late tick from a stopped sampler is ignored (it carries a stale generation).

    interface InteractionQualityDeps {
        cancelFrame?(handle: number): void;
        getPixelRatio?(): number;
        render(): void;
        requestFrame?(cb: (timestampMs: number) => void): number;
        setPixelRatio(ratio: number): void;
    }
    Index
    • Schedule cb for the next animation frame with a millisecond timestamp; returns a handle.

      Parameters

      • cb: (timestampMs: number) => void

      Returns number