aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-15 07:07:40 -0700
committerAdam Soltys <[email protected]>2026-10-15 07:07:40 -0700
commitb540d3fab2579da40e0bcdb59581f83b0b742947 (patch)
tree25a5b22849765f73f721fbc77be85e9989d67279 /tools
parent63fc25dbdfef08ed599e5e639f070ccf72077492 (diff)
downloadcoinosv3-b540d3fab2579da40e0bcdb59581f83b0b742947.tar.gz
coinosv3-b540d3fab2579da40e0bcdb59581f83b0b742947.zip
Feed wheel: after a reversal the next two notches are plain, then a spin winds up again. The 700 ms spell without wind-up after a turn back (63fc25d) also covered a spin begun inside it, so correcting the direction and spinning on felt slow for most of a second (Adam, 2026-10-16: "it slows down for a while when I don't want it to"; "overall the scrolling still isn't as fast"). The calm is now a count: the reversal's next two notches don't wind the speed up — a couple of correcting notches still travel a couple of notches — and from the third the wind-up is back, so a spin after a reversal goes as far as one from rest. tools/feed-wheel-reverse-test.js (a reversal plus four quick notches goes well past five plain ones, and about as far as five from rest).
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01J1Kon8bxJoHRpJdSzshCkp
Diffstat (limited to 'tools')
-rw-r--r--tools/feed-wheel-reverse-test.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/feed-wheel-reverse-test.js b/tools/feed-wheel-reverse-test.js
index 1f133ff..632bbc6 100644
--- a/tools/feed-wheel-reverse-test.js
+++ b/tools/feed-wheel-reverse-test.js
@@ -57,9 +57,18 @@ for (const dir of [1, -1]) {
assert(calm > 540 && calm < 700, 'a reversal and a quick second notch: about two notches of travel: ' + calm); }
// From rest, well after, the wind-up is back: the same two quick notches go further.
{ f.advance(2500); const y = f.y; f.wheel(dir); f.advance(60); f.frame(); f.wheel(dir); settle(f); const s = (f.y - y) * dir; assert(s > calm + 40, 'two quick notches with the wind-up go further: ' + s + ' vs ' + calm); }
+ // A spin that keeps going after a reversal winds up again from its third
+ // notch: a reversal plus four quick notches goes well past five plain ones.
+ let spin;
+ { f.wheel(-dir); f.advance(17); f.frame(); f.wheel(-dir); f.advance(120); f.frame();
+ const y = f.y; f.wheel(dir); for (let i = 0; i < 4; i++) { f.advance(60); f.frame(); f.wheel(dir); } settle(f); spin = (f.y - y) * dir;
+ assert(spin > 5 * 300 + 150, 'a spin on after a reversal winds up again: ' + spin); }
+ // ...and the same five quick notches from rest go about as far (the two calm ones cost little).
+ { f.advance(2500); const y = f.y; f.wheel(dir); for (let i = 0; i < 4; i++) { f.advance(60); f.frame(); f.wheel(dir); } settle(f); const s = (f.y - y) * dir;
+ assert(s < spin * 1.25, 'five from rest vs five after a reversal: ' + s + ' vs ' + spin); settle(f, 200); }
// From rest a notch either way is a full push.
{ f.advance(2500); const y = f.y; f.wheel(dir); settle(f); const s = (f.y - y) * dir; assert(s > 280 && s < 330, 'from rest a notch either way is a full push: ' + s); }
// A turn back against a coast that only just died is a reversal too (caught, no wind-up).
{ f.wheel(dir); settle(f, 40); f.advance(100); const y = f.y; f.wheel(-dir); f.advance(60); f.frame(); f.wheel(-dir); settle(f); const s = (y - f.y) * dir; assert(s > 520 && s < 700, 'reversing right after the coast dies: no wind-up: ' + s); }
}
-console.log('✓ immediate reversal both ways, stale frame timestamps, busy frame recovery, a reversal is a plain notch with no wind-up for a moment');
+console.log('✓ immediate reversal both ways, stale frame timestamps, busy frame recovery, a reversal is a plain notch, two calm notches, then the wind-up is back');