@tsparticles/interaction-external-pop 3.9.0 → 4.0.0-alpha.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/494.min.js ADDED
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 494.min.js.LICENSE.txt */
2
+ (this.webpackChunk_tsparticles_interaction_external_pop=this.webpackChunk_tsparticles_interaction_external_pop||[]).push([[494],{494(e,t,r){r.d(t,{Popper:()=>n});var i=r(303);class n extends i.ExternalInteractorBase{constructor(e){super(e),this.handleClickMode=e=>{const t=this.container;if("pop"!==e)return;const r=t.interactivity.mouse.clickPosition;if(!r)return;const i=t.particles.quadTree.queryCircle(r,t.retina.pixelRatio);if(i.length)for(const e of i)t.particles.remove(e)}}clear(){}init(){}interact(){}isEnabled(){return!0}reset(){}}}}]);
@@ -0,0 +1 @@
1
+ /*! tsParticles Pop External Interaction v4.0.0-alpha.0 by Matteo Bruni */
package/browser/index.js CHANGED
@@ -1,7 +1,9 @@
1
- import { Popper } from "./Popper.js";
2
- export async function loadExternalPopInteraction(engine, refresh = true) {
3
- engine.checkVersion("3.9.0");
4
- await engine.addInteractor("externalPop", container => {
5
- return Promise.resolve(new Popper(container));
6
- }, refresh);
1
+ export function loadExternalPopInteraction(engine) {
2
+ engine.checkVersion("4.0.0-alpha.0");
3
+ engine.register(e => {
4
+ e.addInteractor("externalPop", async (container) => {
5
+ const { Popper } = await import("./Popper.js");
6
+ return new Popper(container);
7
+ });
8
+ });
7
9
  }
package/cjs/Popper.js CHANGED
@@ -1,9 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Popper = void 0;
4
- const engine_1 = require("@tsparticles/engine");
1
+ import { ExternalInteractorBase } from "@tsparticles/engine";
5
2
  const popMode = "pop";
6
- class Popper extends engine_1.ExternalInteractorBase {
3
+ export class Popper extends ExternalInteractorBase {
7
4
  constructor(container) {
8
5
  super(container);
9
6
  this.handleClickMode = (mode) => {
@@ -36,4 +33,3 @@ class Popper extends engine_1.ExternalInteractorBase {
36
33
  reset() {
37
34
  }
38
35
  }
39
- exports.Popper = Popper;
package/cjs/index.js CHANGED
@@ -1,10 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.loadExternalPopInteraction = loadExternalPopInteraction;
4
- const Popper_js_1 = require("./Popper.js");
5
- async function loadExternalPopInteraction(engine, refresh = true) {
6
- engine.checkVersion("3.9.0");
7
- await engine.addInteractor("externalPop", container => {
8
- return Promise.resolve(new Popper_js_1.Popper(container));
9
- }, refresh);
1
+ export function loadExternalPopInteraction(engine) {
2
+ engine.checkVersion("4.0.0-alpha.0");
3
+ engine.register(e => {
4
+ e.addInteractor("externalPop", async (container) => {
5
+ const { Popper } = await import("./Popper.js");
6
+ return new Popper(container);
7
+ });
8
+ });
10
9
  }
@@ -0,0 +1,30 @@
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-alpha.0
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_pop"] = this["webpackChunk_tsparticles_interaction_external_pop"] || []).push([["dist_browser_Popper_js"],{
19
+
20
+ /***/ "./dist/browser/Popper.js"
21
+ /*!********************************!*\
22
+ !*** ./dist/browser/Popper.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 */ Popper: () => (/* binding */ Popper)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n\nconst popMode = \"pop\";\nclass Popper extends _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ExternalInteractorBase {\n constructor(container) {\n super(container);\n this.handleClickMode = mode => {\n const container = this.container;\n if (mode !== popMode) {\n return;\n }\n const clickPos = container.interactivity.mouse.clickPosition;\n if (!clickPos) {\n return;\n }\n const poppedParticles = container.particles.quadTree.queryCircle(clickPos, container.retina.pixelRatio);\n if (!poppedParticles.length) {\n return;\n }\n for (const particle of poppedParticles) {\n container.particles.remove(particle);\n }\n };\n }\n clear() {}\n init() {}\n interact() {}\n isEnabled() {\n return true;\n }\n reset() {}\n}\n\n//# sourceURL=webpack://@tsparticles/interaction-external-pop/./dist/browser/Popper.js?\n}");
27
+
28
+ /***/ }
29
+
30
+ }]);
package/esm/index.js CHANGED
@@ -1,7 +1,9 @@
1
- import { Popper } from "./Popper.js";
2
- export async function loadExternalPopInteraction(engine, refresh = true) {
3
- engine.checkVersion("3.9.0");
4
- await engine.addInteractor("externalPop", container => {
5
- return Promise.resolve(new Popper(container));
6
- }, refresh);
1
+ export function loadExternalPopInteraction(engine) {
2
+ engine.checkVersion("4.0.0-alpha.0");
3
+ engine.register(e => {
4
+ e.addInteractor("externalPop", async (container) => {
5
+ const { Popper } = await import("./Popper.js");
6
+ return new Popper(container);
7
+ });
8
+ });
7
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/interaction-external-pop",
3
- "version": "3.9.0",
3
+ "version": "4.0.0-alpha.0",
4
4
  "description": "tsParticles pop external interaction",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -87,9 +87,10 @@
87
87
  "./package.json": "./package.json"
88
88
  },
89
89
  "dependencies": {
90
- "@tsparticles/engine": "3.9.0"
90
+ "@tsparticles/engine": "4.0.0-alpha.0"
91
91
  },
92
92
  "publishConfig": {
93
93
  "access": "public"
94
- }
94
+ },
95
+ "type": "module"
95
96
  }