Packing Animated AVIF Sequences into WebGL, Canvas, and CSS Sprite Atlases
Zero-Bleed Straight-Alpha Packing and Machine-Readable Frame Coordinates
Game runtimes (PixiJS, Phaser, Three.js CanvasTexture) and CSS background-position steps() animations require single-texture PNG sprite strips where every frame occupies a deterministic (x, y, width, height) cell with zero decorative borders and straight unpremultiplied alpha. Converting six 8x8 frames across 6 columns produces an exact 48x8 RGBA8 PNG strip ready for single-draw-call GPU texture sampling without per-frame HTTP overhead or video element decoding latency.
Alongside the lossless PNG strip, our Dedicated Worker emits a structured companion JSON file listing atlasWidth, atlasHeight, columns, frameCount, and an ordered frames array containing zero-based index, x, y, width, height, timestampMs, and durationMs. Both the PNG strip and the coordinate JSON download directly in your browser for free with zero server roundtrips or cloud asset exposure.
- Guarantees exact 1:1 pixel geometry (cols * frameWidth by rows * frameHeight) with zero interpolation or scaling blur.
- Preserves straight-alpha RGBA8 across transparent sprite cells with canonical RGB=(0,0,0) background bytes.
- Exports a companion -atlas.json manifest with per-frame UV rectangles and millisecond frame durations.