summaryrefslogtreecommitdiff
path: root/src/pdf_view.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 06:41:28 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:16 -0300
commitff252345bc3e1edc1aee93ca826f294bf9a7874f (patch)
tree61c8d8ff2a13e7ceca77d439eeff8edc41fa644c /src/pdf_view.zig
parent09ec515c5e94de741104038cd61f18b2b997e78c (diff)
downloadpardes-ff252345bc3e1edc1aee93ca826f294bf9a7874f.tar.gz
pardes-ff252345bc3e1edc1aee93ca826f294bf9a7874f.zip
G6: a wheel's notch scrolls the core at once and the picture glides after it
A mouse wheel's notch (SDL's whole-number step, notchOf) scrolls the core by its lines at once, so keys and clicks act where the text is, and the picture follows on the Motion flavour's spring at half again its pace, critically damped whatever the flavour (text never passes its mark), carried from its current speed (animation.Spring.carry), so notches in a row flow on. How far the rows moved is measured on the next frame against the last (Glide.measure: a wrapped line's rows, a terminal's output, with a couple of rows' slack for the cursor's line and its number); the rows that left are kept, nearest first, and drawn in the gap the lag opens; the lag is never more than the body's height. A touchpad's fractions move the picture under the finger as before; `Motion off` lands a notch at once; a PDF page scrolls as before. The glide runs on the core's continuous path: Pardes.shell_continuous keeps frames coming every loop while it moves and carries a virtual clock with it; idle, nothing. The test feed takes wheel events (ESC]777;mouse;wheel;<amount>;<x>;<y>BEL). Tests: notch vs fraction; a carried spring keeps its speed and never passes its mark; a notch over two-row lines lags two rows, keeps the rows that left, settles frame by frame and leaves the continuous path, and lands at once with Motion off. Gates as G5. Feel review: .scratch/render/scroll/glide-{smooth,crisp,bouncy,off}{,-quarter}.mp4 and strips (a notch down, three, then two up).
Diffstat (limited to 'src/pdf_view.zig')
0 files changed, 0 insertions, 0 deletions