@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.
28 lines (27 loc) • 869 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.OptionsColor = void 0;
const TypeUtils_js_1 = require("../../Utils/TypeUtils.js");
const OptionLoader_js_1 = require("../../Utils/OptionLoader.js");
class OptionsColor extends OptionLoader_js_1.OptionLoader {
value = "";
static create(source, data) {
const color = new OptionsColor();
color.load(source);
if (data !== undefined) {
if ((0, TypeUtils_js_1.isString)(data) || (0, TypeUtils_js_1.isArray)(data)) {
color.load({ value: data });
}
else {
color.load(data);
}
}
return color;
}
doLoad(data) {
if (!(0, TypeUtils_js_1.isNull)(data.value)) {
this.value = data.value;
}
}
}
exports.OptionsColor = OptionsColor;