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.

22 lines (21 loc) • 878 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Paint = void 0; const AnimatableColor_js_1 = require("../AnimatableColor.js"); const Fill_js_1 = require("./Fill.js"); const OptionLoader_js_1 = require("../../../Utils/OptionLoader.js"); const Stroke_js_1 = require("./Stroke.js"); const OptionsUtils_js_1 = require("../../../Utils/OptionsUtils.js"); class Paint extends OptionLoader_js_1.OptionLoader { color; fill; stroke; doLoad(data) { if (data.color !== undefined) { this.color = AnimatableColor_js_1.AnimatableColor.create(this.color, data.color); } (0, OptionsUtils_js_1.loadLazyProperty)(this, "fill", data.fill, () => new Fill_js_1.Fill()); (0, OptionsUtils_js_1.loadLazyProperty)(this, "stroke", data.stroke, () => new Stroke_js_1.Stroke()); } } exports.Paint = Paint;