aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-14 23:57:55 +0200
committeruser <user@clank>2026-08-14 23:57:55 +0200
commitd66a22cd8e152aed3efc4b340daa345d26ba4855 (patch)
treeb4f27f88cec966598125ccde54aa48ff00b797ef /src
parentcontrib: a shadertoy for shader expressions (diff)
downloadslosh-d66a22cd8e152aed3efc4b340daa345d26ba4855.tar.gz
slosh-d66a22cd8e152aed3efc4b340daa345d26ba4855.tar.xz
slosh-d66a22cd8e152aed3efc4b340daa345d26ba4855.zip
contrib: draw the shadertoy preview at the size it means
The canvas was 576x432 with `max-width: 100%`, so a wide pane stretched a 576-pixel preview across it and `image-rendering: pixelated` made sure you could see every one of those pixels doing it. A preview of a terminal that does not look like a terminal is not much of a preview. Two sizes now, deliberately: the backing store is device pixels (DPR, capped at 3) so glyphs stay sharp on a HiDPI screen, and the CSS size is pinned to the real 576x432 so nothing ever scales it up. A viewport with room to spare gets space around the preview instead of a blur; one that is genuinely too small still shrinks it, smoothly, which is the direction where scaling is fine. Checked by rendering a frame against a stub canvas under node: the draw path covers exactly the CSS box while the backing store is twice that at DPR 2.
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions