(now: number)
| 636 | present(target); |
| 637 | const started = performance.now(); |
| 638 | const step = (now: number) => { |
| 639 | const t = Math.min(1, (now - started) / motion.snap); |
| 640 | virtualY = from + (target - from) * ease(t); |
| 641 | update(); |
| 642 | if (t < 1) { |
| 643 | glideFrame = requestAnimationFrame(step); |
| 644 | return; |
| 645 | } |
| 646 | const done = afterGlide; |
| 647 | landGlide(); |
| 648 | done?.(); |
| 649 | }; |
| 650 | glideFrame = requestAnimationFrame(step); |
| 651 | }; |
| 652 | glide.current = glideTo; |