⭐ Starforge is a pixel art & animation studio that runs in your browser.
The first ship reviews asked for three things: custom colors (two voters), a less twitchy zoom (one), and opening files (one). All three landed this week. The Color Studio mixes any color in HSV, hex or per-channel RGBA and drops it straight into your palette. The zoom got tamed (story below). And you can now save and open editable .starforge projects, including inside a Portable PNG, a real image with the whole project embedded in it, so the file you post is also the file you can keep editing.
Wheel deltas lie about intent
A Mac voter said the zoom flew. They were right, and the bug was pretty interesting (it also ate my whole morning). One click of a mouse wheel arrives as a single event of about 100px, but a trackpad glide arrives as dozens of tiny ~4px events. The old code stepped the zoom once per event: a mouse user got one clean step per click, a trackpad user got twenty-five. And I didn’t even know pinch was part of the bug until I read how Chrome handles it: a pinch is faked as ctrl+wheel, so it lands in the same handler too.
The fix: accumulate to 100, then discard the remainder. Every event banks its delta. A step only fires when the bank crosses a notch, and turning around mid-glide resets the bank instead of cancelling a step you already saw.
Receipts:
- 511 green tests
- an e2e that draws, reloads the page and exports in a real browser
- golden ink fixtures pinned by SHA256
Those numbered cells at the bottom of the screenshot are tomorrow’s story :D
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.