diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-10 23:36:18 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-10 23:55:42 -0300 |
| commit | 81d97a9e38c740a96af13a8a981878947a508bc0 (patch) | |
| tree | bbe53f2f4c195f378a5a8cb67dfac1277ac68c82 /anim/src/ties.zig | |
| parent | 2a46b60e1d115ff5149a112bc0f800467c0efaee (diff) | |
| download | computeranim-81d97a9e38c740a96af13a8a981878947a508bc0.tar.gz computeranim-81d97a9e38c740a96af13a8a981878947a508bc0.zip | |
canim: quieter marks, the stack's roles, the loupe, arcs, the minimap, the map and the dive
From the user's notes on the second videos. The current row is a white
wash, a strike a softened vermilion, held a turned corner. A stack row
has its offset from rsp and its role from the tracer (a saved register,
a local by name, argc and argv). The loupe is the telescope as a floating
panel: the memory round what a pointer leads to, a pointer inside it
opening the next. A pointer to a row of its own panel is an arc in a
lane, in dumps, loupes and the stack. Every scene has the minimap; the
map is the same moment with every panel at full length on 3840 by 2160,
and the list opens on it and dives to the working frame, each panel
travelling to its place. Recordings hold more round each stop.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa
Diffstat (limited to 'anim/src/ties.zig')
| -rw-r--r-- | anim/src/ties.zig | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/anim/src/ties.zig b/anim/src/ties.zig index 0df8e34..323cecf 100644 --- a/anim/src/ties.zig +++ b/anim/src/ties.zig @@ -85,14 +85,15 @@ var said: usize = 0; /// `r` (in `u`'s units) is where `place` is, this frame. pub fn anchor(u: ui.Ui, place: Place, r: Rect) void { - if (said == table.len) return; + if (said == table.len or ui.mapping) return; const a = u.at.xf.apply(.{ r.x, r.y }); const b = u.at.xf.apply(.{ r.x + r.w, r.y + r.h }); table[said] = .{ .key = place.key(), .box = .{ a[0], a[1], b[0], b[1] } }; said += 1; } -fn find(place: Place) ?[4]f32 { +/// Where `place` is this frame, in canvas pixels (left, top, right, bottom), if a panel said. +pub fn find(place: Place) ?[4]f32 { for (table[0..said]) |entry| if (entry.key == place.key()) return entry.box; return null; } @@ -175,6 +176,8 @@ pub const Ties = struct { defer said = 0; defer stack_window = null; const now = g.cursor.now(at); + // Diving or surfacing, the panels are on their way: no ties. + for (@import("context.zig").zoomed) |z| if (z != null) return; // In canvas pixels, `k` of them a unit: places come from panels anywhere. var raw: ui.Ui = .{ .f = f, .at = at }; raw.at.xf = .identity; @@ -317,7 +320,7 @@ pub const Ties = struct { const tie = [2]f32{ theme.metric.bracket.tie[0] * k, theme.metric.bracket.tie[1] * k }; // The bracket takes the row: x 7 of the dump, the row's height; // on the stack, the panel's left padding. - const bx = if (stacked) run[0] - (theme.metric.slot.chain - 5) * k else run[0] - (rows.byteX(@intCast(word % 16)) - 4 - theme.metric.bytes.bracket) * k; + const bx = if (stacked) run[0] - (theme.metric.slot.address - 5) * k else run[0] - (rows.byteX(@intCast(word % 16)) - 4 - theme.metric.bytes.bracket) * k; v.faded(bracket).bracket(bx, run[1] + 2 * k, run[3] - 2 * k, color, tie, 1, false); const cx = (over[0] + over[2]) / 2; const y = (run[1] + run[3]) / 2; |
