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