@tsparticles/fireworks
Version:
tsParticles fireworks bundle — easily create spectacular fireworks and fountain particle effects with built-in presets. Ready to use components available for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, Inferno.
26 lines (25 loc) • 538 B
JavaScript
import { deleteFireworksInstance } from "./utils.js";
export class FireworksInstance {
#container;
#id;
constructor(container, id) {
this.#container = container;
this.#id = id;
}
get destroyed() {
return this.#container.destroyed;
}
destroy() {
this.#container.destroy();
deleteFireworksInstance(this.#id);
}
pause() {
this.#container.pause();
}
play() {
this.#container.play();
}
stop() {
this.#container.stop();
}
}