supervision-js
    Preparing search index...

    Interface RenderPreparationMaskFrameOptions

    Options for preparing frame-level raster artifacts. Polygon frames reuse this bounded worker/cache policy so both dense geometry paths stay ahead of playback without duplicating scheduling controls.

    interface RenderPreparationMaskFrameOptions {
        display?: {
            boxHeight: number;
            boxWidth: number;
            devicePixelRatio: number;
            maxDevicePixelRatio?: number;
        };
        previewScale?: number;
        maxCacheFrameCount?: number;
        maxCacheBytes?: number;
        maxPendingFrameCount?: number;
        prefetchFrameCount?: number;
        scheduleBatchSize?: number;
        scanIntervalSeconds?: number;
        workerCount?: number;
    }
    Index
    display?: {
        boxHeight: number;
        boxWidth: number;
        devicePixelRatio: number;
        maxDevicePixelRatio?: number;
    }

    The box the host paints prepared masks into, in CSS pixels, with the pixel ratio it paints them at. A mask frame's id raster is then capped to the size that box can show; absent, it is cooked at the detections' own resolution. Exact depth frames the box cannot show at least twice over go up to the GPU decimated by that whole factor; readouts still read every sample.

    previewScale?: number

    Scale of the display-fitted width cap for previews during rapid movement. Default: 0.5. Rasters never exceed native mask dimensions. Positive values up to 1 are accepted; invalid values use the default. A value of 1 keeps the full display-fitted resolution during motion. Once motion settles, the visible frame uses the full fitted resolution. Without a display box, masks keep their native resolution.

    maxCacheFrameCount?: number

    Maximum number of prepared mask frames retained in memory.

    maxCacheBytes?: number

    Byte budget for retained prepared mask payloads and reserved renderer backing, including exact region coverage. Values below 16 MiB are raised to 16 MiB. This budget and maxCacheFrameCount both trigger eviction; the active frame remains protected even when it exceeds the budget. Transient preparation allocations and unrelated renderer resources are excluded. Default: 64 MiB per reported GB of device memory, clamped to 256 MiB–1 GiB; 256 MiB when unavailable.

    maxPendingFrameCount?: number

    Maximum number of mask frames queued for preparation.

    prefetchFrameCount?: number

    Target number of frames to prepare ahead of playback.

    scheduleBatchSize?: number

    Number of frames scheduled per preparation scan.

    scanIntervalSeconds?: number

    How often the prepared window scans for refill work.

    workerCount?: number

    Worker count for mask artifact preparation.