Published
Edited
Jan 2, 2021
Importers
1 star
Insert cell
Insert cell
Insert cell
// animation loop of 5 seconds
// use animationControl(5,false) to disable looping
viewof animTime = animationControl(5);
Insert cell
md`Current value is ${animTime.toFixed(2)} (${(animTime*5).toFixed(1)} seconds).`
Insert cell
Insert cell
{ viewof animTime.listenTo(now) }
Insert cell
Insert cell
{
if (viewof animTime.playing && viewof animTime.value > 0)
viewof animTime.pause()
else
viewof animTime.play()
}
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more