GGUI/Public/UIAnimation.h file

Animation: clips that move what an element shows over time, by the document's clock.

GGClip pulse{ .Length = 0.35f, .Tracks = {
    { .Property = GGAnimated::Scale, .Keys = { { 0.0f, 1.0f }, { 0.12f, 1.15f, {}, GGEase::Out }, { 0.35f, 1.0f } } } } };
ui.Clip("Pulse", pulse);           // on the element being built into
context.Play(node, "Pulse");

A track sets one property of one element, on top of what its builder and bindings set: an opacity multiplies, an offset adds, a scale multiplies, a rotation adds, a colour or radius replaces. Nothing a clip does is laid out: a node mid-clip is drawn again, or (a transform) only its view changes. A clip that ends keeps its last values; one that is stopped lets go of them. With reduced motion a clip jumps to its end, and one that loops forever stays still.

Namespaces

namespace GGUI

Classes

struct GGUI::GGKeyframe
A value at a time. Ease shapes the way into it from the key before.
struct GGUI::GGTrack
One property of one element over time: keys, or a curve.
struct GGUI::GGClip
Tracks played together over a length of time, and what it does at times along it.
struct GGUI::GGClip::Event
What it does at a time: the document runs the action the clip was declared with at that index, once each time playing passes it (either way, bouncing). Posing a clip runs nothing.