From 40197552bed794b92410bdf803532162c8f5e27d Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 24 Sep 2026 10:46:33 -0300 Subject: Ease a message into its row fast first, its colour ahead of it, and out slow first A message fell in on t*t, an ease-in: it hung near its start for the first frames and was still moving at its fastest when it hit the row, a sixth of a row in its last frame. It now decelerates into place with an ease-out cubic, slide = -(1-t)^3: a quarter of the way in the first frame, and the last frames only settle it. There is no overshoot. At a row's height and the dozen frames of the 180 ms fall, a follow-through is a pixel or two, which reads as a jitter rather than a bounce. MessageFall keeps its 180 ms: the ease-out puts the chip where it is going within about 100 ms. The colour leads the motion: alpha = 1 - (1 - min(1, 2t))^2, whole by half way, so what lands is already legible. The SDL shell used to show the chip solid while it slid and fade it only on the way out; it now fades it up with the same alpha, and the rule under a chip carries the chip's fade (a new TagLayer.fade) instead of standing solid while the chip comes or goes. The dissolve was an ease-out, (1-t)^2: it lost a tenth of its colour in the first frame and spent its last frames nearly invisible. An exit eases in instead, alpha = 1 - t^2 over the same 300 ms: it lets go gently and leaves faster and faster. t is now counted to the last frame, so that frame shows it gone rather than it blinking out from 0.3%. 1 - t^3 was the other candidate; in captures it held the chip nearly untouched for half the dissolve after the linger had already held it, then dropped a sixth of its colour a frame, which reads as a pop. It stays in place: the lines stacked around it do not move, and a drift would read as it leaving its row. The test pins the shapes: a fast first step into the row, never past it, solid by half way; a dissolve whose first drop is smaller than its last and which ends at exactly nothing. Co-Authored-By: Claude Opus 5.5 (1M context) --- src/gui/gui.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/gui') diff --git a/src/gui/gui.zig b/src/gui/gui.zig index acb8d729..dd74ae58 100644 --- a/src/gui/gui.zig +++ b/src/gui/gui.zig @@ -7311,7 +7311,10 @@ fn appendPaneChrome( // comes with it, and shows only once it is below that cut. const rule_y = top + (1 + layer.slide) * layout.h; if (rule_y - 1 < top) continue; - builder.addRect(x0, rule_y - 1, rule_x1, rule_y, overlayRgb(chrome.border)); + // ...and fades up and dissolves with it rather than standing alone. + var rule = overlayRgb(chrome.border); + rule.a = layer.fade; + builder.addRect(x0, rule_y - 1, rule_x1, rule_y, rule); } appendColumnSpines(core, surface.rows, layout, builder); } -- cgit v1.3