Changelog for gb-sprite-0.2.1.2
Changelog
0.2.1.2
- Change license from MIT to BSD-3-Clause.
Bug Fixes
- Fix
maximumcrash on empty list inpackSheet(Sheet.hs). - Replace partial
!!with safe indexing in Bayer dithering (Dither.hs). - Fix
-Wname-shadowingwarning in test suite.
Documentation
- Fix README Animation API section (wrong type name and signatures).
- Add gb-vector as ecosystem companion in README.
Internal
- CI: cross-platform build matrix (Linux, macOS, Windows).
0.2.1.1
- Remove unused
containersdependency.
0.2.1.0
Performance
Library-wide elimination of O(n²) per-pixel setPixel/VS.// mutation. All pixel-producing functions now use single-pass VS.generate for O(n) performance.
- NineSlice:
renderNineSlice— rewritten for large target sizes that previously stalled. - Transform:
flipH,flipV,rotate90,rotate180,rotate270,scaleNearest,outline,dropShadow— all rewritten with direct index computation. - Compose:
stamp,stampAlpha— single-pass with inline source/destination byte reads. - Gradient:
linearGradient,radialGradient,diagonalGradient— generate directly from coordinate math. - Noise:
valueNoiseColor,fbm— generate noise samples directly into output vector. - Dither:
orderedDither— single-pass palette reduction.
0.2.0.0
New Modules
- GBSprite.Noise: Procedural noise generation —
valueNoise,valueNoiseColor,fbm(fractal Brownian motion). Deterministic LCG with bilinear interpolation and smoothstep. - GBSprite.Gradient: Gradient generation —
linearGradient(horizontal/vertical),radialGradient,diagonalGradient. - GBSprite.NineSlice: UI panel scaling —
NineSlicetype with configurable border regions,renderNineSlicepreserves corners and edges at any target size. - GBSprite.Dither: Ordered dithering —
orderedDitherwith Bayer2, Bayer4, Bayer8 matrices for palette reduction. Classic retro cross-hatch patterns. - GBSprite.Export.PNG: Separated from Export.hs, eliminating CPP. Only built when
juicy-pixelsflag is enabled.
Bug Fixes
- Eliminate CPP from Export.hs — split into
GBSprite.Export(BMP, always available) andGBSprite.Export.PNG(optional).
Internal
- 105 pure tests (up from 62)
- 12 new Draw function tests (drawThickLine, drawPolygon, fillPolygon, drawEllipse, fillEllipse, drawBezier, drawRoundRect, fillRoundRect)
- CI: ormolu glob
src/**/*.hsreplaces hardcoded file list - CI: jobs chained so lint/format gate build (saves Actions minutes on failure)
- Metadata: cabal-version 3.0, stability experimental, CHANGELOG.md
0.1.0.0
Initial release.
Canvas & Color
Canvastype: width, height, RGBA pixel vectorColortype withlerp,multiply,alphaBlend,withAlpha,scaleAlpha- Bounds-checked
getPixel/setPixel(out-of-bounds returns transparent)
Drawing Primitives
- Lines:
drawLine,drawThickLine - Rectangles:
drawRect,fillRect,drawRoundRect,fillRoundRect - Circles:
drawCircle,fillCircle - Ellipses:
drawEllipse,fillEllipse - Polygons:
drawPolygon,fillPolygon - Curves:
drawBezier,drawArc
Transforms
flipH,flipV,rotate90,rotate180,rotate270scaleNearest: nearest-neighbour scaling
Composition
stamp: blit with transparencyoverlay: layer multiple canvases
Animation
Animationtype withLoop,Once,PingPongmodes- Frame indexing with
animationDonepredicate
Sprites & Sheets
Spritetype: multi-frame sprite containerpackSheet: bin-packing sprite sheet atlas
Text
renderText: bitmap font text renderingtextWidth: measure text width in pixels
VFX
explosion: animated explosion effectring: expanding ring effectflash: screen flash frames
Palettes
Palettetype with indexed color lookuppaletteSwap: remap colors- Built-in:
gameboy(4-color Game Boy palette)
Export
exportBmp: native BMP file export (always available)exportPng: PNG export via JuicyPixels (optionaljuicy-pixelsflag)