programextensions/blender/demos/game-assets.xtl
Blender, 4: game assets. X_eTaL makes the twelve tower defense pieces for X_eTaL-games and everything published with them: it writes the Python -- the launcher, and the bpy script describing each piece (Td.xtl) -- Python runs Blender, Blender runs the script: each piece is written as NAME.glb with its clips, rendered alone as NAME.png and as two sheets of frames (NAME-turn.png, NAME-map.png), shown close, one after another, turning and playing each clip, for one video, and all twelve lined up for another. Then X_eTaL hashes every file (the digest extension) into manifest.toml and writes the page that shows them, index.html, all in work/td/site. just ext blender publish-td copies that into the site, at blender/td/. Page: blender/td/ the pieces in 3D (published) Run: just demo blender game-assets (about five minutes)
script : Char
the pieces' Python, then each rendered alone, its fallback sheets (a turn and a map), then two videos (960 by 540): the pieces one after another, close, 5 seconds each, and all twelve lined up, 8 seconds
script ← ((ᵇᵖhead c̲at ᵗᵈall c̲at ᵇᵖreport c̲at ((0.55 0.62 0.72, 3.0) ᵇᵖl̲ights 0) c̲at ᵗᵈshow) c̲at ((ᵗᵈs̲tills 320) c̲at ((256, 96) ᵗᵈs̲heets 0) c̲at ((0.0 0.0 0.0, 30.0, 0.042 0.205 0.058) ᵇᵖg̲round 0)) c̲at ((960, 540, 150) ᵗᵈc̲loseups 0) c̲at (ᵇᵖv̲ideo "../closeups.mp4") c̲at ((960, 540, 240) ᵗᵈf̲ilm 0) c̲at ᵇᵖv̲ideo "../lineup.mp4")
_ : Int
_ ← "work/td/run.py" ᵇˡw̲rite! ᵇᵖlauncher
m : Int
m ← "work/td/site/manifest.toml" ᵇˡw̲rite! ("work/td/site", ᵇˡv̲ersion @) ᵗᵈm̲anifest 0