import { Dotz } from 'https://esm.sh/dotz';
let my_dotz = new Dotz(
// canvas element
document.getElementById('#myCanvas'),
// URL for terrain image (dudv map)
"https://m4r.sh/terrains/spiral.png",
// options
{
speed: 0.5,
fade: 0.8,
particles: 4e5,
colors: {
"0.0": "transparent",
"0.1": "hsl(240,100%, 50%)",
"0.5": "hsl(300,100%, 50%)",
"1.0": "hsl(60 ,100%, 50%)"
}
}
)
Coming soon
Coming soon
Coming soon
Heavily inspired by other code. TODO: add references to blog post and original codebase
MIT © Marshall Brandt