computeCloseBlend static method

double computeCloseBlend({
  1. required double rawValue,
})

SDF smooth-union strength (blur units) between the closing platter and the trigger blob.

Native retracts as one continuous teardrop: the platter tapers into a pointed neck that flows into the trigger. Ramps in over rawValue ∈ [0.97, 0.77] to _closeMaxBlend (22.0) and tapers smoothly over the final 0.16 as the slender tail is absorbed so smooth-union never bloats the waist.

Implementation

static double computeCloseBlend({required double rawValue}) {
  final u = rawValue.clamp(0.0, 1.0);
  final rampIn = _smoothstep01((0.97 - u) / 0.20);
  final rampOut = 1.0 - _smoothstep01((0.16 - u) / 0.16);
  return _closeMaxBlend * rampIn * rampOut;
}