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.

30 lines (29 loc) 694 B
export class Density { constructor() { this.enable = false; this.area = 800; this.factor = 1000; } get value_area() { return this.area; } set value_area(value) { this.area = value; } load(data) { var _a; if (data === undefined) { return; } if (data.enable !== undefined) { this.enable = data.enable; } const area = (_a = data.area) !== null && _a !== void 0 ? _a : data.value_area; if (area !== undefined) { this.area = area; } if (data.factor !== undefined) { this.factor = data.factor; } } }