Experiments >

Code animation: Multiple discrete timelines

Experiment #1755th May, 2021by Joshua Nussbaum

Continuing with the discrete tween concept, I looked at how I can use multiple timelines with it.

I will need this, because annotations/captions should happen on a seperate timeline than changes to the code view.

I worked out that using delays is a good way to setup a series of tweens.

What I discovered is that sometimes tweens have a single discerete value, like the captions, there can only be one a time. Whereas the othertimeline has properties that stack over time. Will need to look into a better abstraction for this.

Code

https://svelte.dev/repl/47b9b0a14cd0410aba1f023d253a8ac0?version=3.38.2

Demo

Notes

  • It should be able to work in reverse too
  • It seems there are two types of discrete tweens, one where there is only a single value at a time, and the other represents a stack of all past values .
view all experiments

Stay tuned in

Learn how to add more experimentation to your workflow