कंफ़ेद्दी विस्फोट प्रीसेट
presets/presets/confettiExplosions कार्यक्षेत्र से आधिकारिक प्रीसेट।
स्थापित करें
bash
pnpm add @tsparticles/engine @tsparticles/preset-confetti-explosionsउपयोग के लिए तैयार (मैनुअल स्टार्ट/स्टॉप)
ts
import { tsParticles } from "@tsparticles/engine";
import { loadConfettiExplosionsPreset } from "@tsparticles/preset-confetti-explosions";
import type { Container } from "@tsparticles/engine";
let container: Container | undefined;
await loadConfettiExplosionsPreset(tsParticles);
export async function start(): Promise<void> {
container?.destroy();
container = await tsParticles.load({
id: "tsparticles",
options: {
preset: "confettiExplosions",
},
});
}
export function stop(): void {
container?.pause();
}
export function resume(): void {
container?.play();
}डेमो: https://particles.js.org/samples/presets/confettiExplosions
स्रोत दस्तावेज़: https://github.com/tsparticles/tsparticles/tree/main/presets/confettiExplosions#readme
