UNPKG

tsparticles

Version:

Easily create highly customizable particle, confetti and fireworks animations and use them as animated backgrounds for your website. Ready to use components available also for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, Inferno.

45 lines (44 loc) 1.06 kB
/** * @category Options */ export class Push { constructor() { this.default = true; this.groups = []; this.quantity = 4; } /** * * @deprecated this property is obsolete, please use the new quantity */ get particles_nb() { return this.quantity; } /** * * @deprecated this property is obsolete, please use the new quantity * @param value */ set particles_nb(value) { this.quantity = value; } load(data) { var _a; if (data === undefined) { return; } if (data.default !== undefined) { this.default = data.default; } if (data.groups !== undefined) { this.groups = data.groups.map((t) => t); } if (!this.groups.length) { this.default = true; } const quantity = (_a = data.quantity) !== null && _a !== void 0 ? _a : data.particles_nb; if (quantity !== undefined) { this.quantity = quantity; } } }