@tsparticles/particles
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.
2 lines (1 loc) • 5.65 kB
JavaScript
!function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var s="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,s){return s in t||(t[s]={}),t[s]}})}:function(t){return t};t.__tsParticlesInternals.bundles=s(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=s(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=s(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=s(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=s(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=s(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=s(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=s(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=s(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=s(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=s(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=s(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=s(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,s){"object"==typeof exports&&"undefined"!=typeof module?s(exports,require("@tsparticles/engine"),require("@tsparticles/basic"),require("@tsparticles/plugin-interactivity"),require("@tsparticles/interaction-particles-collisions"),require("@tsparticles/interaction-particles-links")):"function"==typeof define&&define.amd?define(["exports","@tsparticles/engine","@tsparticles/basic","@tsparticles/plugin-interactivity","@tsparticles/interaction-particles-collisions","@tsparticles/interaction-particles-links"],s):s(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.bundles.particles=t.__tsParticlesInternals.bundles.particles||{}),t.__tsParticlesInternals.engine,t.__tsParticlesInternals.bundles.basic,t.__tsParticlesInternals.plugins.interactivity,t.__tsParticlesInternals.interactions.particlesCollisions,t.__tsParticlesInternals.interactions.particlesLinks)}(this,function(t,s,e,n,a,l){"use strict";const r=new Map;async function i(t,s,e,n){const a=r.get(s);if(a instanceof Promise)return a;if(a)return a;const l=(async()=>{const a={particles:{number:{value:(i=e).count??80},color:{value:i.color??"#fff"},links:{enable:i.links??!1,color:i.linksColor??"#fff",distance:i.linksLength??100},collisions:{enable:i.collisions??!1},move:{enable:!0,speed:i.speed??3},opacity:{value:i.opacity??1},shape:{type:i.shape??"circle"},size:{value:i.radius??3}}},l=await t.load({id:s,element:n,options:a});var i;if(!l)return void r.delete(s);const{ParticlesInstance:c}=await Promise.resolve().then(function(){return P}),_=new c(l);return r.set(s,_),_})();return r.set(s,l),l}let c=null;async function _(t){return c||(c=async function(t){t.checkVersion("4.0.0-beta.12"),await t.pluginManager.register(async t=>{await Promise.all([e.loadBasic(t),(async t=>{await n.loadInteractivityPlugin(t),await Promise.all([a.loadParticlesCollisionsInteraction(t),l.loadParticlesLinksInteraction(t)])})(t)])})}(t),c)}async function o(t,e){let n,a;return await _(s.tsParticles),s.isString(t)?(n=t,a=e??{}):(n="particles",a=t??{}),i(s.tsParticles,n,a)}o.create=async(t,e)=>{await _(s.tsParticles);const n=t.id||"particles";return i(s.tsParticles,n,e??{},t)},o.init=async()=>{await _(s.tsParticles)},o.version="4.0.0-beta.12",globalThis.particles=o;const p=globalThis;p.__tsParticlesInternals=p.__tsParticlesInternals??{},p.particles=o;var P=Object.freeze({__proto__:null,ParticlesInstance:class{_container;constructor(t){this._container=t}pause(){this._container.pause()}play(){this._container.play()}stop(){this._container.stop()}}});t.particles=o}),globalThis.__tsParticlesInternals=globalThis.__tsParticlesInternals||{},globalThis.__tsParticlesInternals.engine&&globalThis.__tsParticlesInternals.engine.tsParticles||(globalThis.__tsParticlesInternals.engine=globalThis.__tsParticlesInternals.bundles.particles||{}),delete(globalThis.window||globalThis).tsparticlesInternalExports;