From 64a816dbe194c05e089729ac1fdc15061afdd903 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 16 Nov 2026 22:51:49 -0300 Subject: anim: talks: gates that let time run on, pause, beside, loop, clear, slides and the Deck A talk is a live scene re-run from the top every frame, a function of its time and of the gates opened so far. Frame.gate(open) waits while time runs on and records the value it opened with; pause() is the presenter's click. beside and loop are the sub-animations, slide() the second navigation level, clear() the end of a slide. anim.Deck is the playhead and the gate log as plain data for any sketch's State: update() takes an Ask (next, back, next_slide, back_slide, to, end) and runs the talk with the app mutable, shot() runs it read-only for drawing. A click during a step finishes it; back cuts to the picture held before the last click; an edit that moves the last opened gate moves t with it; exported, every gate holds Deck.hold. Live takes a namespace or a tuple of them (sources) and exposes frame. Builder.pause, Instant.clock and Frame.clock are gone: t runs through gates. A test-anim step runs the module's tests and the player's scenes. --- examples/vecanim/scenes/live.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/vecanim/scenes/live.zig b/examples/vecanim/scenes/live.zig index cefdbc5..4af7998 100644 --- a/examples/vecanim/scenes/live.zig +++ b/examples/vecanim/scenes/live.zig @@ -61,7 +61,7 @@ fn frame(s: *anim.Frame) void { for (dots) |d| { const p = s.pose(d); const envelope = 1 - s.get(damping) * (1 - @exp(-p.x * p.x / 1e5)); - p.y = s.get(height) * envelope * @sin(p.x / 90 - s.clock * 2); + p.y = s.get(height) * envelope * @sin(p.x / 90 - s.t * 2); const near = @max(0, 1 - @abs(p.x - s.pointer[0]) / 120); p.scale = 1 + near; p.y -= 40 * near; -- cgit v1.3