Public
Edited
Feb 15, 2023
3 stars
Insert cell
Insert cell
viewof form = Inputs.form({
width: Inputs.range([0, 1000], { label: "Width", step: 1, value: 1000 }),
height: Inputs.range([0, 1000], { label: "Height", step: 1, value: 1000 })
})
Insert cell
Insert cell
GlitchRect = (x, y, h, w, n) => {
return {
x: x,
y: y,
h: h,
w: w,
n: n,
hdiff: h / n,
ratei: R(0.01, 0.1),
clr: getColor(),
clr1: getColor(),
clr2: getColor(),
start: R(0, 0.02),
glide: R(5, 20)
};
}
Insert cell
Insert cell
Insert cell
Insert cell
R = (min, max) => min + Math.random() * (max - min)
Insert cell
W = form.width
Insert cell
H = form.height
Insert cell
import { p5 } 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