Published
Edited
Jan 15, 2018
1 fork
4 stars
Insert cell
Insert cell
{
let height = width / 1.5;
let canvas = this || DOM.canvas(width, height);
let ps = canvas.ps || (() => {
let ps = new paper.PaperScope();
ps.setup(canvas);
return ps;
})();
canvas.ps = ps;
while (true) {
let rectangle = new ps.Rectangle(new ps.Point(Math.random() * width, Math.random() * height), new ps.Size(size, size));
var path = new ps.Path.Rectangle(rectangle, 10);
path.opacity = 0.2;
path.fillColor = color;
yield canvas;
}
return canvas;
}
Insert cell
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