diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-11 17:42:07 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-11 19:11:00 -0300 |
| commit | b54c6776953d3243ab5b8e676e747713827ab320 (patch) | |
| tree | d53be6cef4587b94531880af6479a1b5fa1aac39 /design | |
| parent | 3093eb55ac4a7054f51f06ea2786b5f9c9ec73f6 (diff) | |
| download | computeranim-b54c6776953d3243ab5b8e676e747713827ab320.tar.gz computeranim-b54c6776953d3243ab5b8e676e747713827ab320.zip | |
canim: the disassembly under the source everywhere; rings
From the user. In every split the disassembly stays under the source;
registers a scene never changes fold three to a row, and the stack takes
the room: nine to twenty slots where it had six. The graph's first form
is rings: a loop a ring its blocks sit on, an inner loop a smaller ring
touching its parent, a way out leaving along the tangent; layers stay
for functions without loops. Its layout comes from the code alone and it
shows nothing from after the moment: a block not reached yet is quiet
and is reached, a fold of what is not reached yet opens when the run
arrives. A pane unrolls from its strip into its whole column and rolls
back. The sqlite scene's strips move before their panes.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa
Diffstat (limited to 'design')
| -rw-r--r-- | design/motion/motion.py | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/design/motion/motion.py b/design/motion/motion.py index 87823ff..4feba0e 100644 --- a/design/motion/motion.py +++ b/design/motion/motion.py @@ -69,25 +69,30 @@ def strips(panes): return out -def split(drawing, view, source, disasm, slots, backtrace=0): - """A split's panes (theme.layout.split): a panel of n rows is 32 + 24 n, 12 apart.""" +def split(drawing, view, source, disasm, regs=11, backtrace=0): + """A split's panes (theme.layout.split, layout A): a panel of n rows is 32 + 24 n, 12 apart; the disassembly + under the source; the registers as tall as their rows (`regs`: sort's 11 by default), the stack the state + column's rest above the backtrace, whole slots, any rest above it.""" ph = lambda n: 32 + 24 * n - out = {"drawing": (64, 48, 880, drawing), "view": (976, 48, 880, view)} if drawing else {} + out = {"drawing": (64, 48, 880, drawing)} if drawing else {} + if view: + out["view"] = (976, 48, 880, view) left, right = 48 + (drawing + 12 if drawing else 0), 48 + (view + 12 if view else 0) + bottom = 888 - (ph(backtrace) + 12 if backtrace else 0) + slots = (bottom - (right + ph(regs) + 12) - 32) // 24 out.update({"source": (64, left, 880, ph(source)), "disasm": (64, left + ph(source) + 12, 880, ph(disasm)), - "registers": (976, right, 880, ph(17)), "stack": (976, right + ph(17) + 12, 880, ph(slots))}) + "registers": (976, right, 880, ph(regs)), "stack": (976, bottom - ph(slots), 880, ph(slots))}) if backtrace: - out["backtrace"] = (976, right + ph(17) + 12 + ph(slots) + 12, 880, ph(backtrace)) + out["backtrace"] = (976, 888 - ph(backtrace), 880, ph(backtrace)) return out -# The working frame by split, its strips apart (`--regions none|beside|subject|blocks`): `blocks` is the -# graph over the program column, the source alone (twenty lines), the disassembly its view, seven rows. +# The working frame by split, its strips apart (`--regions none|beside|subject|blocks`), for a registers panel of +# eleven rows: `blocks` is the graph alone over the program column (880 by 344), the source six lines and the +# disassembly eleven under it, the registers and the stack from the state column's top. _words = {"caption": (64, 906, 1400, 126), "clock": (64, 894, 1792, 52)} -_blocks = {**split(296, 200, 10, 9, 6), "view": (976, 48, 880, 32 + 24 * 7), "source": (64, 356, 880, 32 + 24 * 20)} -del _blocks["disasm"] -for _name, _panes in {"none": split(0, 0, 14, 17, 8, 4), "beside": split(152, 152, 8, 17, 8), - "subject": split(296, 200, 10, 9, 6), "blocks": _blocks}.items(): +for _name, _panes in {"none": split(0, 0, 14, 17, backtrace=4), "beside": split(152, 152, 8, 17), + "subject": split(296, 200, 8, 11), "blocks": split(344, 0, 6, 11)}.items(): REGIONS[_name] = {**strips(_panes), **_words} PALETTE = ["#9aa6d9", "#e8c46a", "#6fd6e6", "#7fdc9a", "#d59cf5", "#ff6a4a", "#eee6d2", "#17a0b0"] |
