UNPKG

@tsparticles/path-perlin-noise

Version:

tsParticles perlin noise path

42 lines (36 loc) 5.23 kB
(function(g){g.__tsParticlesInternals=g.__tsParticlesInternals||{};g.__tsParticlesInternals.bundles=g.__tsParticlesInternals.bundles||{};g.__tsParticlesInternals.effects=g.__tsParticlesInternals.effects||{};g.__tsParticlesInternals.engine=g.__tsParticlesInternals.engine||{};g.__tsParticlesInternals.interactions=g.__tsParticlesInternals.interactions||{};g.__tsParticlesInternals.palettes=g.__tsParticlesInternals.palettes||{};g.__tsParticlesInternals.paths=g.__tsParticlesInternals.paths||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins.emittersShapes=g.__tsParticlesInternals.plugins.emittersShapes||{};g.__tsParticlesInternals.presets=g.__tsParticlesInternals.presets||{};g.__tsParticlesInternals.shapes=g.__tsParticlesInternals.shapes||{};g.__tsParticlesInternals.updaters=g.__tsParticlesInternals.updaters||{};g.__tsParticlesInternals.utils=g.__tsParticlesInternals.utils||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas.utils=g.__tsParticlesInternals.canvas.utils||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path.utils=g.__tsParticlesInternals.path.utils||{};var __tsProxyFactory=typeof Proxy!=="undefined"?function(obj){return new Proxy(obj,{get:function(target,key){if(!(key in target)){target[key]={};}return target[key];}});}:function(obj){return obj;};g.__tsParticlesInternals.bundles=__tsProxyFactory(g.__tsParticlesInternals.bundles);g.__tsParticlesInternals.effects=__tsProxyFactory(g.__tsParticlesInternals.effects);g.__tsParticlesInternals.interactions=__tsProxyFactory(g.__tsParticlesInternals.interactions);g.__tsParticlesInternals.palettes=__tsProxyFactory(g.__tsParticlesInternals.palettes);g.__tsParticlesInternals.paths=__tsProxyFactory(g.__tsParticlesInternals.paths);g.__tsParticlesInternals.plugins=__tsProxyFactory(g.__tsParticlesInternals.plugins);g.__tsParticlesInternals.plugins.emittersShapes=__tsProxyFactory(g.__tsParticlesInternals.plugins.emittersShapes);g.__tsParticlesInternals.presets=__tsProxyFactory(g.__tsParticlesInternals.presets);g.__tsParticlesInternals.shapes=__tsProxyFactory(g.__tsParticlesInternals.shapes);g.__tsParticlesInternals.updaters=__tsProxyFactory(g.__tsParticlesInternals.updaters);g.__tsParticlesInternals.utils=__tsProxyFactory(g.__tsParticlesInternals.utils);g.__tsParticlesInternals.canvas=__tsProxyFactory(g.__tsParticlesInternals.canvas);g.__tsParticlesInternals.path=__tsProxyFactory(g.__tsParticlesInternals.path);g.tsparticlesInternalExports=g.tsparticlesInternalExports||{};})(typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:this); /* Path v4.1.0 */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tsparticles/plugin-move'), require('@tsparticles/noise-field'), require('@tsparticles/perlin-noise')) : typeof define === 'function' && define.amd ? define(['exports', '@tsparticles/plugin-move', '@tsparticles/noise-field', '@tsparticles/perlin-noise'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.__tsParticlesInternals = global.__tsParticlesInternals || {}, global.__tsParticlesInternals.paths = global.__tsParticlesInternals.paths || {}, global.__tsParticlesInternals.paths.perlinNoise = global.__tsParticlesInternals.paths.perlinNoise || {}), global.__tsParticlesInternals.plugins.move, global.__tsParticlesInternals.noise.field, global.__tsParticlesInternals.perlin.noise)); })(this, (function (exports, pluginMove, noiseField, perlinNoise) { 'use strict'; class PerlinNoiseGenerator extends noiseField.NoiseFieldGenerator { constructor(container) { const perlinNoise$1 = new perlinNoise.PerlinNoise(); super(container, { noise4d: (x, y, z, w) => perlinNoise$1.noise4d(x, y, z, w), seed: seed => { perlinNoise$1.seed(seed); }, }); } } const perlinNoisePathName = "perlinNoise"; async function loadPerlinNoisePath(engine) { engine.checkVersion("4.1.0"); await engine.pluginManager.register((e) => { pluginMove.ensureBaseMoverLoaded(e); e.pluginManager.addPathGenerator?.(perlinNoisePathName, container => { return Promise.resolve(new PerlinNoiseGenerator(container)); }); }); } const globalObject = globalThis; globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {}; globalObject.loadPerlinNoisePath = loadPerlinNoisePath; exports.loadPerlinNoisePath = loadPerlinNoisePath; exports.perlinNoisePathName = perlinNoisePathName; })); Object.assign(globalThis.window || globalThis, { loadPerlinNoisePath: (globalThis.__tsParticlesInternals.paths.perlinNoise || {}).loadPerlinNoisePath }); delete (globalThis.window || globalThis).tsparticlesInternalExports;