A "Timeline" modifies value of objects over time.
Timeline -> Property (prop) -> Set Constant (value) -> Perform Transition (ease)
To create the required objects we use a builder pattern like this:
const inAnimation = timeline .mark("t1", 0) .mark("t2", "80%") .mark("end", 4) .prop(() => obj.transform.identity()) // << always called .prop((x, y) => obj.transform.scale(x, y), "scale") .value("t1", [0, 0]) .value("t2", [1, 1]) .ease("t2", "end", [1, 1], [4, 4], Easing.Elastic.easeIn) .prop(v => obj.mixColor.alpha = v, "alpha") .ease(0, "100%", 0, 1) .prop(count => obj.text = "" + Math.round(count), "count") .ease(0, "100%", 0, 10) .done(2) // << duration must be called to finish the timelineconst fadeOut = timeline .read(inAnimation) .prop("alpha") .ease(0, 1, )
Generated using TypeDoc
A "Timeline" modifies value of objects over time.
Timeline -> Property (prop) -> Set Constant (value) -> Perform Transition (ease)
To create the required objects we use a builder pattern like this: