@tsparticles/fractal-noise 3.9.1 → 4.0.0-alpha.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.
@@ -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.1
7
+ * v4.0.0-alpha.1
8
8
  */
9
9
  /*
10
10
  * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
@@ -28,35 +28,35 @@ return /******/ (() => { // webpackBootstrap
28
28
  /******/ "use strict";
29
29
  /******/ var __webpack_modules__ = ({
30
30
 
31
- /***/ "./dist/browser/FractalNoise.js":
31
+ /***/ "./dist/browser/FractalNoise.js"
32
32
  /*!**************************************!*\
33
33
  !*** ./dist/browser/FractalNoise.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 */ FractalNoise: () => (/* binding */ FractalNoise)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_smooth_value_noise__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/smooth-value-noise */ \"@tsparticles/smooth-value-noise\");\n/* harmony import */ var _tsparticles_smooth_value_noise__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_smooth_value_noise__WEBPACK_IMPORTED_MODULE_0__);\n\nclass FractalNoise {\n constructor() {\n this._smoothValueNoise = new _tsparticles_smooth_value_noise__WEBPACK_IMPORTED_MODULE_0__.SmoothValueNoise();\n }\n noise2d(x, y, octaves = 5, persistence = 0.5, lacunarity = 2.0) {\n let total = 0,\n frequency = 1,\n amplitude = 1,\n maxValue = 0;\n for (let i = 0; i < octaves; i++) {\n total += this._smoothValueNoise.noise2d(x * frequency, y * frequency) * amplitude;\n maxValue += amplitude;\n amplitude *= persistence;\n frequency *= lacunarity;\n }\n return total / maxValue;\n }\n noise3d(x, y, z, octaves = 5, persistence = 0.5, lacunarity = 2.0) {\n let total = 0,\n frequency = 1,\n amplitude = 1,\n maxValue = 0;\n for (let i = 0; i < octaves; i++) {\n total += this._smoothValueNoise.noise3d(x * frequency, y * frequency, z * frequency) * amplitude;\n maxValue += amplitude;\n amplitude *= persistence;\n frequency *= lacunarity;\n }\n return total / maxValue;\n }\n noise4d(x, y, z, w, octaves = 5, persistence = 0.5, lacunarity = 2.0) {\n let total = 0,\n frequency = 1,\n amplitude = 1,\n maxValue = 0;\n for (let i = 0; i < octaves; i++) {\n total += this._smoothValueNoise.noise4d(x * frequency, y * frequency, z * frequency, w * frequency) * amplitude;\n maxValue += amplitude;\n amplitude *= persistence;\n frequency *= lacunarity;\n }\n return total / maxValue;\n }\n seed(seed) {\n this._smoothValueNoise.seed(seed);\n }\n}\n\n//# sourceURL=webpack://@tsparticles/fractal-noise/./dist/browser/FractalNoise.js?\n}");
37
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FractalNoise: () => (/* binding */ FractalNoise)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_smooth_value_noise__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/smooth-value-noise */ \"@tsparticles/smooth-value-noise\");\n\nclass FractalNoise {\n constructor() {\n this._smoothValueNoise = new _tsparticles_smooth_value_noise__WEBPACK_IMPORTED_MODULE_0__.SmoothValueNoise();\n }\n noise2d(x, y, octaves = 5, persistence = 0.5, lacunarity = 2.0) {\n let total = 0,\n frequency = 1,\n amplitude = 1,\n maxValue = 0;\n for (let i = 0; i < octaves; i++) {\n total += this._smoothValueNoise.noise2d(x * frequency, y * frequency) * amplitude;\n maxValue += amplitude;\n amplitude *= persistence;\n frequency *= lacunarity;\n }\n return total / maxValue;\n }\n noise3d(x, y, z, octaves = 5, persistence = 0.5, lacunarity = 2.0) {\n let total = 0,\n frequency = 1,\n amplitude = 1,\n maxValue = 0;\n for (let i = 0; i < octaves; i++) {\n total += this._smoothValueNoise.noise3d(x * frequency, y * frequency, z * frequency) * amplitude;\n maxValue += amplitude;\n amplitude *= persistence;\n frequency *= lacunarity;\n }\n return total / maxValue;\n }\n noise4d(x, y, z, w, octaves = 5, persistence = 0.5, lacunarity = 2.0) {\n let total = 0,\n frequency = 1,\n amplitude = 1,\n maxValue = 0;\n for (let i = 0; i < octaves; i++) {\n total += this._smoothValueNoise.noise4d(x * frequency, y * frequency, z * frequency, w * frequency) * amplitude;\n maxValue += amplitude;\n amplitude *= persistence;\n frequency *= lacunarity;\n }\n return total / maxValue;\n }\n seed(seed) {\n this._smoothValueNoise.seed(seed);\n }\n}\n\n//# sourceURL=webpack://@tsparticles/fractal-noise/./dist/browser/FractalNoise.js?\n}");
38
38
 
39
- /***/ }),
39
+ /***/ },
40
40
 
41
- /***/ "./dist/browser/index.js":
41
+ /***/ "./dist/browser/index.js"
42
42
  /*!*******************************!*\
43
43
  !*** ./dist/browser/index.js ***!
44
44
  \*******************************/
45
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
45
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
46
46
 
47
47
  eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FractalNoise: () => (/* reexport safe */ _FractalNoise_js__WEBPACK_IMPORTED_MODULE_0__.FractalNoise)\n/* harmony export */ });\n/* harmony import */ var _FractalNoise_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./FractalNoise.js */ \"./dist/browser/FractalNoise.js\");\n\n\n//# sourceURL=webpack://@tsparticles/fractal-noise/./dist/browser/index.js?\n}");
48
48
 
49
- /***/ }),
49
+ /***/ },
50
50
 
51
- /***/ "@tsparticles/smooth-value-noise":
51
+ /***/ "@tsparticles/smooth-value-noise"
52
52
  /*!*********************************************************************************************************************************************************************!*\
53
53
  !*** external {"commonjs":"@tsparticles/smooth-value-noise","commonjs2":"@tsparticles/smooth-value-noise","amd":"@tsparticles/smooth-value-noise","root":"window"} ***!
54
54
  \*********************************************************************************************************************************************************************/
55
- /***/ ((module) => {
55
+ (module) {
56
56
 
57
57
  module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_smooth_value_noise__;
58
58
 
59
- /***/ })
59
+ /***/ }
60
60
 
61
61
  /******/ });
62
62
  /************************************************************************/
@@ -70,6 +70,12 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_smooth_value_noise__;
70
70
  /******/ if (cachedModule !== undefined) {
71
71
  /******/ return cachedModule.exports;
72
72
  /******/ }
73
+ /******/ // Check if module exists (development only)
74
+ /******/ if (__webpack_modules__[moduleId] === undefined) {
75
+ /******/ var e = new Error("Cannot find module '" + moduleId + "'");
76
+ /******/ e.code = 'MODULE_NOT_FOUND';
77
+ /******/ throw e;
78
+ /******/ }
73
79
  /******/ // Create a new module (and put it into the cache)
74
80
  /******/ var module = __webpack_module_cache__[moduleId] = {
75
81
  /******/ // no module.id needed
@@ -85,18 +91,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_smooth_value_noise__;
85
91
  /******/ }
86
92
  /******/
87
93
  /************************************************************************/
88
- /******/ /* webpack/runtime/compat get default export */
89
- /******/ (() => {
90
- /******/ // getDefaultExport function for compatibility with non-harmony modules
91
- /******/ __webpack_require__.n = (module) => {
92
- /******/ var getter = module && module.__esModule ?
93
- /******/ () => (module['default']) :
94
- /******/ () => (module);
95
- /******/ __webpack_require__.d(getter, { a: getter });
96
- /******/ return getter;
97
- /******/ };
98
- /******/ })();
99
- /******/
100
94
  /******/ /* webpack/runtime/define property getters */
101
95
  /******/ (() => {
102
96
  /******/ // define getter functions for harmony exports
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see tsparticles.fractal.noise.min.js.LICENSE.txt */
2
- !function(e,o){if("object"==typeof exports&&"object"==typeof module)module.exports=o(require("@tsparticles/smooth-value-noise"));else if("function"==typeof define&&define.amd)define(["@tsparticles/smooth-value-noise"],o);else{var t="object"==typeof exports?o(require("@tsparticles/smooth-value-noise")):o(e.window);for(var r in t)("object"==typeof exports?exports:e)[r]=t[r]}}(this,(e=>(()=>{var o={434:o=>{o.exports=e}},t={};function r(e){var s=t[e];if(void 0!==s)return s.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 s={};r.r(s),r.d(s,{FractalNoise:()=>n});var i=r(434);class n{constructor(){this._smoothValueNoise=new i.SmoothValueNoise}noise2d(e,o,t=5,r=.5,s=2){let i=0,n=1,l=1,a=0;for(let u=0;u<t;u++)i+=this._smoothValueNoise.noise2d(e*n,o*n)*l,a+=l,l*=r,n*=s;return i/a}noise3d(e,o,t,r=5,s=.5,i=2){let n=0,l=1,a=1,u=0;for(let d=0;d<r;d++)n+=this._smoothValueNoise.noise3d(e*l,o*l,t*l)*a,u+=a,a*=s,l*=i;return n/u}noise4d(e,o,t,r,s=5,i=.5,n=2){let l=0,a=1,u=1,d=0;for(let p=0;p<s;p++)l+=this._smoothValueNoise.noise4d(e*a,o*a,t*a,r*a)*u,d+=u,u*=i,a*=n;return l/d}seed(e){this._smoothValueNoise.seed(e)}}return s})()));
2
+ !function(e,o){if("object"==typeof exports&&"object"==typeof module)module.exports=o(require("@tsparticles/smooth-value-noise"));else if("function"==typeof define&&define.amd)define(["@tsparticles/smooth-value-noise"],o);else{var t="object"==typeof exports?o(require("@tsparticles/smooth-value-noise")):o(e.window);for(var r in t)("object"==typeof exports?exports:e)[r]=t[r]}}(this,(e=>(()=>{var o={434(o){o.exports=e}},t={};function r(e){var s=t[e];if(void 0!==s)return s.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 s={};r.r(s),r.d(s,{FractalNoise:()=>n});var i=r(434);class n{constructor(){this._smoothValueNoise=new i.SmoothValueNoise}noise2d(e,o,t=5,r=.5,s=2){let i=0,n=1,l=1,a=0;for(let u=0;u<t;u++)i+=this._smoothValueNoise.noise2d(e*n,o*n)*l,a+=l,l*=r,n*=s;return i/a}noise3d(e,o,t,r=5,s=.5,i=2){let n=0,l=1,a=1,u=0;for(let d=0;d<r;d++)n+=this._smoothValueNoise.noise3d(e*l,o*l,t*l)*a,u+=a,a*=s,l*=i;return n/u}noise4d(e,o,t,r,s=5,i=.5,n=2){let l=0,a=1,u=1,d=0;for(let p=0;p<s;p++)l+=this._smoothValueNoise.noise4d(e*a,o*a,t*a,r*a)*u,d+=u,u*=i,a*=n;return l/d}seed(e){this._smoothValueNoise.seed(e)}}return s})()));
@@ -1 +1 @@
1
- /*! tsParticles Fractal Noise v3.9.1 by Matteo Bruni */
1
+ /*! tsParticles Fractal Noise v4.0.0-alpha.1 by Matteo Bruni */