window.kaolin
    Preparing search index...

    Interface InteractiveFpsProviderProps

    Constructor options for InteractiveFps.

    interface InteractiveFpsProviderProps {
        windowMs?: number;
        idleThresholdMs?: number;
        now?: () => number;
        tracker?: InteractiveFps;
        refreshMs?: number;
        children?: ReactNode;
    }

    Hierarchy (View Summary)

    Index

    Properties

    windowMs?: number

    Max age (ms) of frame timestamps kept in the sliding window. Defaults to 1000.

    idleThresholdMs?: number

    Gap (ms) between consecutive frames that marks the end of a render burst. Larger than the longest frame you'd expect inside a burst (≈3× frame time is a reasonable floor) but small enough to clearly separate bursts. Defaults to 500.

    now?: () => number

    Time source; injectable for tests. Defaults to performance.now.

    tracker?: InteractiveFps

    Optional externally-owned tracker. Pass when the producer of frames sits above the provider in the React tree (e.g. the viewer itself receives the WebSocket messages but wraps only its overlay in the provider). When omitted, the provider lazily creates and owns its own tracker — useful when producer and consumer live inside the same subtree.

    refreshMs?: number

    How often (ms) the provider polls the underlying tracker and re-renders consumers if the displayed value changed. Decoupled from the actual frame rate so consumers don't re-render per frame. Defaults to 250 ms.

    children?: ReactNode