tsparticles
Version:
Easily create highly customizable particle 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.
40 lines (39 loc) • 1.03 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.RepulseDiv = void 0;
const RepulseBase_1 = require("./RepulseBase");
class RepulseDiv extends RepulseBase_1.RepulseBase {
constructor() {
super();
this.selectors = [];
}
get ids() {
if (this.selectors instanceof Array) {
return this.selectors.map((t) => t.replace("#", ""));
}
else {
return this.selectors.replace("#", "");
}
}
set ids(value) {
if (value instanceof Array) {
this.selectors = value.map(() => `#${value}`);
}
else {
this.selectors = `#${value}`;
}
}
load(data) {
super.load(data);
if (data === undefined) {
return;
}
if (data.ids !== undefined) {
this.ids = data.ids;
}
if (data.selectors !== undefined) {
this.selectors = data.selectors;
}
}
}
exports.RepulseDiv = RepulseDiv;