UNPKG

@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.

24 lines (23 loc) • 771 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ColorAnimation = void 0; const OptionsUtils_js_1 = require("../../Utils/OptionsUtils.js"); const AnimationOptions_js_1 = require("./AnimationOptions.js"); class ColorAnimation extends AnimationOptions_js_1.AnimationOptions { max; min; offset = 0; sync = true; constructor(min, max) { super(); this.min = min; this.max = max; } doLoad(data) { super.doLoad(data); (0, OptionsUtils_js_1.loadProperty)(this, "max", data.max); (0, OptionsUtils_js_1.loadProperty)(this, "min", data.min); (0, OptionsUtils_js_1.loadRangeProperty)(this, "offset", data.offset); } } exports.ColorAnimation = ColorAnimation;