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.
33 lines (32 loc) • 884 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.MoveTrail = void 0;
const MoveTrailFill_1 = require("./MoveTrailFill");
class MoveTrail {
constructor() {
this.enable = false;
this.length = 10;
this.fill = new MoveTrailFill_1.MoveTrailFill();
}
get fillColor() {
return this.fill.color;
}
set fillColor(value) {
this.fill.load({ color: value });
}
load(data) {
if (!data) {
return;
}
if (data.enable !== undefined) {
this.enable = data.enable;
}
if (data.fill !== undefined || data.fillColor !== undefined) {
this.fill.load(data.fill || { color: data.fillColor });
}
if (data.length !== undefined) {
this.length = data.length;
}
}
}
exports.MoveTrail = MoveTrail;
;