@tsparticles/plugin-easing-expo 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.
@@ -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
- * v3.9.0
7
+ * v4.0.0-alpha.0
8
8
  */
9
9
  /*
10
10
  * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
@@ -28,25 +28,25 @@ return /******/ (() => { // webpackBootstrap
28
28
  /******/ "use strict";
29
29
  /******/ var __webpack_modules__ = ({
30
30
 
31
- /***/ "./dist/browser/index.js":
31
+ /***/ "./dist/browser/index.js"
32
32
  /*!*******************************!*\
33
33
  !*** ./dist/browser/index.js ***!
34
34
  \*******************************/
35
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
35
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
36
36
 
37
- eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadEasingExpoPlugin: () => (/* binding */ loadEasingExpoPlugin)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n\nasync function loadEasingExpoPlugin(engine, refresh = true) {\n engine.checkVersion(\"3.9.0\");\n await engine.addEasing(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.EasingType.easeInExpo, value => !value ? 0 : 2 ** (10 * value - 10), false);\n await engine.addEasing(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.EasingType.easeOutExpo, value => value === 1 ? 1 : 1 - Math.pow(2, -10 * value), false);\n await engine.addEasing(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.EasingType.easeInOutExpo, value => {\n if (value === 1) {\n return !value ? 0 : 1;\n } else if (!value) {\n return 0;\n } else {\n return value < 0.5 ? 2 ** (20 * value - 10) / 2 : (2 - 2 ** (-20 * value + 10)) / 2;\n }\n }, false);\n await engine.refresh(refresh);\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-easing-expo/./dist/browser/index.js?\n}");
37
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadEasingExpoPlugin: () => (/* binding */ loadEasingExpoPlugin)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n\nfunction loadEasingExpoPlugin(engine) {\n engine.checkVersion(\"4.0.0-alpha.0\");\n engine.register(e => {\n e.addEasing(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.EasingType.easeInExpo, value => value ? 2 ** (10 * value - 10) : 0);\n e.addEasing(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.EasingType.easeOutExpo, value => value === 1 ? 1 : 1 - Math.pow(2, -10 * value));\n e.addEasing(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.EasingType.easeInOutExpo, value => {\n if (value === 1) {\n return 1;\n } else if (value) {\n return value < 0.5 ? 2 ** (20 * value - 10) / 2 : (2 - 2 ** (-20 * value + 10)) / 2;\n } else {\n return 0;\n }\n });\n });\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-easing-expo/./dist/browser/index.js?\n}");
38
38
 
39
- /***/ }),
39
+ /***/ },
40
40
 
41
- /***/ "@tsparticles/engine":
41
+ /***/ "@tsparticles/engine"
42
42
  /*!*********************************************************************************************************************************!*\
43
43
  !*** external {"commonjs":"@tsparticles/engine","commonjs2":"@tsparticles/engine","amd":"@tsparticles/engine","root":"window"} ***!
44
44
  \*********************************************************************************************************************************/
45
- /***/ ((module) => {
45
+ (module) {
46
46
 
47
47
  module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
48
48
 
49
- /***/ })
49
+ /***/ }
50
50
 
51
51
  /******/ });
52
52
  /************************************************************************/
@@ -60,6 +60,12 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
60
60
  /******/ if (cachedModule !== undefined) {
61
61
  /******/ return cachedModule.exports;
62
62
  /******/ }
63
+ /******/ // Check if module exists (development only)
64
+ /******/ if (__webpack_modules__[moduleId] === undefined) {
65
+ /******/ var e = new Error("Cannot find module '" + moduleId + "'");
66
+ /******/ e.code = 'MODULE_NOT_FOUND';
67
+ /******/ throw e;
68
+ /******/ }
63
69
  /******/ // Create a new module (and put it into the cache)
64
70
  /******/ var module = __webpack_module_cache__[moduleId] = {
65
71
  /******/ // no module.id needed
@@ -75,18 +81,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
75
81
  /******/ }
76
82
  /******/
77
83
  /************************************************************************/
78
- /******/ /* webpack/runtime/compat get default export */
79
- /******/ (() => {
80
- /******/ // getDefaultExport function for compatibility with non-harmony modules
81
- /******/ __webpack_require__.n = (module) => {
82
- /******/ var getter = module && module.__esModule ?
83
- /******/ () => (module['default']) :
84
- /******/ () => (module);
85
- /******/ __webpack_require__.d(getter, { a: getter });
86
- /******/ return getter;
87
- /******/ };
88
- /******/ })();
89
- /******/
90
84
  /******/ /* webpack/runtime/define property getters */
91
85
  /******/ (() => {
92
86
  /******/ // define getter functions for harmony exports
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see tsparticles.plugin.easing.expo.min.js.LICENSE.txt */
2
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine"],t);else{var o="object"==typeof exports?t(require("@tsparticles/engine")):t(e.window);for(var r in o)("object"==typeof exports?exports:e)[r]=o[r]}}(this,(e=>(()=>{var t={303:t=>{t.exports=e}},o={};function r(e){var a=o[e];if(void 0!==a)return a.exports;var n=o[e]={exports:{}};return t[e](n,n.exports,r),n.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};r.r(a),r.d(a,{loadEasingExpoPlugin:()=>i});var n=r(303);async function i(e,t=!0){e.checkVersion("3.9.0"),await e.addEasing(n.EasingType.easeInExpo,(e=>e?2**(10*e-10):0),!1),await e.addEasing(n.EasingType.easeOutExpo,(e=>1===e?1:1-Math.pow(2,-10*e)),!1),await e.addEasing(n.EasingType.easeInOutExpo,(e=>1===e?e?1:0:e?e<.5?2**(20*e-10)/2:(2-2**(-20*e+10))/2:0),!1),await e.refresh(t)}return a})()));
2
+ !function(e,o){if("object"==typeof exports&&"object"==typeof module)module.exports=o(require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine"],o);else{var t="object"==typeof exports?o(require("@tsparticles/engine")):o(e.window);for(var r in t)("object"==typeof exports?exports:e)[r]=t[r]}}(this,(e=>(()=>{var o={303(o){o.exports=e}},t={};function r(e){var n=t[e];if(void 0!==n)return n.exports;var i=t[e]={exports:{}};return o[e](i,i.exports,r),i.exports}r.d=(e,o)=>{for(var t in o)r.o(o,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},r.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};r.r(n),r.d(n,{loadEasingExpoPlugin:()=>a});var i=r(303);function a(e){e.checkVersion("4.0.0-alpha.0"),e.register((e=>{e.addEasing(i.EasingType.easeInExpo,(e=>e?2**(10*e-10):0)),e.addEasing(i.EasingType.easeOutExpo,(e=>1===e?1:1-Math.pow(2,-10*e))),e.addEasing(i.EasingType.easeInOutExpo,(e=>1===e?1:e?e<.5?2**(20*e-10)/2:(2-2**(-20*e+10))/2:0))}))}return n})()));
@@ -1 +1 @@
1
- /*! tsParticles Easing Expo Plugin v3.9.0 by Matteo Bruni */
1
+ /*! tsParticles Easing Expo Plugin v4.0.0-alpha.0 by Matteo Bruni */
package/types/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  import { type Engine } from "@tsparticles/engine";
2
- export declare function loadEasingExpoPlugin(engine: Engine, refresh?: boolean): Promise<void>;
2
+ export declare function loadEasingExpoPlugin(engine: Engine): void;
package/umd/index.js CHANGED
@@ -11,21 +11,22 @@
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.loadEasingExpoPlugin = loadEasingExpoPlugin;
13
13
  const engine_1 = require("@tsparticles/engine");
14
- async function loadEasingExpoPlugin(engine, refresh = true) {
15
- engine.checkVersion("3.9.0");
16
- await engine.addEasing(engine_1.EasingType.easeInExpo, value => (!value ? 0 : 2 ** (10 * value - 10)), false);
17
- await engine.addEasing(engine_1.EasingType.easeOutExpo, value => (value === 1 ? 1 : 1 - Math.pow(2, -10 * value)), false);
18
- await engine.addEasing(engine_1.EasingType.easeInOutExpo, value => {
19
- if (value === 1) {
20
- return !value ? 0 : 1;
21
- }
22
- else if (!value) {
23
- return 0;
24
- }
25
- else {
26
- return value < 0.5 ? 2 ** (20 * value - 10) / 2 : (2 - 2 ** (-20 * value + 10)) / 2;
27
- }
28
- }, false);
29
- await engine.refresh(refresh);
14
+ function loadEasingExpoPlugin(engine) {
15
+ engine.checkVersion("4.0.0-alpha.0");
16
+ engine.register(e => {
17
+ e.addEasing(engine_1.EasingType.easeInExpo, value => (value ? 2 ** (10 * value - 10) : 0));
18
+ e.addEasing(engine_1.EasingType.easeOutExpo, value => (value === 1 ? 1 : 1 - Math.pow(2, -10 * value)));
19
+ e.addEasing(engine_1.EasingType.easeInOutExpo, value => {
20
+ if (value === 1) {
21
+ return 1;
22
+ }
23
+ else if (value) {
24
+ return value < 0.5 ? 2 ** (20 * value - 10) / 2 : (2 - 2 ** (-20 * value + 10)) / 2;
25
+ }
26
+ else {
27
+ return 0;
28
+ }
29
+ });
30
+ });
30
31
  }
31
32
  });