computeBlendAttenuation static method
Computes the SDF blend attenuation factor for a given scale ratio.
Returns 1.0 (full blend) when scaleDelta <= 3.0 — small menus and
controls where the teardrop neck should be fully visible. For larger
ratios, the blend is attenuated inversely to prevent excessive SDF
merging that would fill the whole viewport.
Clamped to a floor of 0.2 so the teardrop bridge never fully
disappears.
Implementation
static double computeBlendAttenuation(double scaleDelta) {
if (scaleDelta <= 3.0) return 1.0;
return (3.0 / scaleDelta).clamp(0.2, 1.0);
}