aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-09 00:45:34 -0700
committerAdam Soltys <[email protected]>2026-10-09 00:45:34 -0700
commit806337899029f08bd71fc27be5537e7cc4d590ce (patch)
tree6fa0c518c80e3085adbb65caf32845382315afdc /src
parentff3bc36f3bc33974b453f114fe8f29ebc0615370 (diff)
downloadcoinosv3-806337899029f08bd71fc27be5537e7cc4d590ce.tar.gz
coinosv3-806337899029f08bd71fc27be5537e7cc4d590ce.zip
Feed scrolls faster on a desktop: a wheel notch pushes a quarter further, and a grab-and-flick throws twice as hard with a higher top speed
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/app.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/app.js b/src/app.js
index 537ba0d..5d7d22b 100644
--- a/src/app.js
+++ b/src/app.js
@@ -6388,7 +6388,7 @@ if (INTENT_URI) {
if (typeof window === 'undefined' || matchMedia('(prefers-reduced-motion: reduce)').matches) return;
const SCOPE = '.feed-page, .notes-feed';
const TAU = 325; // ms: how quickly a coast dies down (the phone's feel)
- const VMAX = 9; // px/ms
+ const VMAX = 16; // px/ms
const inScope = (t) => {
const el = t && t.closest ? t : t && t.parentElement;
if (!el || !el.closest(SCOPE)) return false;
@@ -6430,7 +6430,7 @@ if (INTENT_URI) {
const px = e.deltaMode === 1 ? e.deltaY * 40 : e.deltaY;
// reverse turns brake first; same-way turns add to the coast already going
const keep = Math.sign(v) === Math.sign(px) ? v : 0;
- coast(keep + (px * 2.4) / TAU);
+ coast(keep + (px * 3) / TAU);
}, { passive: false });
// anything else that moves the page takes over from a coast
window.addEventListener('keydown', (e) => { if (/^(Arrow|Page|Home|End| )/.test(e.key)) stop(); });
@@ -6469,7 +6469,7 @@ if (INTENT_URI) {
document.documentElement.classList.remove('grab-scrolling');
const p = d.pts, a = p[0], b = p[p.length - 1];
// released while moving: throw it; held still first: just let go
- if (a && b && b[0] > a[0] && e.timeStamp - b[0] < 60) coast((a[1] - b[1]) / (b[0] - a[0]) * 1.2);
+ if (a && b && b[0] > a[0] && e.timeStamp - b[0] < 60) coast((a[1] - b[1]) / (b[0] - a[0]) * 2.4);
}
// the press moved: what it started on isn't opened (Chrome still clicks it)
const eat = (ev) => { ev.stopPropagation(); ev.preventDefault(); };