UNPKG

@tsparticles/particles

Version:

Minimal tsParticles particles bundle — lightweight particle engine without confetti or fireworks extras. Perfect for pure particle backgrounds. Ready to use components available for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, In

30 lines (29 loc) • 701 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ParticlesInstance = void 0; const utils_js_1 = require("./utils.js"); class ParticlesInstance { #container; #id; constructor(container, id) { this.#container = container; this.#id = id; } get destroyed() { return this.#container.destroyed; } destroy() { this.#container.destroy(); (0, utils_js_1.deleteParticlesInstance)(this.#id, this); } pause() { this.#container.pause(); } play() { this.#container.play(); } stop() { this.#container.stop(); } } exports.ParticlesInstance = ParticlesInstance;