summaryrefslogtreecommitdiff
path: root/anim/src/stage.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-11 17:42:07 -0300
committerGabriel Schneider <[email protected]>2026-11-11 19:11:00 -0300
commitb54c6776953d3243ab5b8e676e747713827ab320 (patch)
treed53be6cef4587b94531880af6479a1b5fa1aac39 /anim/src/stage.zig
parent3093eb55ac4a7054f51f06ea2786b5f9c9ec73f6 (diff)
downloadcomputeranim-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 'anim/src/stage.zig')
-rw-r--r--anim/src/stage.zig4
1 files changed, 3 insertions, 1 deletions
diff --git a/anim/src/stage.zig b/anim/src/stage.zig
index 35988aa..a03c8bd 100644
--- a/anim/src/stage.zig
+++ b/anim/src/stage.zig
@@ -29,6 +29,8 @@ pub const Stage = struct {
hold_free: anim.Value,
/// 0 to 1 as the window goes from where it was to where it is held (and back).
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,
const Move = struct { from: Split, to: Split, p: anim.Value };
@@ -45,7 +47,7 @@ pub const Stage = struct {
/// A change of split: every panel glides to its place in `to`.
pub fn relayout(st: *Stage, s: *anim.Frame, to: Split) void {
const p = s.value(0);
- st.moves[st.count] = .{ .from = st.last(), .to = to, .p = p };
+ st.moves[st.count] = .{ .from = st.last(), .to = if (st.registers_rows > 0) theme.layout.fit(to, st.registers_rows) else to, .p = p };
st.count += 1;
// The drawing fades out (12 f), the panels move, it fades in at its new size.
s.play(.{st.drawing.to(0)}, .{ .seconds = theme.time.relayout_fade, .ease = anim.ease.linear });