supervision-js
    Preparing search index...

    Mask Halo

    The mask halo annotation renderer draws a soft glow around each detection's segmentation mask. The browser package maps the prepared id mask through a per-detection color palette and blurs that coverage on the GPU, so the glow hugs the exact silhouette with no per-frame CPU work and without invalidating prepared mask artifacts. Detections may request different spreads; each spread renders in its own blur pass.

    session.setPresentation({
    renderers: [
    annotationRenderers.maskHalo({
    style: {
    resolve: (detection) =>
    detection.mask
    ? { alpha: 0.6, color: 0x8b5cf6, spread: 12 }
    : undefined,
    },
    }),
    ],
    });

    Listing maskHalo without an explicit style uses the canonical class-colored glow. The halo composes with the mask renderer but does not require it: listing only maskHalo renders the glow alone while the browser package prepares the required mask coverage internally.

    spread is the blur radius in screen pixels and is honored per detection. Halos are presentation only: they are never pickable or editable, and hidden classes and detections never glow.

    See Masks for the mask renderer this halo builds on.