@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.
25 lines (24 loc) • 968 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MovePath = void 0;
const OptionLoader_js_1 = require("../../../../../Utils/OptionLoader.js");
const ValueWithRandom_js_1 = require("../../../ValueWithRandom.js");
const Utils_js_1 = require("../../../../../Utils/Utils.js");
const OptionsUtils_js_1 = require("../../../../../Utils/OptionsUtils.js");
class MovePath extends OptionLoader_js_1.OptionLoader {
clamp = true;
delay = new ValueWithRandom_js_1.ValueWithRandom();
enable = false;
generator;
options = {};
doLoad(data) {
(0, OptionsUtils_js_1.loadProperty)(this, "clamp", data.clamp);
this.delay.load(data.delay);
(0, OptionsUtils_js_1.loadProperty)(this, "enable", data.enable);
this.generator = data.generator;
if (data.options) {
this.options = (0, Utils_js_1.deepExtend)(this.options, data.options);
}
}
}
exports.MovePath = MovePath;