UNPKG

tsparticles

Version:

Easily create highly customizable particle 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) 786 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.OptionsColor = void 0; class OptionsColor { constructor() { this.value = "#fff"; } static create(source, data) { const color = source !== null && source !== void 0 ? source : new OptionsColor(); if (data !== undefined) { if (typeof data === "string" || data instanceof Array) { color.load({ value: data }); } else { color.load(data); } } return color; } load(data) { if ((data === null || data === void 0 ? void 0 : data.value) === undefined) { return; } this.value = data.value; } } exports.OptionsColor = OptionsColor;