const floatParticles = [];
const burstPacticles = [];
const FLOAT_COUNT = 140;
for (let i = 0; i < FLOAT_COUNT ; i++) {
const p = new Particle(
Math.random() * width, Math.random() * height, "float");
p.life = Math.random() * p.maxlife;// stagger starting life
floatParticles.push(p);
}
function spawHeartBurst(x, y) {
const count = 140;
for (let i = 0; i < count; i++) {
burstPacticles.push(new Particle(x, y, "burst"));
}
}
BLUE_SHADES = [
"#3b82f6", "#60a5fa", // blue-400
"#93c5fd", "#2563eb", // blue-600
"#bfdbfe", "#1d4ed8", // blue-700
To embed this project on your website, copy the following code and paste it into your website's HTML: