Function floating

    • Dragology's withFloating: while held, pos follows the pointer directly (via the robust drag wiring — grab offset, touch, capture); on release it springs to home (the resolved target, e.g. a closest snap position or a layout slot). pos is the caller-owned display cell the shape renders from.

       const pos = vec(home.peek());
       const dot = s(circle(pos, 10));
       const { anim } = floating(dot, pos, home);
       this.anim.start(anim);
      

      While dragging, the settle spring is frozen (rate 0) so it never fights the pointer; on release it re-engages and eases pos home.

      Parameters

      Returns FloatingResult