fast-mesh-wasm
    Preparing search index...

    Function contactHeatmap

    • A contact heatmap: spread it into a colouring with its target, store.setDisplay(a, { coloring: { distanceTo: b, ...contactHeatmap({ depth, gap }) } }).

      The range is [-depth, gap] (below clamps to deep, above shows the base colour). From -depth the colour runs from deep to shallow just below the contact band, is contact across [-tolerance, +tolerance] (a single stop at 0 when the tolerance is 0), then runs from near just above the band to far at gap. With gap 0 there is no gap ramp: the range is [-depth, tolerance] and anything beyond the band shows the base colour. A change of tolerance or colors alone keeps maxDistance and sign, so the store reuses its field and only recolours.

      Parameters

      Returns Omit<DistanceColoring, "distanceTo">

      INVALID_ARGUMENT unless depth > 0, gap >= 0 (both finite) and 0 ≤ tolerance < min(depth, gap) (< depth when gap is 0).