ws-docs: guide pages cad, font, layered, music, playlist, subtitles, tilemap, video; runnable examples per category; README converting note

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
4DBugandClaude Opus 5.5 committed 2026-10-31 13:25:10 -05:00
1 parent 66cf0c4a6b
commit fd9684b903
23 files changed
+2503 -5

No files matched your search

+6 -2
View File
@@ -1,8 +1,8 @@
# Docs inputs for the 2D pages (tools/fixtures.py; see tools/docs_check.py): a layered PSD written by ImageMagick (three
# layers: Sky, Box, a half-transparent Glow; the merged image flattened by ImageMagick), a two-frame Aseprite sprite
# (built with the chunk writer of tools/fixtures/aseprite.py), an SVG icon and a Tiled map as TMX and TMJ (hand-written
# from the Tiled format docs).
# tests/gen/docs_2d.luau { files, vars = { psdBytes, asepriteBytes, svgText, tmxText, tmjText } }
# from the Tiled format docs) with its tileset image tiles.png (ImageMagick).
# tests/gen/docs_2d.luau { files, vars = { psdBytes, asepriteBytes, svgText, tmxText, tmjText, tilesPngBytes } }
import importlib.util, os, struct, tempfile
INPUTS = ["tools/docs_check.py", "tools/fixtures/aseprite.py"]
@@ -93,10 +93,14 @@ def generate(ctx):
"(", "-clone", "0--1", "-background", "none", "-flatten", ")", "-insert", "0",
"-depth", "8", "-type", "TrueColorAlpha", out])
files["art.psd"] = open(out, "rb").read()
tiles = os.path.join(d, "tiles.png")
ctx.nix("imagemagick", ["magick", "-size", "64x32", "pattern:checkerboard", "-depth", "8", tiles])
files["tiles.png"] = open(tiles, "rb").read()
dc.emit_inputs(ctx, files, {
"psdBytes": "art.psd",
"asepriteBytes": "sprite.aseprite",
"svgText": "icon.svg",
"tmxText": "level.tmx",
"tmjText": "level.tmj",
"tilesPngBytes": "tiles.png",
})