Commit 0dd35c6
committed
feat(core): tame pinch zoom inertia on touch lift
The post-pinch inertia projection is intact but no longer kicks the
camera past the user's gesture when the final frame is noisy:
- Cap the velocity that drives the projection (0.005 log2(scale)/ms).
A spike on the lift frame can't translate into a runaway zoom.
- Halve both the forward-projected distance and the inertia transition
duration so the post-lift glide is soft instead of abrupt. This is
most noticeable on touch where the last frame is usually the noisiest.
Behavior unchanged for slow/steady pinches whose velocity stays below
the cap; faster pinches still get inertia, just gentler.1 parent 48760d5 commit 0dd35c6
2 files changed
Lines changed: 58 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
23 | 31 | | |
24 | 32 | | |
25 | 33 | | |
| |||
696 | 704 | | |
697 | 705 | | |
698 | 706 | | |
699 | | - | |
700 | | - | |
701 | | - | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
702 | 718 | | |
703 | 719 | | |
704 | 720 | | |
705 | 721 | | |
706 | 722 | | |
707 | 723 | | |
708 | | - | |
| 724 | + | |
709 | 725 | | |
710 | 726 | | |
711 | 727 | | |
| |||
715 | 731 | | |
716 | 732 | | |
717 | 733 | | |
718 | | - | |
| 734 | + | |
719 | 735 | | |
720 | 736 | | |
721 | 737 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
38 | 75 | | |
39 | 76 | | |
40 | 77 | | |
| |||
0 commit comments