@tsparticles/interaction-external-trail 4.0.0-beta.12 → 4.0.0-beta.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"),require("@tsparticles/plugin-interactivity"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine","@tsparticles/plugin-interactivity"],t);else{var r="object"==typeof exports?t(require("@tsparticles/engine"),require("@tsparticles/plugin-interactivity")):t(e.window,e.window);for(var i in r)("object"==typeof exports?exports:e)[i]=r[i]}}(this,(e,t)=>(()=>{"use strict";var r,i,o,n={303(t){t.exports=e},702(e){e.exports=t},468(e,t,r){r.d(t,{X:()=>s});var i=r(303);class o{x;y;constructor(){this.x=0,this.y=0}load(e){e&&(void 0!==e.x&&(this.x=e.x),void 0!==e.y&&(this.y=e.y))}}class n{value;weights;constructor(){this.weights=new o}load(e){e&&(e.weights&&(this.weights??=new o,this.weights.load(e.weights)),(0,i.isNull)(e.value)||(this.value=(0,i.setRangeValue)(e.value)))}}class a{h;l;s;constructor(){this.h=new n,this.s=new n,this.l=new n}load(e){e&&(e.h&&(this.h??=new n,this.h.load(e.h)),e.s&&(this.s??=new n,this.s.load(e.s)),e.l&&(this.l??=new n,this.l.load(e.l)))}}class s{colorCoords;delay;particles;pauseOnStop;quantity;constructor(){this.delay=1,this.pauseOnStop=!1,this.quantity=1,this.colorCoords=new a}load(e){!(0,i.isNull)(e)&&(void 0!==e.delay&&(this.delay=e.delay),void 0!==e.quantity&&(this.quantity=e.quantity),void 0!==e.pauseOnStop&&(this.pauseOnStop=e.pauseOnStop),void 0!==e.particles&&(this.particles=(0,i.deepExtend)({},e.particles)),e.colorCoords&&(this.colorCoords??=new a,this.colorCoords.load(e.colorCoords)))}}}},a={};function s(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={exports:{}};return n[e](r,r.exports,s),r.exports}s.m=n,c=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(e,t){if(1&t&&(e=this(e)),8&t||"object"==typeof e&&e&&(4&t&&e.__esModule||16&t&&"function"==typeof e.then))return e;var r=Object.create(null);s.r(r);var i={};l=l||[null,c({}),c([]),c(c)];for(var o=2&t&&e;("object"==typeof o||"function"==typeof o)&&!~l.indexOf(o);o=c(o))Object.getOwnPropertyNames(o).forEach(t=>i[t]=()=>e[t]);return i.default=()=>e,s.d(r,i),r},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce((t,r)=>(s.f[r](e,t),t),[])),s.u=e=>""+e+".min.js",s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u={},s.l=(e,t,r,i)=>{if(u[e])return void u[e].push(t);if(void 0!==r)for(var o,n,a=document.getElementsByTagName("script"),l=0;l<a.length;l++){var c=a[l];if(c.getAttribute("src")==e||c.getAttribute("data-webpack")=="@tsparticles/interaction-external-trail:"+r){o=c;break}}o||(n=!0,(o=document.createElement("script")).charset="utf-8",s.nc&&o.setAttribute("nonce",s.nc),o.setAttribute("data-webpack","@tsparticles/interaction-external-trail:"+r),o.src=e),u[e]=[t];var p=(t,r)=>{o.onerror=o.onload=null,clearTimeout(d);var i=u[e];if(delete u[e],o.parentNode&&o.parentNode.removeChild(o),i&&i.forEach(e=>e(r)),t)return t(r)},d=setTimeout(p.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=p.bind(null,o.onerror),o.onload=p.bind(null,o.onload),n&&document.head.appendChild(o)},s.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.g.importScripts&&(p=s.g.location+"");var l,c,u,p,d=s.g.document;if(!p&&d&&(d.currentScript&&"SCRIPT"===d.currentScript.tagName.toUpperCase()&&(p=d.currentScript.src),!p)){var h=d.getElementsByTagName("script");if(h.length)for(var f=h.length-1;f>-1&&(!p||!/^http(s?):/.test(p));)p=h[f--].src}if(!p)throw Error("Automatic publicPath is not supported in this browser");s.p=p=p.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r={54:0},s.f.j=(e,t)=>{var i=s.o(r,e)?r[e]:void 0;if(0!==i)if(i)t.push(i[2]);else{var o=new Promise((t,o)=>i=r[e]=[t,o]);t.push(i[2]=o);var n=s.p+s.u(e),a=Error();s.l(n,t=>{if(s.o(r,e)&&(0!==(i=r[e])&&(r[e]=void 0),i)){var o=t&&("load"===t.type?"missing":t.type),n=t&&t.target&&t.target.src;a.message="Loading chunk "+e+` failed.
2
- (`+o+": "+n+")",a.name="ChunkLoadError",a.type=o,a.request=n,i[1](a)}},"chunk-"+e,e)}},i=(e,t)=>{var i,o,[n,a,l]=t,c=0;if(n.some(e=>0!==r[e])){for(i in a)s.o(a,i)&&(s.m[i]=a[i]);l&&l(s)}for(e&&e(t);c<n.length;c++)o=n[c],s.o(r,o)&&r[o]&&r[o][0](),r[o]=0},(o=this.webpackChunk_tsparticles_interaction_external_trail=this.webpackChunk_tsparticles_interaction_external_trail||[]).forEach(i.bind(null,0)),o.push=i.bind(null,o.push.bind(o));var y={};s.r(y),s.d(y,{Trail:()=>g.X,loadExternalTrailInteraction:()=>v});var g=s(468);async function v(e){e.checkVersion("4.0.0-beta.12"),await e.pluginManager.register(async e=>{let{ensureInteractivityPluginLoaded:t}=await Promise.resolve().then(s.t.bind(s,702,19));t(e),e.pluginManager.addInteractor?.("externalTrail",async t=>{let{TrailMaker:r}=await s.e(564).then(s.bind(s,564));return new r(e.pluginManager,t)})})}return y})());
1
+ !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/plugin-interactivity"),require("@tsparticles/engine")):"function"==typeof define&&define.amd?define(["exports","@tsparticles/plugin-interactivity","@tsparticles/engine"],s):s(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.interactions.externalTrail=t.__tsParticlesInternals.interactions.externalTrail||{}),t.__tsParticlesInternals.plugins.interactivity,t.__tsParticlesInternals.engine)}(this,function(t,s,e){"use strict";class a{x;y;constructor(){this.x=0,this.y=0}load(t){t&&(void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y))}}class n{value;weights;constructor(){this.weights=new a}load(t){t&&(t.weights&&(this.weights??=new a,this.weights.load(t.weights)),e.isNull(t.value)||(this.value=e.setRangeValue(t.value)))}}class i{h;l;s;constructor(){this.h=new n,this.s=new n,this.l=new n}load(t){t&&(t.h&&(this.h??=new n,this.h.load(t.h)),t.s&&(this.s??=new n,this.s.load(t.s)),t.l&&(this.l??=new n,this.l.load(t.l)))}}class l{colorCoords;delay;particles;pauseOnStop;quantity;constructor(){this.delay=1,this.pauseOnStop=!1,this.quantity=1,this.colorCoords=new i}load(t){e.isNull(t)||(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.quantity&&(this.quantity=t.quantity),void 0!==t.pauseOnStop&&(this.pauseOnStop=t.pauseOnStop),void 0!==t.particles&&(this.particles=e.deepExtend({},t.particles)),t.colorCoords&&(this.colorCoords??=new i,this.colorCoords.load(t.colorCoords)))}}const r="trail";class c extends s.ExternalInteractorBase{maxDistance=0;_delay;_lastPosition;_pluginManager;constructor(t,s){super(s),this._pluginManager=t,this._delay=0}clear(){}init(){}interact(t,s){const a=this.container;if(!a.retina.reduceFactor)return;const n=a.actualOptions,i=n.interactivity?.modes.trail;if(!i)return;const l=i.delay*e.millisecondsToSeconds/this.container.retina.reduceFactor;if(this._delay<l&&(this._delay+=s.value),this._delay<l)return;const r=t.mouse.position,c=!(i.pauseOnStop&&(r===this._lastPosition||r?.x===this._lastPosition?.x&&r?.y===this._lastPosition?.y));if(r?this._lastPosition={...r}:delete this._lastPosition,c&&r){let t=i.particles;const s=i.colorCoords;if(s){const{width:n,height:l}=a.canvas.size,c={x:r.x/n,y:r.y/l},o=t=>!!(t?.weights?.x??t?.weights?.y),_=(t,s,a)=>{if(!o(t))return;const n=t?.weights,i=c.x*(n?.x??0)+c.y*(n?.y??0),l=t?.value??s,r=e.getRangeMin(l??0),_=e.getRangeMax(l??a),p=r+i*(_-r);return Math.min(_,Math.max(r,p))},p=i.particles?.paint?e.itemFromSingleOrMultiple(i.particles.paint):void 0,h=p?.fill,u=h?e.rangeColorToHsl(this._pluginManager,e.AnimatableColor.create(void 0,h.color)):void 0,d=_(s.h,u?.h,e.hMax),I=_(s.s,u?.s,e.sMax),P=_(s.l,u?.l,e.lMax);void 0===d&&void 0===I&&void 0===P||(t=e.deepExtend({},i.particles,{paint:{fill:{color:{value:{h:d??u?.h,s:I??u?.s,l:P??u?.l}}}}}))}a.particles.push(i.quantity,r,t)}this._delay-=l}isEnabled(t,s){const a=this.container.actualOptions,n=t.mouse,i=(s?.interactivity??a.interactivity)?.events;return!!i&&(n.clicking&&n.inside&&!!n.position&&e.isInArray(r,i.onClick.mode)||n.inside&&!!n.position&&e.isInArray(r,i.onHover.mode))}loadModeOptions(t,...s){t.trail??=new l;for(const e of s)t.trail.load(e?.trail)}reset(){}}async function o(t){t.checkVersion("4.0.0-beta.16"),await t.pluginManager.register(t=>{s.ensureInteractivityPluginLoaded(t),t.pluginManager.addInteractor?.("externalTrail",s=>Promise.resolve(new c(t.pluginManager,s)))})}const _=globalThis;_.__tsParticlesInternals=_.__tsParticlesInternals??{},_.loadExternalTrailInteraction=o,t.Trail=l,t.loadExternalTrailInteraction=o}),Object.assign(globalThis.window||globalThis,{loadExternalTrailInteraction:(globalThis.__tsParticlesInternals.interactions.externalTrail||{}).loadExternalTrailInteraction}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
@@ -0,0 +1 @@
1
+ export * from "./index.js";
@@ -0,0 +1,7 @@
1
+ import { type Engine } from "@tsparticles/engine/lazy";
2
+ export declare function loadExternalTrailInteraction(engine: Engine): Promise<void>;
3
+ export * from "./Options/Classes/Trail.js";
4
+ export type * from "./Options/Interfaces/ITrail.js";
5
+ export type { ITrailColorWeight } from "./Options/Interfaces/ITrailColorWeight.js";
6
+ export type { ITrailColorCoords } from "./Options/Interfaces/ITrailColorCoords.js";
7
+ export type { ITrailColorComponent } from "./Options/Interfaces/ITrailColorComponent.js";
package/564.min.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(this.webpackChunk_tsparticles_interaction_external_trail=this.webpackChunk_tsparticles_interaction_external_trail||[]).push([[564],{564(t,i,e){e.d(i,{TrailMaker:()=>r});var a=e(303),s=e(702),l=e(468);let n="trail";class r extends s.ExternalInteractorBase{maxDistance=0;_delay;_lastPosition;_pluginManager;constructor(t,i){super(i),this._pluginManager=t,this._delay=0}clear(){}init(){}interact(t,i){let e=this.container;if(!e.retina.reduceFactor)return;let s=e.actualOptions,l=s.interactivity?.modes.trail;if(!l)return;let n=l.delay*a.millisecondsToSeconds/this.container.retina.reduceFactor;if(this._delay<n&&(this._delay+=i.value),this._delay<n)return;let r=t.mouse.position,o=!(l.pauseOnStop&&(r===this._lastPosition||r?.x===this._lastPosition?.x&&r?.y===this._lastPosition?.y));if(r?this._lastPosition={...r}:delete this._lastPosition,o&&r){let t=l.particles,i=l.colorCoords;if(i){let{width:s,height:n}=e.canvas.size,o={x:r.x/s,y:r.y/n},c=(t,i,e)=>{if(!(t?.weights?.x??t?.weights?.y))return;let s=t?.weights,l=o.x*(s?.x??0)+o.y*(s?.y??0),n=t?.value??i,r=(0,a.getRangeMin)(n??0),c=(0,a.getRangeMax)(n??e);return Math.min(c,Math.max(r,r+l*(c-r)))},d=l.particles?.paint?(0,a.itemFromSingleOrMultiple)(l.particles.paint):void 0,h=d?.fill,p=h?(0,a.rangeColorToHsl)(this._pluginManager,a.AnimatableColor.create(void 0,h.color)):void 0,u=c(i.h,p?.h,a.hMax),_=c(i.s,p?.s,a.sMax),y=c(i.l,p?.l,a.lMax);(void 0!==u||void 0!==_||void 0!==y)&&(t=(0,a.deepExtend)({},l.particles,{paint:{fill:{color:{value:{h:u??p?.h,s:_??p?.s,l:y??p?.l}}}}}))}e.particles.push(l.quantity,r,t)}this._delay-=n}isEnabled(t,i){let e=this.container.actualOptions,s=t.mouse,l=(i?.interactivity??e.interactivity)?.events;return!!l&&(s.clicking&&s.inside&&!!s.position&&(0,a.isInArray)(n,l.onClick.mode)||s.inside&&!!s.position&&(0,a.isInArray)(n,l.onHover.mode))}loadModeOptions(t,...i){for(let e of(t.trail??=new l.X,i))t.trail.load(e?.trail)}reset(){}}}}]);
@@ -1,30 +0,0 @@
1
- /*!
2
- * Author : Matteo Bruni
3
- * MIT license: https://opensource.org/licenses/MIT
4
- * Demo / Generator : https://particles.js.org/
5
- * GitHub : https://www.github.com/matteobruni/tsparticles
6
- * How to use? : Check the GitHub README
7
- * v4.0.0-beta.12
8
- */
9
- "use strict";
10
- /*
11
- * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
12
- * This devtool is neither made for production nor for readable output files.
13
- * It uses "eval()" calls to create a separate source file in the browser devtools.
14
- * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
15
- * or disable the default devtool with "devtool: false".
16
- * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
17
- */
18
- (this["webpackChunk_tsparticles_interaction_external_trail"] = this["webpackChunk_tsparticles_interaction_external_trail"] || []).push([["dist_browser_TrailMaker_js"],{
19
-
20
- /***/ "./dist/browser/TrailMaker.js"
21
- /*!************************************!*\
22
- !*** ./dist/browser/TrailMaker.js ***!
23
- \************************************/
24
- (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
25
-
26
- eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ TrailMaker: () => (/* binding */ TrailMaker)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_plugin_interactivity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tsparticles/plugin-interactivity */ \"@tsparticles/plugin-interactivity\");\n/* harmony import */ var _Options_Classes_Trail_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Options/Classes/Trail.js */ \"./dist/browser/Options/Classes/Trail.js\");\n\n\n\nconst trailMode = \"trail\", defaultMin = 0, defaultWeight = 0;\nclass TrailMaker extends _tsparticles_plugin_interactivity__WEBPACK_IMPORTED_MODULE_1__.ExternalInteractorBase {\n maxDistance = 0;\n _delay;\n _lastPosition;\n _pluginManager;\n constructor(pluginManager, container){\n super(container);\n this._pluginManager = pluginManager;\n this._delay = 0;\n }\n clear() {}\n init() {}\n interact(interactivityData, delta) {\n const container = this.container;\n if (!container.retina.reduceFactor) return;\n const options = container.actualOptions, trailOptions = options.interactivity?.modes.trail;\n if (!trailOptions) return;\n const optDelay = trailOptions.delay * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.millisecondsToSeconds / this.container.retina.reduceFactor;\n if (this._delay < optDelay) {\n this._delay += delta.value;\n }\n if (this._delay < optDelay) return;\n const mousePos = interactivityData.mouse.position, canEmit = !(trailOptions.pauseOnStop && (mousePos === this._lastPosition || mousePos?.x === this._lastPosition?.x && mousePos?.y === this._lastPosition?.y));\n if (mousePos) {\n this._lastPosition = {\n ...mousePos\n };\n } else {\n delete this._lastPosition;\n }\n if (canEmit && mousePos) {\n let particleOptions = trailOptions.particles;\n const colorCoords = trailOptions.colorCoords;\n if (colorCoords) {\n const { width, height } = container.canvas.size, norm = {\n x: mousePos.x / width,\n y: mousePos.y / height\n }, hasWeights = (comp)=>{\n return !!(comp?.weights?.x ?? comp?.weights?.y);\n }, calculateValue = (comp, originalValue, defaultMax)=>{\n if (!hasWeights(comp)) return undefined;\n const w = comp?.weights, factor = norm.x * (w?.x ?? defaultWeight) + norm.y * (w?.y ?? defaultWeight), rangeSource = comp?.value ?? originalValue, min = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeMin)(rangeSource ?? defaultMin), max = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeMax)(rangeSource ?? defaultMax), result = min + factor * (max - min);\n return Math.min(max, Math.max(min, result));\n }, trailPaintOptions = trailOptions.particles?.paint ? (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.itemFromSingleOrMultiple)(trailOptions.particles.paint) : undefined, fillData = trailPaintOptions?.fill, baseHsl = fillData ? (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.rangeColorToHsl)(this._pluginManager, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.AnimatableColor.create(undefined, fillData.color)) : undefined, h = calculateValue(colorCoords.h, baseHsl?.h, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.hMax), s = calculateValue(colorCoords.s, baseHsl?.s, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.sMax), l = calculateValue(colorCoords.l, baseHsl?.l, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.lMax);\n if (h !== undefined || s !== undefined || l !== undefined) {\n particleOptions = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.deepExtend)({}, trailOptions.particles, {\n paint: {\n fill: {\n color: {\n value: {\n h: h ?? baseHsl?.h,\n s: s ?? baseHsl?.s,\n l: l ?? baseHsl?.l\n }\n }\n }\n }\n });\n }\n }\n container.particles.push(trailOptions.quantity, mousePos, particleOptions);\n }\n this._delay -= optDelay;\n }\n isEnabled(interactivityData, particle) {\n const container = this.container, options = container.actualOptions, mouse = interactivityData.mouse, events = (particle?.interactivity ?? options.interactivity)?.events;\n return !!events && (mouse.clicking && mouse.inside && !!mouse.position && (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isInArray)(trailMode, events.onClick.mode) || mouse.inside && !!mouse.position && (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isInArray)(trailMode, events.onHover.mode));\n }\n loadModeOptions(options, ...sources) {\n options.trail ??= new _Options_Classes_Trail_js__WEBPACK_IMPORTED_MODULE_2__.Trail();\n for (const source of sources){\n options.trail.load(source?.trail);\n }\n }\n reset() {}\n}\n\n\n//# sourceURL=webpack://@tsparticles/interaction-external-trail/./dist/browser/TrailMaker.js?\n}");
27
-
28
- /***/ }
29
-
30
- }]);