summaryrefslogtreecommitdiff
path: root/examples/vecanim/scenes
Commit message (Collapse)AuthorAge
* examples: a talk that runs its own Deck, and its scriptGabriel Schneider3 hours
| | | | | | | | | | | | | examples/talk.zig keeps an anim.Deck in its State beside its own data, turns clicks and keys into asks and paints with an anim.Painter: two slides, a mass that bobs (loop) while the deck waits, a damping slider laid out and hit-tested in the talk (it takes its clicks), a choice gate that branches on it, and slide 1 cleared beside slide 2's writing. test/talk.script (zig build test-talk) steps it, finishes a step on a click, goes back, jumps slides, drags the slider without advancing, reloads mid-wait with the first step retimed (same step, t a second later) and checks two exports with 2 s holds frame by frame. The vecanim live scene's words follow the new pause.
* anim: talks: gates that let time run on, pause, beside, loop, clear, slides ↵Gabriel Schneider3 hours
| | | | | | | | | | | | | | | | | | | 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.
* Move standalone sketches into sketchbook examplesGabriel Schneider18 hours