UNPKG

tsparticles

Version:

Full-featured tsParticles bundle — create stunning particle, confetti and fireworks animations with all official plugins and presets included. Ready to use components available for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, Inf

43 lines (42 loc) 1.88 kB
import { loadAbsorbersPlugin } from "@tsparticles/plugin-absorbers"; import { loadDestroyUpdater } from "@tsparticles/updater-destroy"; import { loadEmittersPlugin } from "@tsparticles/plugin-emitters"; import { loadEmittersShapeCircle } from "@tsparticles/plugin-emitters-shape-circle"; import { loadEmittersShapeSquare } from "@tsparticles/plugin-emitters-shape-square"; import { loadExternalDragInteraction } from "@tsparticles/interaction-external-drag"; import { loadExternalTrailInteraction } from "@tsparticles/interaction-external-trail"; import { loadRollUpdater } from "@tsparticles/updater-roll"; import { loadSlim } from "@tsparticles/slim"; import { loadTextShape } from "@tsparticles/shape-text"; import { loadTiltUpdater } from "@tsparticles/updater-tilt"; import { loadTwinkleUpdater } from "@tsparticles/updater-twinkle"; import { loadWobbleUpdater } from "@tsparticles/updater-wobble"; export async function loadFull(engine) { engine.checkVersion("4.3.0"); await engine.pluginManager.register(async (e) => { const loadEmittersPluginBundle = async (e) => { await loadEmittersPlugin(e); await Promise.all([ loadEmittersShapeCircle(e), loadEmittersShapeSquare(e), ]); }, loadInteractivityForFull = async (e) => { await loadSlim(e); await Promise.all([ loadExternalDragInteraction(e), loadExternalTrailInteraction(e), loadAbsorbersPlugin(e), loadEmittersPluginBundle(e), ]); }; await Promise.all([ loadInteractivityForFull(e), loadDestroyUpdater(e), loadRollUpdater(e), loadTiltUpdater(e), loadTwinkleUpdater(e), loadWobbleUpdater(e), loadTextShape(e), ]); }); }