@tsparticles/engine
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.
29 lines (28 loc) • 778 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ParticlesDensity = void 0;
const TypeUtils_js_1 = require("../../../../Utils/TypeUtils.js");
class ParticlesDensity {
constructor() {
this.enable = false;
this.width = 1920;
this.height = 1080;
}
load(data) {
if ((0, TypeUtils_js_1.isNull)(data)) {
return;
}
if (data.enable !== undefined) {
this.enable = data.enable;
}
const width = data.width;
if (width !== undefined) {
this.width = width;
}
const height = data.height;
if (height !== undefined) {
this.height = height;
}
}
}
exports.ParticlesDensity = ParticlesDensity;