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.
35 lines (34 loc) • 1.15 kB
JavaScript
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports", "./ThemeDefault", "../../../Utils/Utils"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Theme = void 0;
const ThemeDefault_1 = require("./ThemeDefault");
const Utils_1 = require("../../../Utils/Utils");
class Theme {
constructor() {
this.name = "";
this.default = new ThemeDefault_1.ThemeDefault();
}
load(data) {
if (!data) {
return;
}
if (data.name !== undefined) {
this.name = data.name;
}
this.default.load(data.default);
if (data.options !== undefined) {
this.options = (0, Utils_1.deepExtend)({}, data.options);
}
}
}
exports.Theme = Theme;
});