Public
Edited
Jul 31, 2023
Insert cell
Insert cell
Insert cell
p5((sketch) => {
sketch.setup = () => {
sketch.createCanvas(width, 300);
};
sketch.draw = () => {
sketch.background(204);
sketch.ellipse(50, 50, 80, 80);
};
})
Insert cell
Insert cell
p5((sketch) => {
sketch.setup = () => {
sketch.createCanvas(width, 300);
};
sketch.draw = () => {
if (sketch.mouseIsPressed || sketch.touchMoved) {
sketch.fill(0);
} else {
sketch.fill(255);
}

sketch.ellipse(sketch.mouseX, sketch.mouseY, 80, 80);
};
})
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