@tsparticles/interaction-external-parallax 4.0.0-alpha.8 → 4.0.0-beta.1
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/203.min.js +1 -0
- package/README.md +5 -0
- package/browser/Options/Classes/Parallax.js +2 -0
- package/browser/Parallaxer.js +1 -0
- package/browser/index.js +5 -5
- package/cjs/Options/Classes/Parallax.js +2 -0
- package/cjs/Parallaxer.js +1 -0
- package/cjs/index.js +5 -5
- package/dist_browser_Parallaxer_js.js +2 -2
- package/esm/Options/Classes/Parallax.js +2 -0
- package/esm/Parallaxer.js +1 -0
- package/esm/index.js +5 -5
- package/package.json +3 -3
- package/report.html +84 -29
- package/tsparticles.interaction.external.parallax.js +41 -29
- package/tsparticles.interaction.external.parallax.min.js +2 -2
- package/types/Parallaxer.d.ts +1 -0
- package/umd/Options/Classes/Parallax.js +2 -0
- package/umd/Parallaxer.js +1 -0
- package/umd/index.js +5 -5
- package/411.min.js +0 -2
- package/411.min.js.LICENSE.txt +0 -1
- package/tsparticles.interaction.external.parallax.min.js.LICENSE.txt +0 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Demo / Generator : https://particles.js.org/
|
|
5
5
|
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
6
|
* How to use? : Check the GitHub README
|
|
7
|
-
* v4.0.0-
|
|
7
|
+
* v4.0.0-beta.1
|
|
8
8
|
*/
|
|
9
9
|
/*
|
|
10
10
|
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
@@ -28,26 +28,6 @@ return /******/ (() => { // webpackBootstrap
|
|
|
28
28
|
/******/ "use strict";
|
|
29
29
|
/******/ var __webpack_modules__ = ({
|
|
30
30
|
|
|
31
|
-
/***/ "./dist/browser/Options/Classes/Parallax.js"
|
|
32
|
-
/*!**************************************************!*\
|
|
33
|
-
!*** ./dist/browser/Options/Classes/Parallax.js ***!
|
|
34
|
-
\**************************************************/
|
|
35
|
-
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
36
|
-
|
|
37
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Parallax: () => (/* binding */ Parallax)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n\nclass Parallax {\n constructor() {\n this.force = 2;\n this.smooth = 10;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.force !== undefined) {\n this.force = data.force;\n }\n if (data.smooth !== undefined) {\n this.smooth = data.smooth;\n }\n }\n}\n\n//# sourceURL=webpack://@tsparticles/interaction-external-parallax/./dist/browser/Options/Classes/Parallax.js?\n}");
|
|
38
|
-
|
|
39
|
-
/***/ },
|
|
40
|
-
|
|
41
|
-
/***/ "./dist/browser/index.js"
|
|
42
|
-
/*!*******************************!*\
|
|
43
|
-
!*** ./dist/browser/index.js ***!
|
|
44
|
-
\*******************************/
|
|
45
|
-
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
46
|
-
|
|
47
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Parallax: () => (/* reexport safe */ _Options_Classes_Parallax_js__WEBPACK_IMPORTED_MODULE_0__.Parallax),\n/* harmony export */ loadExternalParallaxInteraction: () => (/* binding */ loadExternalParallaxInteraction)\n/* harmony export */ });\n/* harmony import */ var _Options_Classes_Parallax_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Options/Classes/Parallax.js */ \"./dist/browser/Options/Classes/Parallax.js\");\nasync function loadExternalParallaxInteraction(engine) {\n engine.checkVersion(\"4.0.0-alpha.8\");\n await engine.register(async e => {\n const {\n loadInteractivityPlugin\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/plugin-interactivity */ \"@tsparticles/plugin-interactivity\", 19));\n await loadInteractivityPlugin(e);\n e.addInteractor?.(\"externalParallax\", async container => {\n const {\n Parallaxer\n } = await __webpack_require__.e(/*! import() */ \"dist_browser_Parallaxer_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./Parallaxer.js */ \"./dist/browser/Parallaxer.js\"));\n return new Parallaxer(container);\n });\n });\n}\n\n\n//# sourceURL=webpack://@tsparticles/interaction-external-parallax/./dist/browser/index.js?\n}");
|
|
48
|
-
|
|
49
|
-
/***/ },
|
|
50
|
-
|
|
51
31
|
/***/ "@tsparticles/engine"
|
|
52
32
|
/*!*********************************************************************************************************************************!*\
|
|
53
33
|
!*** external {"commonjs":"@tsparticles/engine","commonjs2":"@tsparticles/engine","amd":"@tsparticles/engine","root":"window"} ***!
|
|
@@ -66,6 +46,26 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
|
|
|
66
46
|
|
|
67
47
|
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_interactivity__;
|
|
68
48
|
|
|
49
|
+
/***/ },
|
|
50
|
+
|
|
51
|
+
/***/ "./dist/browser/Options/Classes/Parallax.js"
|
|
52
|
+
/*!**************************************************!*\
|
|
53
|
+
!*** ./dist/browser/Options/Classes/Parallax.js ***!
|
|
54
|
+
\**************************************************/
|
|
55
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
56
|
+
|
|
57
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Parallax: () => (/* binding */ Parallax)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n\nclass Parallax {\n force;\n smooth;\n constructor(){\n this.force = 2;\n this.smooth = 10;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.force !== undefined) {\n this.force = data.force;\n }\n if (data.smooth !== undefined) {\n this.smooth = data.smooth;\n }\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/interaction-external-parallax/./dist/browser/Options/Classes/Parallax.js?\n}");
|
|
58
|
+
|
|
59
|
+
/***/ },
|
|
60
|
+
|
|
61
|
+
/***/ "./dist/browser/index.js"
|
|
62
|
+
/*!*******************************!*\
|
|
63
|
+
!*** ./dist/browser/index.js ***!
|
|
64
|
+
\*******************************/
|
|
65
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
66
|
+
|
|
67
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Parallax: () => (/* reexport safe */ _Options_Classes_Parallax_js__WEBPACK_IMPORTED_MODULE_0__.Parallax),\n/* harmony export */ loadExternalParallaxInteraction: () => (/* binding */ loadExternalParallaxInteraction)\n/* harmony export */ });\n/* harmony import */ var _Options_Classes_Parallax_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Options/Classes/Parallax.js */ \"./dist/browser/Options/Classes/Parallax.js\");\nasync function loadExternalParallaxInteraction(engine) {\n engine.checkVersion(\"4.0.0-beta.1\");\n await engine.pluginManager.register(async (e)=>{\n const { ensureInteractivityPluginLoaded } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/plugin-interactivity */ \"@tsparticles/plugin-interactivity\", 19));\n ensureInteractivityPluginLoaded(e);\n e.pluginManager.addInteractor?.(\"externalParallax\", async (container)=>{\n const { Parallaxer } = await __webpack_require__.e(/*! import() */ \"dist_browser_Parallaxer_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./Parallaxer.js */ \"./dist/browser/Parallaxer.js\"));\n return new Parallaxer(container);\n });\n });\n}\n\n\n\n//# sourceURL=webpack://@tsparticles/interaction-external-parallax/./dist/browser/index.js?\n}");
|
|
68
|
+
|
|
69
69
|
/***/ }
|
|
70
70
|
|
|
71
71
|
/******/ });
|
|
@@ -80,12 +80,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_interactivity__;
|
|
|
80
80
|
/******/ if (cachedModule !== undefined) {
|
|
81
81
|
/******/ return cachedModule.exports;
|
|
82
82
|
/******/ }
|
|
83
|
-
/******/ // Check if module exists (development only)
|
|
84
|
-
/******/ if (__webpack_modules__[moduleId] === undefined) {
|
|
85
|
-
/******/ var e = new Error("Cannot find module '" + moduleId + "'");
|
|
86
|
-
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
87
|
-
/******/ throw e;
|
|
88
|
-
/******/ }
|
|
89
83
|
/******/ // Create a new module (and put it into the cache)
|
|
90
84
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
91
85
|
/******/ // no module.id needed
|
|
@@ -94,6 +88,12 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_interactivity__;
|
|
|
94
88
|
/******/ };
|
|
95
89
|
/******/
|
|
96
90
|
/******/ // Execute the module function
|
|
91
|
+
/******/ if (!(moduleId in __webpack_modules__)) {
|
|
92
|
+
/******/ delete __webpack_module_cache__[moduleId];
|
|
93
|
+
/******/ var e = new Error("Cannot find module '" + moduleId + "'");
|
|
94
|
+
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
95
|
+
/******/ throw e;
|
|
96
|
+
/******/ }
|
|
97
97
|
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
98
98
|
/******/
|
|
99
99
|
/******/ // Return the exports of the module
|
|
@@ -168,6 +168,18 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_interactivity__;
|
|
|
168
168
|
/******/ };
|
|
169
169
|
/******/ })();
|
|
170
170
|
/******/
|
|
171
|
+
/******/ /* webpack/runtime/global */
|
|
172
|
+
/******/ (() => {
|
|
173
|
+
/******/ __webpack_require__.g = (function() {
|
|
174
|
+
/******/ if (typeof globalThis === 'object') return globalThis;
|
|
175
|
+
/******/ try {
|
|
176
|
+
/******/ return this || new Function('return this')();
|
|
177
|
+
/******/ } catch (e) {
|
|
178
|
+
/******/ if (typeof window === 'object') return window;
|
|
179
|
+
/******/ }
|
|
180
|
+
/******/ })();
|
|
181
|
+
/******/ })();
|
|
182
|
+
/******/
|
|
171
183
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
172
184
|
/******/ (() => {
|
|
173
185
|
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
@@ -232,8 +244,8 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_interactivity__;
|
|
|
232
244
|
/******/ /* webpack/runtime/publicPath */
|
|
233
245
|
/******/ (() => {
|
|
234
246
|
/******/ var scriptUrl;
|
|
235
|
-
/******/ if (
|
|
236
|
-
/******/ var document =
|
|
247
|
+
/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + "";
|
|
248
|
+
/******/ var document = __webpack_require__.g.document;
|
|
237
249
|
/******/ if (!scriptUrl && document) {
|
|
238
250
|
/******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')
|
|
239
251
|
/******/ scriptUrl = document.currentScript.src;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(this,(e,t)=>(()=>{"use strict";var r,o,a,i={303(t){t.exports=e},321(e){e.exports=t},702(e,t,r){r.d(t,{k:()=>a});var o=r(303);class a{force;smooth;constructor(){this.force=2,this.smooth=10}load(e){(0,o.isNull)(e)||(void 0!==e.force&&(this.force=e.force),void 0!==e.smooth&&(this.smooth=e.smooth))}}}},n={};function l(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={exports:{}};return i[e](r,r.exports,l),r.exports}l.m=i,s=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,l.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);l.r(r);var o={};c=c||[null,s({}),s([]),s(s)];for(var a=2&t&&e;("object"==typeof a||"function"==typeof a)&&!~c.indexOf(a);a=s(a))Object.getOwnPropertyNames(a).forEach(t=>o[t]=()=>e[t]);return o.default=()=>e,l.d(r,o),r},l.d=(e,t)=>{for(var r in t)l.o(t,r)&&!l.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},l.f={},l.e=e=>Promise.all(Object.keys(l.f).reduce((t,r)=>(l.f[r](e,t),t),[])),l.u=e=>""+e+".min.js",l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),p={},l.l=(e,t,r,o)=>{if(p[e])return void p[e].push(t);if(void 0!==r)for(var a,i,n=document.getElementsByTagName("script"),c=0;c<n.length;c++){var s=n[c];if(s.getAttribute("src")==e||s.getAttribute("data-webpack")=="@tsparticles/interaction-external-parallax:"+r){a=s;break}}a||(i=!0,(a=document.createElement("script")).charset="utf-8",l.nc&&a.setAttribute("nonce",l.nc),a.setAttribute("data-webpack","@tsparticles/interaction-external-parallax:"+r),a.src=e),p[e]=[t];var u=(t,r)=>{a.onerror=a.onload=null,clearTimeout(f);var o=p[e];if(delete p[e],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach(e=>e(r)),t)return t(r)},f=setTimeout(u.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=u.bind(null,a.onerror),a.onload=u.bind(null,a.onload),i&&document.head.appendChild(a)},l.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.g.importScripts&&(u=l.g.location+"");var c,s,p,u,f=l.g.document;if(!u&&f&&(f.currentScript&&"SCRIPT"===f.currentScript.tagName.toUpperCase()&&(u=f.currentScript.src),!u)){var d=f.getElementsByTagName("script");if(d.length)for(var h=d.length-1;h>-1&&(!u||!/^http(s?):/.test(u));)u=d[h--].src}if(!u)throw Error("Automatic publicPath is not supported in this browser");l.p=u=u.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r={207:0},l.f.j=(e,t)=>{var o=l.o(r,e)?r[e]:void 0;if(0!==o)if(o)t.push(o[2]);else{var a=new Promise((t,a)=>o=r[e]=[t,a]);t.push(o[2]=a);var i=l.p+l.u(e),n=Error();l.l(i,t=>{if(l.o(r,e)&&(0!==(o=r[e])&&(r[e]=void 0),o)){var a=t&&("load"===t.type?"missing":t.type),i=t&&t.target&&t.target.src;n.message="Loading chunk "+e+` failed.
|
|
2
|
+
(`+a+": "+i+")",n.name="ChunkLoadError",n.type=a,n.request=i,o[1](n)}},"chunk-"+e,e)}},o=(e,t)=>{var o,a,[i,n,c]=t,s=0;if(i.some(e=>0!==r[e])){for(o in n)l.o(n,o)&&(l.m[o]=n[o]);c&&c(l)}for(e&&e(t);s<i.length;s++)a=i[s],l.o(r,a)&&r[a]&&r[a][0](),r[a]=0},(a=this.webpackChunk_tsparticles_interaction_external_parallax=this.webpackChunk_tsparticles_interaction_external_parallax||[]).forEach(o.bind(null,0)),a.push=o.bind(null,a.push.bind(a));var b={};l.r(b),l.d(b,{Parallax:()=>g.k,loadExternalParallaxInteraction:()=>m});var g=l(702);async function m(e){e.checkVersion("4.0.0-beta.1"),await e.pluginManager.register(async e=>{let{ensureInteractivityPluginLoaded:t}=await Promise.resolve().then(l.t.bind(l,321,19));t(e),e.pluginManager.addInteractor?.("externalParallax",async e=>{let{Parallaxer:t}=await l.e(203).then(l.bind(l,203));return new t(e)})})}return b})());
|
package/types/Parallaxer.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { ExternalInteractorBase, type IInteractivityData, type IModes, type Inte
|
|
|
2
2
|
import type { IParallaxMode, ParallaxContainer, ParallaxMode } from "./Types.js";
|
|
3
3
|
import { type RecursivePartial } from "@tsparticles/engine";
|
|
4
4
|
export declare class Parallaxer extends ExternalInteractorBase<ParallaxContainer> {
|
|
5
|
+
readonly maxDistance = 0;
|
|
5
6
|
constructor(container: ParallaxContainer);
|
|
6
7
|
clear(): void;
|
|
7
8
|
init(): void;
|
package/umd/Parallaxer.js
CHANGED
package/umd/index.js
CHANGED
|
@@ -48,11 +48,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
48
48
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
49
|
exports.loadExternalParallaxInteraction = loadExternalParallaxInteraction;
|
|
50
50
|
async function loadExternalParallaxInteraction(engine) {
|
|
51
|
-
engine.checkVersion("4.0.0-
|
|
52
|
-
await engine.register(async (e) => {
|
|
53
|
-
const {
|
|
54
|
-
|
|
55
|
-
e.addInteractor?.("externalParallax", async (container) => {
|
|
51
|
+
engine.checkVersion("4.0.0-beta.1");
|
|
52
|
+
await engine.pluginManager.register(async (e) => {
|
|
53
|
+
const { ensureInteractivityPluginLoaded } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/plugin-interactivity"))) : new Promise((resolve_1, reject_1) => { require(["@tsparticles/plugin-interactivity"], resolve_1, reject_1); }).then(__importStar));
|
|
54
|
+
ensureInteractivityPluginLoaded(e);
|
|
55
|
+
e.pluginManager.addInteractor?.("externalParallax", async (container) => {
|
|
56
56
|
const { Parallaxer } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("./Parallaxer.js"))) : new Promise((resolve_2, reject_2) => { require(["./Parallaxer.js"], resolve_2, reject_2); }).then(__importStar));
|
|
57
57
|
return new Parallaxer(container);
|
|
58
58
|
});
|
package/411.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 411.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk_tsparticles_interaction_external_parallax=this.webpackChunk_tsparticles_interaction_external_parallax||[]).push([[411],{411(a,t,e){e.d(t,{Parallaxer:()=>s});var r=e(702),n=e(303),i=e(950);class s extends r.ExternalInteractorBase{constructor(a){super(a)}clear(){}init(){}interact(a){for(const t of this.container.particles.filter((t=>this.isEnabled(a,t))))this._parallaxInteract(a,t)}isEnabled(a,t){const e=this.container,r=a.mouse,i=(t?.interactivity??e.actualOptions.interactivity)?.events;return!!i?.onHover.enable&&!!r.position&&(0,n.isInArray)("parallax",i.onHover.mode)}loadModeOptions(a,...t){a.parallax??=new i.k;for(const e of t)a.parallax.load(e?.parallax)}reset(){}_parallaxInteract(a,t){if(!this.isEnabled(a,t))return;const e=this.container,r=e.actualOptions,i=r.interactivity?.modes.parallax;if(!i)return;const s=i.force,o=a.mouse.position;if(!o)return;const l=e.canvas.size,c=l.width*n.half,p=l.height*n.half,h=i.smooth,x=t.getRadius()/s,u=(o.x-c)*x,f=(o.y-p)*x,{offset:d}=t;d.x+=(u-d.x)/h,d.y+=(f-d.y)/h}}}}]);
|
package/411.min.js.LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Parallax External Interaction v4.0.0-alpha.8 by Matteo Bruni */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Parallax External Interaction v4.0.0-alpha.8 by Matteo Bruni */
|