@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.64 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=function(t,s){return{fullScreen:{enable:!s},particles:{number:{value:t.count??80},color:{value:t.color??"#fff"},links:{enable:t.links??!1,color:t.linksColor??"#fff",distance:t.linksLength??100},collisions:{enable:t.collisions??!1},move:{enable:!0,speed:t.speed??3},opacity:{value:t.opacity??1},shape:{type:t.shape??"circle"},size:{value:t.radius??3}}}}(e,n),l=await t.load({id:s,element:n,options:a});if(!l)return void r.delete(s);const{ParticlesInstance:i}=await Promise.resolve().then(function(){return P}),c=new i(l);return r.set(s,c),c})();return r.set(s,l),l}let c=null;async function _(t){return c||(c=async function(t){t.checkVersion("4.1.1"),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??void 0)},o.init=async()=>{await _(s.tsParticles)},o.version="4.1.1",globalThis.particles=o;const p=globalThis;p.__tsParticlesInternals=p.__tsParticlesInternals??{},p.particles=o;var P=Object.freeze({__proto__:null,ParticlesInstance:class{#t;constructor(t){this.#t=t}pause(){this.#t.pause()}play(){this.#t.play()}stop(){this.#t.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;