Published
Edited
Jan 31, 2018
2 forks
7 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
canvas = {
var c = this ? this.getContext('2d') : DOM.context2d(width, height);
var canvas = c.canvas;
c.fillStyle = "blue";
var i = this && this.i || 0;
while (playing) {
c.clearRect(0, 0, width, height);
c.beginPath();
c.arc((Math.sin(i / 100) + 1) * width / 2, (Math.cos(i / 100) + 1) * height / 2, 50, 0, 2 * Math.PI);
c.fill();
canvas.i = i = i + 1;
yield canvas;
}
yield canvas;
}
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