Published
Edited
Aug 12, 2022
Insert cell
Insert cell
canvas = DOM.canvas(width,500)
Insert cell
{
h.solid().out()

// create dot
const o = (r,x,b) => {
// draw circle with radius r
let dot = h.shape(60,0.5,b).scale(r,0.57);
let y = ()=>Math.sin(h.time*0.0001);
// move to x position
dot.scrollX(x,0)
dot.scrollY(0,y)
return dot
}

// draw dot o(radius,x position,blur)
o(0.5,()=>Math.sin(h.time*0.1),.09).out()

}
Insert cell
h = hydra
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