Konfeti Instance Factory. Create dedicated instances for your own canvas, separate defaults or particle budgets. The everyday fullscreen API is the shared Konfeti object; worker instances come from createWorker in konfeti/worker.
Konfeti
createWorker
konfeti/worker
Static
Create Instance.
Optional
Target Canvas (null or omitted creates a fullscreen overlay on first fire())
null
fire()
Instance Options
Konfeti Instance
const stage = KonfetiFactory.create(document.querySelector("#stage"), { maxParticles: 800, defaults: { paper: { form: "circle" } },});stage.fire({ particleCount: 80 });stage.destroy(); Copy
const stage = KonfetiFactory.create(document.querySelector("#stage"), { maxParticles: 800, defaults: { paper: { form: "circle" } },});stage.fire({ particleCount: 80 });stage.destroy();
Konfeti Instance Factory. Create dedicated instances for your own canvas, separate defaults or particle budgets. The everyday fullscreen API is the shared
Konfetiobject; worker instances come fromcreateWorkerinkonfeti/worker.