Published
Edited
Sep 28, 2021
1 fork
Insert cell
Insert cell
{
const canvas = DOM.canvas(width, height);
// Now add a new paper variable to the global scope to reference the PaperScope object.
const p = new paper.PaperScope();
const { Path, Point, Color } = p;
paper.setup(canvas);

let bg = new Path.Rectangle({
point: [0,0],
size: [width, height],
fillColor: "hsl(216deg 100% 13%)"
})
return canvas;
}
Insert cell
width = canvasSize[0]
Insert cell
height = canvasSize[1]
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
paper = require('paper');
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