pixel-sprite-maker: spritec - .sprite text format -> png/jpg/svg + sprite sheets
- .sprite format: single-char palette keys (hex/rgb()/CSS names/none), grid rows, '.' transparent by default, max 256x256 per sprite - render/sheet/info/preview subcommands; sheets name themselves <base>_<cellW>x<cellH>_<cols>x<rows>.<ext> (row-major) - SVG output RLE-merges pixel runs; JPG composites over --bg - go tests for parser, colors, scaling, svg, sheet layout Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MmdG9GqfSWCzts7AkDwRDh
This commit is contained in:
BIN
pixel-sprite-maker/examples/out/coin.png
Normal file
BIN
pixel-sprite-maker/examples/out/coin.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 344 B |
34
pixel-sprite-maker/examples/out/coin.svg
Normal file
34
pixel-sprite-maker/examples/out/coin.svg
Normal file
@@ -0,0 +1,34 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 8 8" shape-rendering="crispEdges">
|
||||
<rect x="2" y="0" width="4" height="1" fill="#1a1205"/>
|
||||
<rect x="1" y="1" width="1" height="1" fill="#1a1205"/>
|
||||
<rect x="2" y="1" width="3" height="1" fill="#ffd700"/>
|
||||
<rect x="5" y="1" width="1" height="1" fill="#fff3a0"/>
|
||||
<rect x="6" y="1" width="1" height="1" fill="#1a1205"/>
|
||||
<rect x="0" y="2" width="1" height="1" fill="#1a1205"/>
|
||||
<rect x="1" y="2" width="3" height="1" fill="#ffd700"/>
|
||||
<rect x="4" y="2" width="2" height="1" fill="#fff3a0"/>
|
||||
<rect x="6" y="2" width="1" height="1" fill="#b8860b"/>
|
||||
<rect x="7" y="2" width="1" height="1" fill="#1a1205"/>
|
||||
<rect x="0" y="3" width="1" height="1" fill="#1a1205"/>
|
||||
<rect x="1" y="3" width="2" height="1" fill="#ffd700"/>
|
||||
<rect x="3" y="3" width="1" height="1" fill="#fff3a0"/>
|
||||
<rect x="4" y="3" width="2" height="1" fill="#ffd700"/>
|
||||
<rect x="6" y="3" width="1" height="1" fill="#b8860b"/>
|
||||
<rect x="7" y="3" width="1" height="1" fill="#1a1205"/>
|
||||
<rect x="0" y="4" width="1" height="1" fill="#1a1205"/>
|
||||
<rect x="1" y="4" width="1" height="1" fill="#ffd700"/>
|
||||
<rect x="2" y="4" width="1" height="1" fill="#fff3a0"/>
|
||||
<rect x="3" y="4" width="3" height="1" fill="#ffd700"/>
|
||||
<rect x="6" y="4" width="1" height="1" fill="#b8860b"/>
|
||||
<rect x="7" y="4" width="1" height="1" fill="#1a1205"/>
|
||||
<rect x="0" y="5" width="1" height="1" fill="#1a1205"/>
|
||||
<rect x="1" y="5" width="1" height="1" fill="#fff3a0"/>
|
||||
<rect x="2" y="5" width="3" height="1" fill="#ffd700"/>
|
||||
<rect x="5" y="5" width="2" height="1" fill="#b8860b"/>
|
||||
<rect x="7" y="5" width="1" height="1" fill="#1a1205"/>
|
||||
<rect x="1" y="6" width="1" height="1" fill="#1a1205"/>
|
||||
<rect x="2" y="6" width="1" height="1" fill="#ffd700"/>
|
||||
<rect x="3" y="6" width="3" height="1" fill="#b8860b"/>
|
||||
<rect x="6" y="6" width="1" height="1" fill="#1a1205"/>
|
||||
<rect x="2" y="7" width="4" height="1" fill="#1a1205"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
BIN
pixel-sprite-maker/examples/out/heart.jpg
Normal file
BIN
pixel-sprite-maker/examples/out/heart.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
BIN
pixel-sprite-maker/examples/out/walk_8x8_4x1.png
Normal file
BIN
pixel-sprite-maker/examples/out/walk_8x8_4x1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 508 B |
57
pixel-sprite-maker/examples/out/walkgrid_8x8_2x2.svg
Normal file
57
pixel-sprite-maker/examples/out/walkgrid_8x8_2x2.svg
Normal file
@@ -0,0 +1,57 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" shape-rendering="crispEdges">
|
||||
<rect x="2" y="0" width="3" height="1" fill="#101018"/>
|
||||
<rect x="10" y="0" width="3" height="1" fill="#101018"/>
|
||||
<rect x="2" y="1" width="1" height="1" fill="#101018"/>
|
||||
<rect x="3" y="1" width="2" height="1" fill="#f2c09a"/>
|
||||
<rect x="10" y="1" width="1" height="1" fill="#101018"/>
|
||||
<rect x="11" y="1" width="2" height="1" fill="#f2c09a"/>
|
||||
<rect x="2" y="2" width="1" height="1" fill="#101018"/>
|
||||
<rect x="3" y="2" width="2" height="1" fill="#f2c09a"/>
|
||||
<rect x="10" y="2" width="1" height="1" fill="#101018"/>
|
||||
<rect x="11" y="2" width="2" height="1" fill="#f2c09a"/>
|
||||
<rect x="1" y="3" width="1" height="1" fill="#101018"/>
|
||||
<rect x="2" y="3" width="3" height="1" fill="#2e5fb7"/>
|
||||
<rect x="5" y="3" width="1" height="1" fill="#101018"/>
|
||||
<rect x="9" y="3" width="1" height="1" fill="#101018"/>
|
||||
<rect x="10" y="3" width="3" height="1" fill="#2e5fb7"/>
|
||||
<rect x="13" y="3" width="1" height="1" fill="#101018"/>
|
||||
<rect x="2" y="4" width="3" height="1" fill="#2e5fb7"/>
|
||||
<rect x="10" y="4" width="3" height="1" fill="#2e5fb7"/>
|
||||
<rect x="2" y="5" width="3" height="1" fill="#22406e"/>
|
||||
<rect x="10" y="5" width="3" height="1" fill="#22406e"/>
|
||||
<rect x="2" y="6" width="1" height="1" fill="#22406e"/>
|
||||
<rect x="4" y="6" width="1" height="1" fill="#22406e"/>
|
||||
<rect x="9" y="6" width="1" height="1" fill="#22406e"/>
|
||||
<rect x="13" y="6" width="1" height="1" fill="#22406e"/>
|
||||
<rect x="2" y="7" width="1" height="1" fill="#101018"/>
|
||||
<rect x="4" y="7" width="1" height="1" fill="#101018"/>
|
||||
<rect x="9" y="7" width="1" height="1" fill="#101018"/>
|
||||
<rect x="13" y="7" width="1" height="1" fill="#101018"/>
|
||||
<rect x="2" y="8" width="3" height="1" fill="#101018"/>
|
||||
<rect x="10" y="8" width="3" height="1" fill="#101018"/>
|
||||
<rect x="2" y="9" width="1" height="1" fill="#101018"/>
|
||||
<rect x="3" y="9" width="2" height="1" fill="#f2c09a"/>
|
||||
<rect x="10" y="9" width="1" height="1" fill="#101018"/>
|
||||
<rect x="11" y="9" width="2" height="1" fill="#f2c09a"/>
|
||||
<rect x="2" y="10" width="1" height="1" fill="#101018"/>
|
||||
<rect x="3" y="10" width="2" height="1" fill="#f2c09a"/>
|
||||
<rect x="10" y="10" width="1" height="1" fill="#101018"/>
|
||||
<rect x="11" y="10" width="2" height="1" fill="#f2c09a"/>
|
||||
<rect x="2" y="11" width="3" height="1" fill="#2e5fb7"/>
|
||||
<rect x="5" y="11" width="1" height="1" fill="#101018"/>
|
||||
<rect x="9" y="11" width="1" height="1" fill="#101018"/>
|
||||
<rect x="10" y="11" width="3" height="1" fill="#2e5fb7"/>
|
||||
<rect x="13" y="11" width="1" height="1" fill="#101018"/>
|
||||
<rect x="1" y="12" width="1" height="1" fill="#101018"/>
|
||||
<rect x="2" y="12" width="3" height="1" fill="#2e5fb7"/>
|
||||
<rect x="10" y="12" width="3" height="1" fill="#2e5fb7"/>
|
||||
<rect x="2" y="13" width="3" height="1" fill="#22406e"/>
|
||||
<rect x="10" y="13" width="3" height="1" fill="#22406e"/>
|
||||
<rect x="2" y="14" width="1" height="1" fill="#22406e"/>
|
||||
<rect x="4" y="14" width="1" height="1" fill="#22406e"/>
|
||||
<rect x="10" y="14" width="2" height="1" fill="#22406e"/>
|
||||
<rect x="2" y="15" width="1" height="1" fill="#101018"/>
|
||||
<rect x="4" y="15" width="1" height="1" fill="#101018"/>
|
||||
<rect x="9" y="15" width="1" height="1" fill="#101018"/>
|
||||
<rect x="12" y="15" width="1" height="1" fill="#101018"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.2 KiB |
Reference in New Issue
Block a user