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.
24 lines (23 loc) • 699 B
JavaScript
import { RepulseDiv } from "./RepulseDiv";
import { RepulseBase } from "./RepulseBase";
export class Repulse extends RepulseBase {
load(data) {
super.load(data);
if ((data === null || data === void 0 ? void 0 : data.divs) === undefined) {
return;
}
if (data.divs instanceof Array) {
this.divs = data.divs.map((s) => {
const tmp = new RepulseDiv();
tmp.load(s);
return tmp;
});
}
else {
if (this.divs instanceof Array || !this.divs) {
this.divs = new RepulseDiv();
}
this.divs.load(data.divs);
}
}
}