@tsparticles/interaction-external-bubble 4.3.1 → 4.4.0
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.
- package/browser/Bubbler.js +1 -1
- package/browser/index.js +1 -1
- package/browser/index.lazy.js +1 -1
- package/cjs/Bubbler.js +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.lazy.js +1 -1
- package/esm/Bubbler.js +1 -1
- package/esm/index.js +1 -1
- package/esm/index.lazy.js +1 -1
- package/package.json +3 -3
- package/report.html +1 -1
- package/tsparticles.interaction.external.bubble.js +3 -3
- package/tsparticles.interaction.external.bubble.min.js +1 -1
package/browser/Bubbler.js
CHANGED
|
@@ -199,7 +199,7 @@ export class Bubbler extends ExternalInteractorBase {
|
|
|
199
199
|
mod.strokeColor = undefined;
|
|
200
200
|
const pColor = particle.getFillColor();
|
|
201
201
|
if (pColor) {
|
|
202
|
-
const mixedColor = rgbToHsl(colorMix(pColor, mod.finalColor, ratioOffset - ratio, ratio));
|
|
202
|
+
const mixedColor = rgbToHsl(colorMix(pColor, mod.finalColor, ratioOffset - ratio, ratio, this.container.hdr));
|
|
203
203
|
mod.fillColor = mixedColor;
|
|
204
204
|
mod.strokeColor = mixedColor;
|
|
205
205
|
}
|
package/browser/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ensureInteractivityPluginLoaded } from "@tsparticles/plugin-interactivity";
|
|
2
2
|
import { Bubbler } from "./Bubbler.js";
|
|
3
3
|
export async function loadExternalBubbleInteraction(engine) {
|
|
4
|
-
engine.checkVersion("4.
|
|
4
|
+
engine.checkVersion("4.4.0");
|
|
5
5
|
await engine.pluginManager.register((e) => {
|
|
6
6
|
ensureInteractivityPluginLoaded(e);
|
|
7
7
|
e.pluginManager.addInteractor?.("externalBubble", container => {
|
package/browser/index.lazy.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export async function loadExternalBubbleInteraction(engine) {
|
|
2
|
-
engine.checkVersion("4.
|
|
2
|
+
engine.checkVersion("4.4.0");
|
|
3
3
|
await engine.pluginManager.register(async (e) => {
|
|
4
4
|
const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity/lazy");
|
|
5
5
|
ensureInteractivityPluginLoaded(e);
|
package/cjs/Bubbler.js
CHANGED
|
@@ -199,7 +199,7 @@ export class Bubbler extends ExternalInteractorBase {
|
|
|
199
199
|
mod.strokeColor = undefined;
|
|
200
200
|
const pColor = particle.getFillColor();
|
|
201
201
|
if (pColor) {
|
|
202
|
-
const mixedColor = rgbToHsl(colorMix(pColor, mod.finalColor, ratioOffset - ratio, ratio));
|
|
202
|
+
const mixedColor = rgbToHsl(colorMix(pColor, mod.finalColor, ratioOffset - ratio, ratio, this.container.hdr));
|
|
203
203
|
mod.fillColor = mixedColor;
|
|
204
204
|
mod.strokeColor = mixedColor;
|
|
205
205
|
}
|
package/cjs/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ensureInteractivityPluginLoaded } from "@tsparticles/plugin-interactivity";
|
|
2
2
|
import { Bubbler } from "./Bubbler.js";
|
|
3
3
|
export async function loadExternalBubbleInteraction(engine) {
|
|
4
|
-
engine.checkVersion("4.
|
|
4
|
+
engine.checkVersion("4.4.0");
|
|
5
5
|
await engine.pluginManager.register((e) => {
|
|
6
6
|
ensureInteractivityPluginLoaded(e);
|
|
7
7
|
e.pluginManager.addInteractor?.("externalBubble", container => {
|
package/cjs/index.lazy.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export async function loadExternalBubbleInteraction(engine) {
|
|
2
|
-
engine.checkVersion("4.
|
|
2
|
+
engine.checkVersion("4.4.0");
|
|
3
3
|
await engine.pluginManager.register(async (e) => {
|
|
4
4
|
const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity/lazy");
|
|
5
5
|
ensureInteractivityPluginLoaded(e);
|
package/esm/Bubbler.js
CHANGED
|
@@ -199,7 +199,7 @@ export class Bubbler extends ExternalInteractorBase {
|
|
|
199
199
|
mod.strokeColor = undefined;
|
|
200
200
|
const pColor = particle.getFillColor();
|
|
201
201
|
if (pColor) {
|
|
202
|
-
const mixedColor = rgbToHsl(colorMix(pColor, mod.finalColor, ratioOffset - ratio, ratio));
|
|
202
|
+
const mixedColor = rgbToHsl(colorMix(pColor, mod.finalColor, ratioOffset - ratio, ratio, this.container.hdr));
|
|
203
203
|
mod.fillColor = mixedColor;
|
|
204
204
|
mod.strokeColor = mixedColor;
|
|
205
205
|
}
|
package/esm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ensureInteractivityPluginLoaded } from "@tsparticles/plugin-interactivity";
|
|
2
2
|
import { Bubbler } from "./Bubbler.js";
|
|
3
3
|
export async function loadExternalBubbleInteraction(engine) {
|
|
4
|
-
engine.checkVersion("4.
|
|
4
|
+
engine.checkVersion("4.4.0");
|
|
5
5
|
await engine.pluginManager.register((e) => {
|
|
6
6
|
ensureInteractivityPluginLoaded(e);
|
|
7
7
|
e.pluginManager.addInteractor?.("externalBubble", container => {
|
package/esm/index.lazy.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export async function loadExternalBubbleInteraction(engine) {
|
|
2
|
-
engine.checkVersion("4.
|
|
2
|
+
engine.checkVersion("4.4.0");
|
|
3
3
|
await engine.pluginManager.register(async (e) => {
|
|
4
4
|
const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity/lazy");
|
|
5
5
|
ensureInteractivityPluginLoaded(e);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/interaction-external-bubble",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "tsParticles bubble external interaction",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
},
|
|
98
98
|
"type": "module",
|
|
99
99
|
"peerDependencies": {
|
|
100
|
-
"@tsparticles/engine": "4.
|
|
101
|
-
"@tsparticles/plugin-interactivity": "4.
|
|
100
|
+
"@tsparticles/engine": "4.4.0",
|
|
101
|
+
"@tsparticles/plugin-interactivity": "4.4.0"
|
|
102
102
|
}
|
|
103
103
|
}
|
package/report.html
CHANGED
|
@@ -4930,7 +4930,7 @@ var drawChart = (function (exports) {
|
|
|
4930
4930
|
</script>
|
|
4931
4931
|
<script>
|
|
4932
4932
|
/*<!--*/
|
|
4933
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"tsparticles.interaction.external.bubble.js","children":[{"name":"dist/browser","children":[{"name":"Options/Classes","children":[{"uid":"
|
|
4933
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"tsparticles.interaction.external.bubble.js","children":[{"name":"dist/browser","children":[{"name":"Options/Classes","children":[{"uid":"fcbd5f98-1","name":"BubbleBase.js"},{"uid":"fcbd5f98-3","name":"BubbleDiv.js"},{"uid":"fcbd5f98-5","name":"Bubble.js"}]},{"uid":"fcbd5f98-7","name":"BubbleModifier.js"},{"uid":"fcbd5f98-9","name":"Enums.js"},{"uid":"fcbd5f98-11","name":"Utils.js"},{"uid":"fcbd5f98-13","name":"Bubbler.js"},{"uid":"fcbd5f98-15","name":"index.js"},{"uid":"fcbd5f98-17","name":"browser.js"}]}]}],"isRoot":true},"nodeParts":{"fcbd5f98-1":{"renderedLength":893,"gzipLength":0,"brotliLength":0,"metaUid":"fcbd5f98-0"},"fcbd5f98-3":{"renderedLength":276,"gzipLength":0,"brotliLength":0,"metaUid":"fcbd5f98-2"},"fcbd5f98-5":{"renderedLength":392,"gzipLength":0,"brotliLength":0,"metaUid":"fcbd5f98-4"},"fcbd5f98-7":{"renderedLength":235,"gzipLength":0,"brotliLength":0,"metaUid":"fcbd5f98-6"},"fcbd5f98-9":{"renderedLength":257,"gzipLength":0,"brotliLength":0,"metaUid":"fcbd5f98-8"},"fcbd5f98-11":{"renderedLength":508,"gzipLength":0,"brotliLength":0,"metaUid":"fcbd5f98-10"},"fcbd5f98-13":{"renderedLength":15049,"gzipLength":0,"brotliLength":0,"metaUid":"fcbd5f98-12"},"fcbd5f98-15":{"renderedLength":409,"gzipLength":0,"brotliLength":0,"metaUid":"fcbd5f98-14"},"fcbd5f98-17":{"renderedLength":201,"gzipLength":0,"brotliLength":0,"metaUid":"fcbd5f98-16"}},"nodeMetas":{"fcbd5f98-0":{"id":"/dist/browser/Options/Classes/BubbleBase.js","moduleParts":{"tsparticles.interaction.external.bubble.js":"fcbd5f98-1"},"imported":[{"uid":"fcbd5f98-19"}],"importedBy":[{"uid":"fcbd5f98-14"},{"uid":"fcbd5f98-2"},{"uid":"fcbd5f98-4"}]},"fcbd5f98-2":{"id":"/dist/browser/Options/Classes/BubbleDiv.js","moduleParts":{"tsparticles.interaction.external.bubble.js":"fcbd5f98-3"},"imported":[{"uid":"fcbd5f98-19"},{"uid":"fcbd5f98-0"}],"importedBy":[{"uid":"fcbd5f98-14"},{"uid":"fcbd5f98-4"}]},"fcbd5f98-4":{"id":"/dist/browser/Options/Classes/Bubble.js","moduleParts":{"tsparticles.interaction.external.bubble.js":"fcbd5f98-5"},"imported":[{"uid":"fcbd5f98-19"},{"uid":"fcbd5f98-0"},{"uid":"fcbd5f98-2"}],"importedBy":[{"uid":"fcbd5f98-14"},{"uid":"fcbd5f98-12"}]},"fcbd5f98-6":{"id":"/dist/browser/BubbleModifier.js","moduleParts":{"tsparticles.interaction.external.bubble.js":"fcbd5f98-7"},"imported":[],"importedBy":[{"uid":"fcbd5f98-14"},{"uid":"fcbd5f98-12"}]},"fcbd5f98-8":{"id":"/dist/browser/Enums.js","moduleParts":{"tsparticles.interaction.external.bubble.js":"fcbd5f98-9"},"imported":[],"importedBy":[{"uid":"fcbd5f98-12"}]},"fcbd5f98-10":{"id":"/dist/browser/Utils.js","moduleParts":{"tsparticles.interaction.external.bubble.js":"fcbd5f98-11"},"imported":[{"uid":"fcbd5f98-19"}],"importedBy":[{"uid":"fcbd5f98-12"}]},"fcbd5f98-12":{"id":"/dist/browser/Bubbler.js","moduleParts":{"tsparticles.interaction.external.bubble.js":"fcbd5f98-13"},"imported":[{"uid":"fcbd5f98-19"},{"uid":"fcbd5f98-18"},{"uid":"fcbd5f98-4"},{"uid":"fcbd5f98-6"},{"uid":"fcbd5f98-8"},{"uid":"fcbd5f98-10"}],"importedBy":[{"uid":"fcbd5f98-14"}]},"fcbd5f98-14":{"id":"/dist/browser/index.js","moduleParts":{"tsparticles.interaction.external.bubble.js":"fcbd5f98-15"},"imported":[{"uid":"fcbd5f98-18"},{"uid":"fcbd5f98-12"},{"uid":"fcbd5f98-6"},{"uid":"fcbd5f98-0"},{"uid":"fcbd5f98-2"},{"uid":"fcbd5f98-4"}],"importedBy":[{"uid":"fcbd5f98-16"}]},"fcbd5f98-16":{"id":"/dist/browser/browser.js","moduleParts":{"tsparticles.interaction.external.bubble.js":"fcbd5f98-17"},"imported":[{"uid":"fcbd5f98-14"}],"importedBy":[],"isEntry":true},"fcbd5f98-18":{"id":"@tsparticles/plugin-interactivity","moduleParts":{},"imported":[],"importedBy":[{"uid":"fcbd5f98-14"},{"uid":"fcbd5f98-12"}],"isExternal":true},"fcbd5f98-19":{"id":"@tsparticles/engine","moduleParts":{},"imported":[],"importedBy":[{"uid":"fcbd5f98-12"},{"uid":"fcbd5f98-0"},{"uid":"fcbd5f98-2"},{"uid":"fcbd5f98-4"},{"uid":"fcbd5f98-10"}],"isExternal":true}},"env":{"rollup":"4.63.1"},"options":{"gzip":false,"brotli":false,"sourcemap":false}};
|
|
4934
4934
|
|
|
4935
4935
|
const run = () => {
|
|
4936
4936
|
const width = window.innerWidth;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(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);
|
|
2
|
-
/* External Interaction v4.
|
|
2
|
+
/* External Interaction v4.4.0 */
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tsparticles/plugin-interactivity'), require('@tsparticles/engine')) :
|
|
5
5
|
typeof define === 'function' && define.amd ? define(['exports', '@tsparticles/plugin-interactivity', '@tsparticles/engine'], factory) :
|
|
@@ -284,7 +284,7 @@
|
|
|
284
284
|
mod.strokeColor = undefined;
|
|
285
285
|
const pColor = particle.getFillColor();
|
|
286
286
|
if (pColor) {
|
|
287
|
-
const mixedColor = engine.rgbToHsl(engine.colorMix(pColor, mod.finalColor, ratioOffset - ratio, ratio));
|
|
287
|
+
const mixedColor = engine.rgbToHsl(engine.colorMix(pColor, mod.finalColor, ratioOffset - ratio, ratio, this.container.hdr));
|
|
288
288
|
mod.fillColor = mixedColor;
|
|
289
289
|
mod.strokeColor = mixedColor;
|
|
290
290
|
}
|
|
@@ -397,7 +397,7 @@
|
|
|
397
397
|
}
|
|
398
398
|
|
|
399
399
|
async function loadExternalBubbleInteraction(engine) {
|
|
400
|
-
engine.checkVersion("4.
|
|
400
|
+
engine.checkVersion("4.4.0");
|
|
401
401
|
await engine.pluginManager.register((e) => {
|
|
402
402
|
pluginInteractivity.ensureInteractivityPluginLoaded(e);
|
|
403
403
|
e.pluginManager.addInteractor?.("externalBubble", container => {
|
|
@@ -1 +1 @@
|
|
|
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 e="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,e){return e in t||(t[e]={}),t[e]}})}:function(t){return t};t.__tsParticlesInternals.bundles=e(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=e(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=e(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=e(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=e(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=e(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=e(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=e(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=e(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=e(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=e(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=e(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=e(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@tsparticles/plugin-interactivity"),require("@tsparticles/engine")):"function"==typeof define&&define.amd?define(["exports","@tsparticles/plugin-interactivity","@tsparticles/engine"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.interactions.externalBubble=t.__tsParticlesInternals.interactions.externalBubble||{}),t.__tsParticlesInternals.plugins.interactivity,t.__tsParticlesInternals.engine)}(this,function(t,e,s){"use strict";class i{color;distance=200;duration=.4;mix=!1;opacity;size;load(t){if(!s.isNull(t)){if(s.loadProperty(this,"distance",t.distance),s.loadProperty(this,"duration",t.duration),s.loadProperty(this,"mix",t.mix),s.loadRangeProperty(this,"opacity",t.opacity),void 0!==t.color){const e=s.isArray(this.color)?void 0:this.color;this.color=s.executeOnSingleOrMultiple(t.color,t=>s.OptionsColor.create(e,t))}s.loadProperty(this,"size",t.size)}}}class n extends i{selectors=[];load(t){super.load(t),s.isNull(t)||s.loadProperty(this,"selectors",t.selectors)}}class a extends i{divs;load(t){super.load(t),s.isNull(t)||(this.divs=s.executeOnSingleOrMultiple(t.divs,t=>{const e=new n;return e.load(t),e}))}}class r{div;enabled=!1;fillColor;finalColor;id="bubble";inRange=!1;opacity;priority=100;radius;strokeColor}var l;function o(t,e,i,n){if(e>=i){const a=t+(e-i)*n;return s.clamp(a,t,e)}if(e<i){const a=t-(i-e)*n;return s.clamp(a,e,t)}}!function(t){t.color="color",t.opacity="opacity",t.size="size"}(l||(l={}));const c="bubble";class u extends e.ExternalInteractorBase{handleClickMode;#t;#e=new WeakMap;#s;constructor(t,e){super(e),this.#s=t,this.#t=0,e.bubble??={},this.handleClickMode=t=>{t===c&&(e.bubble??={},e.bubble.clicking=!0)}}get maxDistance(){return this.#t}clear(t,e,s){const i=this.#e.get(t);i?.inRange&&!s||(t.removeModifier(c),this.#e.delete(t))}getOrCreateModifier(t){let e=this.#e.get(t);return e||(e=new r,this.#e.set(t,e),t.addModifier(e)),e}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.bubble;e&&(this.#t=e.distance,t.retina.bubbleModeDistance=e.distance*t.retina.pixelRatio,void 0!==e.size&&(t.retina.bubbleModeSize=e.size*t.retina.pixelRatio))}interact(t,i){const n=this.container.actualOptions,a=n.interactivity?.events;if(!a)return;const r=a.onHover,l=a.onClick,o=r.enable,u=r.mode,b=l.enable,d=l.mode,p=a.onDiv;o&&s.isInArray(c,u)?this.#i(t):b&&s.isInArray(c,d)?this.#n(t):e.divModeExecute(c,p,(e,s)=>{this.#a(t,i,e,s)})}isEnabled(t,i){const n=this.container.actualOptions,a=t.mouse,r=(i?.interactivity??n.interactivity)?.events;if(!r)return!1;const{onClick:l,onDiv:o,onHover:u}=r,b=e.isDivModeEnabled(c,o);return!!(b||u.enable&&a.position||l.enable&&a.clickPosition)&&(s.isInArray(c,u.mode)||s.isInArray(c,l.mode)||b)}loadModeOptions(t,...e){s.loadOptionProperty(t,"bubble",a,...e)}reset(t,e){const s=this.#e.get(e);s&&(s.enabled=!1,s.inRange=!1)}#n(t){const e=this.container,i=e.actualOptions,n=t.mouse.clickPosition,a=i.interactivity?.modes.bubble;if(!a||!n)return;e.bubble??={};const r=e.retina.bubbleModeDistance;if(!r||r<0)return;const o=e.particles.grid.queryCircle(n,r,e=>this.isEnabled(t,e)),{bubble:c}=e;for(const i of o){if(!c.clicking)continue;const o=this.getOrCreateModifier(i);o.enabled=!c.durationEnd,o.inRange=!c.durationEnd;const u=i.getPosition(),b=s.getDistance(u,n),d=(performance.now()-(t.mouse.clickTime??0))/s.millisecondsToSeconds;d>a.duration&&(c.durationEnd=!0),d>a.duration*s.double&&(c.clicking=!1,c.durationEnd=!1);const p={bubbleObj:{optValue:e.retina.bubbleModeSize,value:o.radius},particlesObj:{optValue:i.size.max,value:i.size.value},type:l.size};this.#r(i,b,d,p);const _={bubbleObj:{optValue:a.opacity,value:o.opacity},particlesObj:{optValue:i.opacity?.max??1,value:i.opacity?.value??1},type:l.opacity};this.#r(i,b,d,_),!c.durationEnd&&b<=r?this.#l(i,b):(o.fillColor=void 0,o.strokeColor=void 0)}}#i(t){const i=this.container,n=t.mouse.position,a=i.retina.bubbleModeDistance;if(!a||a<0||!n)return;const r=i.particles.grid.queryCircle(n,a,e=>this.isEnabled(t,e));for(const i of r){const r=this.getOrCreateModifier(i);r.enabled=!0,r.inRange=!0;const l=i.getPosition(),o=s.getDistance(l,n),c=1-o/a;o<=a?c>=0&&t.status===e.mouseMoveEvent&&(this.#o(i,c),this.#c(i,c),this.#l(i,c)):this.reset(t,i),t.status===e.mouseLeaveEvent&&this.reset(t,i)}}#l(t,e,i){const n=this.container.actualOptions,a=i??n.interactivity?.modes.bubble,r=this.getOrCreateModifier(t);if(a){if(!r.finalColor){const t=a.color;if(!t)return;const e=s.itemFromSingleOrMultiple(t);r.finalColor=s.rangeColorToHsl(this.#s,e)}if(r.finalColor)if(a.mix){r.fillColor=void 0,r.strokeColor=void 0;const i=t.getFillColor();if(i){const t=s.rgbToHsl(s.colorMix(i,r.finalColor,1-e,e));r.fillColor=t,r.strokeColor=t}else r.fillColor=r.finalColor,r.strokeColor=r.finalColor}else r.fillColor=r.finalColor,r.strokeColor=r.finalColor}}#c(t,e,s){const i=this.container.actualOptions,n=s?.opacity??i.interactivity?.modes.bubble?.opacity;if(!n)return;const a=o(t.opacity?.value??1,n,t.opacity?.max??1,e);if(void 0!==a){this.getOrCreateModifier(t).opacity=a}}#o(t,e,s){const i=this.container,n=s?.size?s.size*i.retina.pixelRatio:i.retina.bubbleModeSize;if(void 0===n)return;const a=o(t.size.value,n,t.size.max,e);if(void 0!==a){this.getOrCreateModifier(t).radius=a}}#r(t,e,s,i){const n=this.container,a=i.bubbleObj.optValue,r=n.actualOptions,o=r.interactivity?.modes.bubble;if(!o||void 0===a)return;const c=o.duration,u=n.retina.bubbleModeDistance,b=i.particlesObj.optValue,d=i.bubbleObj.value,p=i.particlesObj.value??0,_=i.type;if(!u||u<0||a===b)return;n.bubble??={};const f=this.getOrCreateModifier(t);if(n.bubble.durationEnd)d&&(_===l.size&&(f.radius=void 0),_===l.opacity&&(f.opacity=void 0));else if(e<=u){if((d??p)!==a){const t=p-s*(p-a)/c;_===l.size&&(f.radius=t),_===l.opacity&&(f.opacity=t)}}else _===l.size&&(f.radius=void 0),_===l.opacity&&(f.opacity=void 0)}#a(t,i,n,a){const r=this.container,l=s.safeDocument().querySelectorAll(n),o=r.actualOptions.interactivity?.modes.bubble;o&&l.length&&l.forEach(n=>{const l=n,c=r.retina.pixelRatio,u={x:(l.offsetLeft+l.offsetWidth*s.half)*c,y:(l.offsetTop+l.offsetHeight*s.half)*c},b=l.offsetWidth*s.half*c,d=a.type===e.DivType.circle?new s.Circle(u.x,u.y,b):new s.Rectangle(l.offsetLeft*c,l.offsetTop*c,l.offsetWidth*c,l.offsetHeight*c),p=r.particles.grid.query(d,e=>this.isEnabled(t,e));for(const t of p){if(!d.contains(t.getPosition()))continue;const s=this.getOrCreateModifier(t);s.enabled=!0,s.inRange=!0;const n=o.divs,a=e.divMode(n,l);s.div&&s.div===l||(this.clear(t,i,!0),s.div=l),this.#o(t,1,a),this.#c(t,1,a),this.#l(t,1,a)}})}}async function b(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{e.ensureInteractivityPluginLoaded(t),t.pluginManager.addInteractor?.("externalBubble",e=>Promise.resolve(new u(t.pluginManager,e)))})}const d=globalThis;d.__tsParticlesInternals=d.__tsParticlesInternals??{},d.loadExternalBubbleInteraction=b,t.Bubble=a,t.BubbleBase=i,t.BubbleDiv=n,t.BubbleModifier=r,t.loadExternalBubbleInteraction=b}),Object.assign(globalThis.window||globalThis,{loadExternalBubbleInteraction:(globalThis.__tsParticlesInternals.interactions.externalBubble||{}).loadExternalBubbleInteraction}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
|
|
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 e="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,e){return e in t||(t[e]={}),t[e]}})}:function(t){return t};t.__tsParticlesInternals.bundles=e(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=e(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=e(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=e(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=e(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=e(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=e(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=e(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=e(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=e(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=e(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=e(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=e(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@tsparticles/plugin-interactivity"),require("@tsparticles/engine")):"function"==typeof define&&define.amd?define(["exports","@tsparticles/plugin-interactivity","@tsparticles/engine"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.interactions.externalBubble=t.__tsParticlesInternals.interactions.externalBubble||{}),t.__tsParticlesInternals.plugins.interactivity,t.__tsParticlesInternals.engine)}(this,function(t,e,s){"use strict";class i{color;distance=200;duration=.4;mix=!1;opacity;size;load(t){if(!s.isNull(t)){if(s.loadProperty(this,"distance",t.distance),s.loadProperty(this,"duration",t.duration),s.loadProperty(this,"mix",t.mix),s.loadRangeProperty(this,"opacity",t.opacity),void 0!==t.color){const e=s.isArray(this.color)?void 0:this.color;this.color=s.executeOnSingleOrMultiple(t.color,t=>s.OptionsColor.create(e,t))}s.loadProperty(this,"size",t.size)}}}class n extends i{selectors=[];load(t){super.load(t),s.isNull(t)||s.loadProperty(this,"selectors",t.selectors)}}class a extends i{divs;load(t){super.load(t),s.isNull(t)||(this.divs=s.executeOnSingleOrMultiple(t.divs,t=>{const e=new n;return e.load(t),e}))}}class r{div;enabled=!1;fillColor;finalColor;id="bubble";inRange=!1;opacity;priority=100;radius;strokeColor}var l;function o(t,e,i,n){if(e>=i){const a=t+(e-i)*n;return s.clamp(a,t,e)}if(e<i){const a=t-(i-e)*n;return s.clamp(a,e,t)}}!function(t){t.color="color",t.opacity="opacity",t.size="size"}(l||(l={}));const c="bubble";class u extends e.ExternalInteractorBase{handleClickMode;#t;#e=new WeakMap;#s;constructor(t,e){super(e),this.#s=t,this.#t=0,e.bubble??={},this.handleClickMode=t=>{t===c&&(e.bubble??={},e.bubble.clicking=!0)}}get maxDistance(){return this.#t}clear(t,e,s){const i=this.#e.get(t);i?.inRange&&!s||(t.removeModifier(c),this.#e.delete(t))}getOrCreateModifier(t){let e=this.#e.get(t);return e||(e=new r,this.#e.set(t,e),t.addModifier(e)),e}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.bubble;e&&(this.#t=e.distance,t.retina.bubbleModeDistance=e.distance*t.retina.pixelRatio,void 0!==e.size&&(t.retina.bubbleModeSize=e.size*t.retina.pixelRatio))}interact(t,i){const n=this.container.actualOptions,a=n.interactivity?.events;if(!a)return;const r=a.onHover,l=a.onClick,o=r.enable,u=r.mode,b=l.enable,d=l.mode,p=a.onDiv;o&&s.isInArray(c,u)?this.#i(t):b&&s.isInArray(c,d)?this.#n(t):e.divModeExecute(c,p,(e,s)=>{this.#a(t,i,e,s)})}isEnabled(t,i){const n=this.container.actualOptions,a=t.mouse,r=(i?.interactivity??n.interactivity)?.events;if(!r)return!1;const{onClick:l,onDiv:o,onHover:u}=r,b=e.isDivModeEnabled(c,o);return!!(b||u.enable&&a.position||l.enable&&a.clickPosition)&&(s.isInArray(c,u.mode)||s.isInArray(c,l.mode)||b)}loadModeOptions(t,...e){s.loadOptionProperty(t,"bubble",a,...e)}reset(t,e){const s=this.#e.get(e);s&&(s.enabled=!1,s.inRange=!1)}#n(t){const e=this.container,i=e.actualOptions,n=t.mouse.clickPosition,a=i.interactivity?.modes.bubble;if(!a||!n)return;e.bubble??={};const r=e.retina.bubbleModeDistance;if(!r||r<0)return;const o=e.particles.grid.queryCircle(n,r,e=>this.isEnabled(t,e)),{bubble:c}=e;for(const i of o){if(!c.clicking)continue;const o=this.getOrCreateModifier(i);o.enabled=!c.durationEnd,o.inRange=!c.durationEnd;const u=i.getPosition(),b=s.getDistance(u,n),d=(performance.now()-(t.mouse.clickTime??0))/s.millisecondsToSeconds;d>a.duration&&(c.durationEnd=!0),d>a.duration*s.double&&(c.clicking=!1,c.durationEnd=!1);const p={bubbleObj:{optValue:e.retina.bubbleModeSize,value:o.radius},particlesObj:{optValue:i.size.max,value:i.size.value},type:l.size};this.#r(i,b,d,p);const _={bubbleObj:{optValue:a.opacity,value:o.opacity},particlesObj:{optValue:i.opacity?.max??1,value:i.opacity?.value??1},type:l.opacity};this.#r(i,b,d,_),!c.durationEnd&&b<=r?this.#l(i,b):(o.fillColor=void 0,o.strokeColor=void 0)}}#i(t){const i=this.container,n=t.mouse.position,a=i.retina.bubbleModeDistance;if(!a||a<0||!n)return;const r=i.particles.grid.queryCircle(n,a,e=>this.isEnabled(t,e));for(const i of r){const r=this.getOrCreateModifier(i);r.enabled=!0,r.inRange=!0;const l=i.getPosition(),o=s.getDistance(l,n),c=1-o/a;o<=a?c>=0&&t.status===e.mouseMoveEvent&&(this.#o(i,c),this.#c(i,c),this.#l(i,c)):this.reset(t,i),t.status===e.mouseLeaveEvent&&this.reset(t,i)}}#l(t,e,i){const n=this.container.actualOptions,a=i??n.interactivity?.modes.bubble,r=this.getOrCreateModifier(t);if(a){if(!r.finalColor){const t=a.color;if(!t)return;const e=s.itemFromSingleOrMultiple(t);r.finalColor=s.rangeColorToHsl(this.#s,e)}if(r.finalColor)if(a.mix){r.fillColor=void 0,r.strokeColor=void 0;const i=t.getFillColor();if(i){const t=s.rgbToHsl(s.colorMix(i,r.finalColor,1-e,e,this.container.hdr));r.fillColor=t,r.strokeColor=t}else r.fillColor=r.finalColor,r.strokeColor=r.finalColor}else r.fillColor=r.finalColor,r.strokeColor=r.finalColor}}#c(t,e,s){const i=this.container.actualOptions,n=s?.opacity??i.interactivity?.modes.bubble?.opacity;if(!n)return;const a=o(t.opacity?.value??1,n,t.opacity?.max??1,e);if(void 0!==a){this.getOrCreateModifier(t).opacity=a}}#o(t,e,s){const i=this.container,n=s?.size?s.size*i.retina.pixelRatio:i.retina.bubbleModeSize;if(void 0===n)return;const a=o(t.size.value,n,t.size.max,e);if(void 0!==a){this.getOrCreateModifier(t).radius=a}}#r(t,e,s,i){const n=this.container,a=i.bubbleObj.optValue,r=n.actualOptions,o=r.interactivity?.modes.bubble;if(!o||void 0===a)return;const c=o.duration,u=n.retina.bubbleModeDistance,b=i.particlesObj.optValue,d=i.bubbleObj.value,p=i.particlesObj.value??0,_=i.type;if(!u||u<0||a===b)return;n.bubble??={};const f=this.getOrCreateModifier(t);if(n.bubble.durationEnd)d&&(_===l.size&&(f.radius=void 0),_===l.opacity&&(f.opacity=void 0));else if(e<=u){if((d??p)!==a){const t=p-s*(p-a)/c;_===l.size&&(f.radius=t),_===l.opacity&&(f.opacity=t)}}else _===l.size&&(f.radius=void 0),_===l.opacity&&(f.opacity=void 0)}#a(t,i,n,a){const r=this.container,l=s.safeDocument().querySelectorAll(n),o=r.actualOptions.interactivity?.modes.bubble;o&&l.length&&l.forEach(n=>{const l=n,c=r.retina.pixelRatio,u={x:(l.offsetLeft+l.offsetWidth*s.half)*c,y:(l.offsetTop+l.offsetHeight*s.half)*c},b=l.offsetWidth*s.half*c,d=a.type===e.DivType.circle?new s.Circle(u.x,u.y,b):new s.Rectangle(l.offsetLeft*c,l.offsetTop*c,l.offsetWidth*c,l.offsetHeight*c),p=r.particles.grid.query(d,e=>this.isEnabled(t,e));for(const t of p){if(!d.contains(t.getPosition()))continue;const s=this.getOrCreateModifier(t);s.enabled=!0,s.inRange=!0;const n=o.divs,a=e.divMode(n,l);s.div&&s.div===l||(this.clear(t,i,!0),s.div=l),this.#o(t,1,a),this.#c(t,1,a),this.#l(t,1,a)}})}}async function b(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{e.ensureInteractivityPluginLoaded(t),t.pluginManager.addInteractor?.("externalBubble",e=>Promise.resolve(new u(t.pluginManager,e)))})}const d=globalThis;d.__tsParticlesInternals=d.__tsParticlesInternals??{},d.loadExternalBubbleInteraction=b,t.Bubble=a,t.BubbleBase=i,t.BubbleDiv=n,t.BubbleModifier=r,t.loadExternalBubbleInteraction=b}),Object.assign(globalThis.window||globalThis,{loadExternalBubbleInteraction:(globalThis.__tsParticlesInternals.interactions.externalBubble||{}).loadExternalBubbleInteraction}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
|