Public
Edited
Oct 15, 2022
2 forks
2 stars
Insert cell
Insert cell
Insert cell
p5((sketch) => {
let system;
let height = 300;
let imageWidth = 210;
let imageHeight = 107;
let speed = 4;
let image;
sketch.setup = function () {
image = sketch.loadImage(
"https://upload.wikimedia.org/wikipedia/commons/9/9b/DVD_logo.svg"
);
sketch.createCanvas(width, height);
};
sketch.draw = function () {
sketch.background("white");
let x = lathe.fold((sketch.frameCount / width) * speed, 1);
let y = lathe.fold((sketch.frameCount / height) * speed, 1);
sketch.image(
image,
x * (width - imageWidth),
y * (height - imageHeight),
imageWidth,
imageHeight
);
};
})
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