module motionsource
Motion (decisions/F11.md, F11e): easing curves, numbers moving
to their targets (Animated), the hover and press amounts elements
paint with, and frames. While something moves the app draws one frame
after another, each first marking what moves (the bindings reading a
moving number, the elements easing or settling, rooms revealing), then
running the bindings, laying out and painting, then moving the canvas
nodes of what comes and goes (transitions.alloy); when nothing moves no
frame is asked for.
type Alongsource
exp type Along = struct
How far along a motion is: eased, from 0 to 1, and whether it ended.
Fields
exp at: f32exp done: bool
fn alongsource
exp fn along(self motion: &Motion, elapsed: u64) -> Along
How far along the motion is elapsed nanoseconds after it started,
its delay first; a repeated one goes round as its repeat says, back
and forth when alternating.
fn sincesource
exp fn since(now: u64, start: u64) -> u64
The nanoseconds from start to now, none before it.
fn framesource
exp fn frame(self v: &var Visuals, ui: &var Ui)
fn use_motionsource
exp fn use_motion(self ui: &var Ui)
fn framesource
exp fn frame(self ui: &var Ui)
Brings the Ui to a frame at its time: what moves marked, the bindings run and what changed laid out, then painted, then what comes and goes moved on the canvas.
fn animatingsource
exp fn animating(self ui: &Ui) -> bool
Whether something moves, which the app draws frames for.