@tsparticles/interaction-external-trail
Version:
tsParticles trail external interaction
30 lines (29 loc) • 812 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Trail = void 0;
const engine_1 = require("@tsparticles/engine");
class Trail {
constructor() {
this.delay = 1;
this.pauseOnStop = false;
this.quantity = 1;
}
load(data) {
if ((0, engine_1.isNull)(data)) {
return;
}
if (data.delay !== undefined) {
this.delay = data.delay;
}
if (data.quantity !== undefined) {
this.quantity = data.quantity;
}
if (data.particles !== undefined) {
this.particles = (0, engine_1.deepExtend)({}, data.particles);
}
if (data.pauseOnStop !== undefined) {
this.pauseOnStop = data.pauseOnStop;
}
}
}
exports.Trail = Trail;