From 15de88cf82c187635c1989e91bfa639a10304066 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 11 Nov 2026 20:08:07 -0300 Subject: canim: a column of text as an experiment; the disassembly tied to the stack From the user. A scene may set its text in a column beside the panes a beat is about: col.beat names the panes and their rows, where the text is placed (beside, below, above, or on a drawing) and what it is level with; panes the beat leaves out fold to their title bars on a shelf, their changes struck there. Tried as two scenes beside the originals: the call followed down (column) and a bubble on sort's rings (column_sort). annotation = .tied names the word an instruction touched and draws a touch to its stack row; offsets count from the frame's base; rsp's pin travels with its amount before the stack follows; .whole keeps the full chain. carry = .arrow draws a value's way between memory and a register. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa --- anim/src/stage.zig | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'anim/src/stage.zig') diff --git a/anim/src/stage.zig b/anim/src/stage.zig index a03c8bd..bbf5887 100644 --- a/anim/src/stage.zig +++ b/anim/src/stage.zig @@ -14,7 +14,7 @@ pub const Part = enum { band, view, source, disasm, registers, stack, backtrace, pub const Stage = struct { first: Split, - moves: [8]Move = undefined, + moves: [32]Move = undefined, count: usize = 0, /// Seconds into the band's lens rising from its bytes (`Context.establish`, /// `ties.rise`); far past it, for a scene that does not raise one. @@ -31,12 +31,26 @@ pub const Stage = struct { hold_in: anim.Value, /// The registers panel's rows (the scene's, `layout.fit`): every split it changes to keeps them. 0: as the split has it. registers_rows: f32 = 0, + /// 0 the working frame, 1 the column (`column.zig`): the clock under the text column. + column: anim.Value, + /// How much larger the band's drawing is drawn than its lens's size (a + /// column's `on`, `above`: the drawing across both columns), its tag not. + zoom: anim.Value, const Move = struct { from: Split, to: Split, p: anim.Value }; /// A stage at `split`, made where a scene's components can keep a pointer to it. pub fn init(s: *anim.Frame, split: Split) *Stage { - return s.new(Stage{ .first = split, .rise = s.value(std.math.floatMax(f32)), .drawing = s.value(1), .view = s.value(1), .hold = s.value(-1), .hold_free = s.value(0), .hold_in = s.value(0) }); + return s.new(Stage{ .first = split, .rise = s.value(std.math.floatMax(f32)), .drawing = s.value(1), .view = s.value(1), .hold = s.value(-1), .hold_free = s.value(0), .hold_in = s.value(0), .column = s.value(0), .zoom = s.value(1) }); + } + + /// Every panel to its box in `to`, as it is (no fit), over `seconds` on + /// `glide`, the drawing not faded: the column's moves (`column.zig`). + pub fn glide(st: *Stage, s: *anim.Frame, to: Split, seconds: f32) void { + const p = s.value(0); + st.moves[st.count] = .{ .from = st.last(), .to = to, .p = p }; + st.count += 1; + s.play(.{p.to(1)}, .{ .seconds = seconds, .ease = anim.ease.linear }); } /// The split the stage ends in, after every move so far. -- cgit v1.3