sourceextensions/blender/demos/td-models.xtl

1⍝│ Blender, 3: game pieces. The twelve tower defense pieces X_eTaL-games 2⍝│ asked for -- arrow, cannon and frost towers at three levels, runner, 3⍝│ brute and shield creeps -- described in X_eTaL (Td.xtl: boxes, 4⍝│ cylinders, cones, spheres, rings, crystals and turned profiles, the 5⍝│ parts that move in groups, the clips keyed from each part's rest), 6⍝│ written as one bpy script, and exported by Blender as one glTF file a 7⍝│ piece with its named clips: idle, fire, walk, hit. Each file's clips 8⍝│ are read back from it. 9⍝│ Page: blender/td/ the pieces in 3D (published) 10⍝│ Run: just demo blender td-models (about half a minute) 11 12"bl:" u̲se< "Blender" 13"bp:" u̲se< "Bpy" 14"td:" u̲se< "Td" 15 16_ ← "work/td/run.py" ᵇˡw̲rite! ᵇᵖlauncher 17_ ← "work/td/models.py" ᵇˡw̲rite! ᵇᵖhead c̲at ᵗᵈall c̲at ᵇᵖreport 18"making the twelve pieces with Blender ..." 19r ← "work/td/run.py" ᵇˡr̲un! "work/td/models.py work/td/out" 20"the run, and the error lines in Blender's log:" 21lines ← (n̲ot r = f̲irst "\n") p̲artition r 22d̲isclose 1 s̲elect lines 23d̲isclose 2 s̲elect lines 24"each piece's parts and triangles:" 25ᵇˡr̲ead "work/td/out/report.txt" 26"each piece's clips, read back from its .glb:" 27ᵇˡr̲ead "work/td/out/clips.txt"