This one is all about stability 🩹
✨ Features
- add a Scoop bucket for Windows:
scoop bucket add emprcl https://github.com/emprcl/scoop-bucketthenscoop install runal. Docs. c.push()/c.pop()now use a stack, so nested save/restore of the drawing state works; an unbalancedpush()is reported as a debug warning instead of silently leaking to the next frame. Docs.c.loadImage()also accepts.jpegfiles and uppercase extensions, and reports an explicit error on an unsupported format instead of drawing nothing. Docs.⚠️ Deprecation Notice (Go package):runal.Start()now returns(*sync.WaitGroup, error)instead of*sync.WaitGroup. Handle the error when the terminal can't be initialized;runal.Run()is unchanged.
🐛 Bug fixes
- fix terminal being left in raw mode with a hidden cursor when a sketch exits, is interrupted, or loses stdin.
- detect terminal resizes on Windows, which has no
SIGWINCH; the canvas now follows the window there too. - fix runtime errors (missing font file, missing ffmpeg, failed export, unreadable terminal size) killing the whole process; they now stop rendering and print an error.
- fix exported png, gif and mp4 files containing terminal cleanup escape sequences.
- fix gif playback speed: frame delay is now computed correctly for any fps instead of rounding to zero above 100 fps.
- fix
c.loop()restarting at 30 fps instead of the fps set withc.fps(); fps values are now clamped to [1, 240]. - fix crash on multi-byte characters:
c.text(),c.stroke()andc.cellModeCustom()now handle unicode and empty strings. - fix
c.image()drawing at the wrong size when width and height are omitted. - fix
c.loopAngle(0)andc.saveCanvasToGIF()/c.saveCanvasToMP4()with a zero duration crashing. - fix JavaScript sketch reloading: saves are now debounced and atomic saves (editors that replace the file) are picked up, so a reload no longer misses changes or leaves the previous sketch running.