The wheel zoomed smoothly and fit computed any factor, so the scene
view almost never showed pixel art with even texels. Under Windows
scaling even zoom 1 was off. The zoom now only takes steps that give
every texel the same number of screen pixels.
- The zoom counts device pixels per world pixel. freeView divides by
the renderer resolution, so zoom 1 is one screen pixel per texel.
- FREE_ZOOM_STEPS: 1/8, 1/4, 1/2, then 1 to 6, 8, 12, 16 and 24.
- The wheel moves one step per notch. A trackpad collects its travel
and steps every 50 px.
- Fit rounds down to the next step. A saved zoom from before snaps to
the nearest step on a log scale.
- Pan, drag, grid and resize use CSS pixels per world unit, so they
still follow the pointer under Windows scaling.
- Always on, no toggle, as decided in the session.
Tests:
- 4 unit tests: zoom 1 at 125%, whole steps, wheel steps and ends, fit
rounding and snapping of a saved zoom.
- Counter-check: without the ratio in freeView the 125% test fails.
- check.sh: 156 files, 2320 tests, CHECK EXIT 0.
- e2e 1-17,28,30,38-40: 726 checks passed on the steps before the
final values (up to 8). Not rerun on the final steps.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>