Public
Edited
Dec 24, 2022
Insert cell
Insert cell
p5(sketch => {
let system;
sketch.setup = function() {
sketch.createCanvas(width, 300);
system = new ParticleSystem(sketch, sketch.createVector(sketch.width/2, 50));
};
sketch.draw = function() {
sketch.background("#001b42");
system.addParticle();
system.run();
}
})
Insert cell
import {p5, ParticleSystem} from "@tmcw/p5"
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