diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-10 14:48:26 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-10 15:14:31 -0300 |
| commit | 7e9bf9e6e85c6c6e7a400d4fa0b43b77133ed3cb (patch) | |
| tree | a6add92cd4dcbbf4c31cd1ce989d99b190258353 /anim/scenes/title.zig | |
| parent | ed46c51fe127377eb1fde8dee83da984e0f61860 (diff) | |
| download | computeranim-7e9bf9e6e85c6c6e7a400d4fa0b43b77133ed3cb.tar.gz computeranim-7e9bf9e6e85c6c6e7a400d4fa0b43b77133ed3cb.zip | |
canim: animations of recordings, as a debugger's whole context with a lens beside it
A package of its own (anim/), on sketchbook's anim module and pardes's
syntax. A scene opens a recording, takes a cursor into it, and declares
blocks that read the moment the cursor is at: the state column (registers
each followed as a pointer and inked by where it points, the stack
telescope, the backtrace), the program column (the whole source, the
disassembly in address order, and the scene's lens: a node-link list over
a hexdump of its heap, array cells, a call tree, a syscall crossing), and
ties between them. Motion is a step told as a sentence (the line fires,
its effects cascade a level at a time, the mark moves on last), timed by
what the step contains; walk, hurry and sprint pace a loop. Five scenes
from real recordings of fib, a linked list, a sort and syscalls.
First drafts, by the agent's own handover: the frame of the design's
second revision, the hexdump lens and the ties; no disassembly
annotations, no gallery, scenes not yet reviewed against the mocks.
Diffstat (limited to 'anim/scenes/title.zig')
| -rw-r--r-- | anim/scenes/title.zig | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/anim/scenes/title.zig b/anim/scenes/title.zig new file mode 100644 index 0000000..3646da4 --- /dev/null +++ b/anim/scenes/title.zig @@ -0,0 +1,22 @@ +//! The card before the scenes: what the series is, and the marks every +//! picture in it uses. +const anim = @import("anim"); +const canim = @import("canim"); + +pub const background = canim.background; +pub const scene = anim.Live(frame, struct {}); + +fn frame(s: *anim.Frame) void { + const size = canim.theme.size.sans; + const text = canim.theme.color.text; + const series = canim.label(s, .{ .text = "How programs really run", .box = .{ .x = 64, .y = 138, .w = 900, .h = 48 }, .size = size.kicker, .color = text.dim }); + const title = canim.label(s, .{ .text = "Five small programs,\none step at a time", .box = .{ .x = 64, .y = 220, .w = 1792, .h = size.title_leading }, .face = .sans_bold, .size = size.title, .color = text.bright }); + const under = canim.label(s, .{ .text = "recorded as they ran: every line, register and byte", .box = .{ .x = 64, .y = 500, .w = 1792, .h = 60 }, .face = .sans, .size = size.subtitle, .color = text.dim }); + const marks = canim.legend(s, .{ .box = canim.theme.cols(0, 12, 512, 256) }); + const t = canim.theme.time; + s.play(.{ series.fadeIn(), title.fadeIn() }, .{ .seconds = t.layout, .ease = canim.ease.enter }); + s.play(.{under.fadeIn()}, .{ .seconds = t.move }); + s.wait(t.beat); + s.play(.{marks.fadeIn()}, .{ .seconds = t.travel }); + s.wait(4); +} |
