tumult
Version:
A Javascript noise library
38 lines • 23.4 kB
JavaScript
parcelRequire=function(e,r,n,t){var i="function"==typeof parcelRequire&&parcelRequire,o="function"==typeof require&&require;function u(n,t){if(!r[n]){if(!e[n]){var f="function"==typeof parcelRequire&&parcelRequire;if(!t&&f)return f(n,!0);if(i)return i(n,!0);if(o&&"string"==typeof n)return o(n);var c=new Error("Cannot find module '"+n+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[n][1][r]||r},p.cache={};var l=r[n]=new u.Module(n);e[n][0].call(l.exports,p,l,l.exports,this)}return r[n].exports;function p(e){return u(p.resolve(e))}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=r,u.parent=i,u.register=function(r,n){e[r]=[function(e,r){r.exports=n},{}]};for(var f=0;f<n.length;f++)u(n[f]);if(n.length){var c=u(n[n.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=c:"function"==typeof define&&define.amd?define(function(){return c}):t&&(this[t]=c)}return u}({"yUp7":[function(require,module,exports) {
function i(i,n,r,t){return JSON.stringify(i,e(n,t),r)}function e(i,e){var n=[],r=[];return null==e&&(e=function(i,e){return n[0]===e?"[Circular ~]":"[Circular ~."+r.slice(0,n.indexOf(e)).join(".")+"]"}),function(t,l){if(n.length>0){var u=n.indexOf(this);~u?n.splice(u+1):n.push(this),~u?r.splice(u,1/0,t):r.push(t),~n.indexOf(l)&&(l=e.call(this,t,l))}else n.push(l);return null==i?l:i.call(this,t,l)}}exports=module.exports=i,exports.getSerialize=e;
},{}],"KFk+":[function(require,module,exports) {
;var n=require("json-stringify-safe"),r=function(){var n=4022871197;return function(r){if(r){r=r.toString();for(var t=0;t<r.length;t++){var e=.02519603282416938*(n+=r.charCodeAt(t));e-=n=e>>>0,n=(e*=n)>>>0,n+=4294967296*(e-=n)}return 2.3283064365386963e-10*(n>>>0)}n=4022871197}},t=function(t){return function(){var e,o,i=48,u=1,a=i,f=new Array(i),c=0,l=new r;for(e=0;e<i;e++)f[e]=l(Math.random());var g=function(){++a>=i&&(a=0);var n=1768863*f[a]+2.3283064365386963e-10*u;return f[a]=n-(u=0|n)},h=function(n){return Math.floor(n*(g()+1.1102230246251565e-16*(2097152*g()|0)))};h.string=function(n){var r,t="";for(r=0;r<n;r++)t+=String.fromCharCode(33+h(94));return t};return h.cleanString=function(n){return n=(n=(n=n.replace(/(^\s*)|(\s*$)/gi,"")).replace(/[\x00-\x1F]/gi,"")).replace(/\n /,"\n")},h.hashString=function(n){for(n=h.cleanString(n),l(n),e=0;e<n.length;e++)for(c=n.charCodeAt(e),o=0;o<i;o++)f[o]-=l(c),f[o]<0&&(f[o]+=1)},h.seed=function(r){null==r&&(r=Math.random()),"string"!=typeof r&&(r=n(r,function(n,r){return"function"==typeof r?r.toString():r})),h.initState(),h.hashString(r)},h.addEntropy=function(){var n=[];for(e=0;e<arguments.length;e++)n.push(arguments[e]);!function(){var n=Array.prototype.slice.call(arguments);for(e=0;e<n.length;e++)for(o=0;o<i;o++)f[o]-=l(n[e]),f[o]<0&&(f[o]+=1)}(c+++(new Date).getTime()+n.join("")+Math.random())},h.initState=function(){for(l(),e=0;e<i;e++)f[e]=l(" ");u=1,a=i},h.done=function(){l=null},void 0!==t&&h.seed(t),h.range=function(n){return h(n)},h.random=function(){return h(Number.MAX_VALUE-1)/Number.MAX_VALUE},h.floatBetween=function(n,r){return h.random()*(r-n)+n},h.intBetween=function(n,r){return Math.floor(h.random()*(r-n+1))+n},h}()};t.create=function(n){return new t(n)},module.exports=t;
},{"json-stringify-safe":"yUp7"}],"WRFH":[function(require,module,exports) {
;function r(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function e(r,e){for(var n=0;n<e.length;n++){var t=e[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,t.key,t)}}function n(r,n,t){return n&&e(r.prototype,n),t&&e(r,t),r}var t=require("random-seed"),a=function(){function e(n){r(this,e),this.p=new Uint8Array(512),this.seed(n)}return n(e,[{key:"gen",value:function(){}},{key:"seed",value:function(r){for(var e=t.create(r||Math.random()),n=0;n<256;n++)this.p[n]=n;for(var a=0;a<256;a++){var i=e(256),o=this.p[a];this.p[a]=this.p[i],this.p[i]=o}for(var u=0;u<256;u++)this.p[u+256]=this.p[u]}},{key:"transform",value:function(r){var e=this;return function(){for(var n=arguments.length,t=new Array(n),a=0;a<n;a++)t[a]=arguments[a];return r.apply(e,t)}.bind(this)}},{key:"octavate",value:function(){for(var r=this,e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];for(var a=n[0],i=n.slice(1),o=0,u=0,f=function(e){var n=1<<e;o+=r.gen.apply(r,i.map(function(r){return r*n}))/n},s=0;s<a;s++)f(s);for(s=0;s<a;s++)u+=1/(1<<s);return o/u}}]),e}();module.exports=a;
},{"random-seed":"KFk+"}],"Twnv":[function(require,module,exports) {
;function n(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function e(n,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}function t(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),n}var r=function(){function e(t){n(this,e),this.x=t}return t(e,[{key:"dot",value:function(n){return this.x*n}}]),e}(),o=[new r(1),new r(-1)];function u(n,e){return o[n[e]%o.length]}module.exports={grad1:u};
},{}],"CFdN":[function(require,module,exports) {
;function n(){for(var n=arguments.length,r=new Array(n),u=0;u<n;u++)r[u]=arguments[u];var e=r.slice(1),t=r[0]-e.reduce(function(n,r){return n+r*r},0);return t*t*t*t}function r(n,r,u){return n*(1-u)+r*u}function u(n){return n*n*n*(10+n*(6*n-15))}var e=n.bind(null,1),t=n.bind(null,.5);module.exports={lerp:r,fade:u,cut1:e,cut:t};
},{}],"g3gc":[function(require,module,exports) {
;function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function o(t,e,o){return e&&n(t.prototype,e),o&&n(t,o),t}function r(e,n){return!n||"object"!==t(n)&&"function"!=typeof n?u(e):n}function u(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var l=require("../util/noise"),p=require("../util/1d"),a=p.grad1,y=require("../util/math"),s=y.cut1,b=function(t){function n(){return e(this,n),r(this,i(n).apply(this,arguments))}return c(n,l),o(n,[{key:"gen",value:function(t){var e=Math.floor(t)%256,n=t-e;return.5*(s(n)*a(this.p,e).dot(n)+s(n-1)*a(this.p,e+1).dot(n-1))}}]),n}();module.exports=b;
},{"../util/noise":"WRFH","../util/1d":"Twnv","../util/math":"CFdN"}],"VHE+":[function(require,module,exports) {
;function n(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function e(n,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}function t(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),n}var r=function(){function e(t,r){n(this,e),this.x=t,this.y=r}return t(e,[{key:"dot",value:function(n,e){return this.x*n+this.y*e}}]),e}(),a=[new r(1,0),new r(1,1),new r(0,1),new r(-1,1),new r(-1,0),new r(-1,-1),new r(0,-1),new r(1,-1)];function i(n,e,t){var r=n[e+n[t]]%a.length;return a[r]}var o=.5*(Math.sqrt(3)-1),u=(3-Math.sqrt(3))/6;module.exports={grad2:i,S2_TO_C:o,C_TO_S2:u};
},{}],"kSyG":[function(require,module,exports) {
;function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function r(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}function o(e,n){return!n||"object"!==t(n)&&"function"!=typeof n?u(e):n}function u(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var p=require("../util/noise"),a=require("../util/2d"),l=a.grad2,s=a.S2_TO_C,y=a.C_TO_S2,b=require("../util/math"),h=b.cut,m=function(t){function n(){return e(this,n),o(this,i(n).apply(this,arguments))}return c(n,p),r(n,[{key:"gen",value:function(t,e){var n=(t+e)*s,r=Math.trunc(t+n),o=Math.trunc(e+n),u=(r+o)*y,i=t-(r-u),c=e-(o-u),f=i>c?1:0,p=i>c?0:1,a=i-f+y,b=c-p+y,m=i-1+2*y,O=c-1+2*y;return 70*(h(i,c)*l(this.p,r,o).dot(i,c)+h(a,b)*l(this.p,r+f,o+p).dot(a,b)+h(m,O)*l(this.p,r+1,o+1).dot(m,O))}}]),n}();module.exports=m;
},{"../util/noise":"WRFH","../util/2d":"VHE+","../util/math":"CFdN"}],"nJiC":[function(require,module,exports) {
;function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function n(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}function o(e,r){return!r||"object"!==t(r)&&"function"!=typeof r?u(e):r}function u(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var l=require("../util/noise"),p=require("../util/1d"),a=p.grad1,y=require("../util/math"),s=y.lerp,b=y.fade,h=function(t){function r(){return e(this,r),o(this,i(r).apply(this,arguments))}return f(r,l),n(r,[{key:"gen",value:function(t){var e=Math.floor(t)%256,r=t-e,n=a(this.p,e).dot(r),o=a(this.p,e+1).dot(r-1);return s(n,o,b(r))}}]),r}();module.exports=h;
},{"../util/noise":"WRFH","../util/1d":"Twnv","../util/math":"CFdN"}],"N+bM":[function(require,module,exports) {
;function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function r(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}function o(e,n){return!n||"object"!==t(n)&&"function"!=typeof n?u(e):n}function u(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var p=require("../util/noise"),a=require("../util/2d"),l=a.grad2,s=require("../util/math"),y=s.fade,b=s.lerp,h=function(t){function n(){return e(this,n),o(this,i(n).apply(this,arguments))}return c(n,p),r(n,[{key:"gen",value:function(t,e){var n=Math.trunc(t)%256,r=Math.trunc(e)%256,o=t-n,u=e-r,i=l(this.p,n,r).dot(o,u),c=l(this.p,n+1,r).dot(o-1,u),f=l(this.p,n,r+1).dot(o,u-1),p=l(this.p,n+1,r+1).dot(o-1,u-1);return b(b(i,c,y(o)),b(f,p,y(o)),y(u))}}]),n}();module.exports=h;
},{"../util/noise":"WRFH","../util/2d":"VHE+","../util/math":"CFdN"}],"S8gV":[function(require,module,exports) {
;function n(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function e(n,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}function t(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),n}var r=function(){function e(t,r,i){n(this,e),this.x=t,this.y=r,this.z=i}return t(e,[{key:"dot",value:function(n,e,t){return this.x*n+this.y*e+this.z*t}}]),e}(),i=[new r(1,1,1),new r(-1,1,1),new r(1,-1,1),new r(-1,-1,1),new r(1,1,0),new r(-1,1,0),new r(1,-1,0),new r(-1,-1,0),new r(1,1,-1),new r(-1,1,-1),new r(1,-1,-1),new r(-1,-1,-1)];function o(n,e,t,r){var o=n[e+n[t+n[r]]]%i.length;return i[o]}module.exports={grad3:o};
},{}],"AAuj":[function(require,module,exports) {
;function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function n(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}function r(e,o){return!o||"object"!==t(o)&&"function"!=typeof o?i(e):o}function i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var p=require("../util/noise"),a=require("../util/3d"),l=a.grad3,s=require("../util/math"),y=s.fade,b=s.lerp,h=function(t){function o(){return e(this,o),r(this,u(o).apply(this,arguments))}return c(o,p),n(o,[{key:"gen",value:function(t,e,o){var n=Math.trunc(t)%256,r=Math.trunc(e)%256,i=Math.trunc(o)%256,u=t-n,c=e-r,f=o-i,p=l(this.p,n,r,i).dot(u,c,f),a=l(this.p,n+1,r,i).dot(u-1,c,f),s=l(this.p,n,r+1,i).dot(u,c-1,f),h=l(this.p,n+1,r+1,i).dot(u-1,c-1,f),d=l(this.p,n,r,i+1).dot(u,c,f-1),m=l(this.p,n+1,r,i+1).dot(u-1,c,f-1),O=l(this.p,n,r+1,i+1).dot(u,c-1,f-1),v=l(this.p,n+1,r+1,i+1).dot(u-1,c-1,f-1);return b(b(b(p,a,u),b(s,h,u),y(c)),b(b(d,m,u),b(O,v,u),y(c)),y(f))}}]),o}();module.exports=h;
},{"../util/noise":"WRFH","../util/3d":"S8gV","../util/math":"CFdN"}],"473b":[function(require,module,exports) {
;function n(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function e(n,e){for(var t=0;t<e.length;t++){var w=e[t];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(n,w.key,w)}}function t(n,t,w){return t&&e(n.prototype,t),w&&e(n,w),n}var w=function(){function e(t,w,r,i){n(this,e),this.x=t,this.y=w,this.z=r,this.t=i}return t(e,[{key:"dot",value:function(n,e,t,w){return this.x*n+this.y*e+this.z*t+this.t*w}}]),e}(),r=[new w(0,1,1,1),new w(0,1,1,-1),new w(0,1,-1,1),new w(0,1,-1,-1),new w(0,-1,1,1),new w(0,-1,1,-1),new w(0,-1,-1,1),new w(0,-1,-1,-1),new w(1,0,1,1),new w(1,0,1,-1),new w(1,0,-1,1),new w(1,0,-1,-1),new w(-1,0,1,1),new w(-1,0,1,-1),new w(-1,0,-1,1),new w(-1,0,-1,-1),new w(1,1,0,1),new w(1,1,0,-1),new w(1,-1,0,1),new w(1,-1,0,-1),new w(-1,1,0,1),new w(-1,1,0,-1),new w(-1,-1,0,1),new w(-1,-1,0,-1),new w(1,1,1,0),new w(1,1,-1,0),new w(1,-1,1,0),new w(1,-1,-1,0),new w(-1,1,1,0),new w(-1,1,-1,0),new w(-1,-1,1,0),new w(-1,-1,-1,0)];function i(n,e,t,w,i){var o=n[e+n[t+n[w+n[i]]]]%r.length;return r[o]}module.exports={grad4:i};
},{}],"Noxp":[function(require,module,exports) {
;function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function n(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}function r(e,o){return!o||"object"!==t(o)&&"function"!=typeof o?i(e):o}function i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function p(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var f=require("../util/noise"),s=require("../util/4d"),a=s.grad4,l=require("../util/math"),h=l.fade,y=l.lerp,d=function(t){function o(){return e(this,o),r(this,u(o).apply(this,arguments))}return p(o,f),n(o,[{key:"gen",value:function(t,e,o,n){var r=Math.trunc(t)%256,i=Math.trunc(e)%256,u=Math.trunc(o)%256,p=Math.trunc(n)%256,c=t-r,f=e-i,s=o-u,l=n-p,d=a(this.p,r,i,u,p).dot(c,f,s,l),b=a(this.p,r+1,i,u,p).dot(c-1,f,s),m=a(this.p,r,i+1,u,p).dot(c,f-1,s),O=a(this.p,r+1,i+1,u,p).dot(c-1,f-1,s),v=a(this.p,r,i,u+1,p).dot(c,f,s-1),w=a(this.p,r+1,i,u+1,p).dot(c-1,f,s-1),_=a(this.p,r,i+1,u+1,p).dot(c,f-1,s-1),g=a(this.p,r+1,i+1,u+1,p).dot(c-1,f-1,s-1),j=a(this.p,r,i,u,p+1).dot(c,f,s,l-1),S=a(this.p,r+1,i,u,p+1).dot(c-1,f,s,l-1),P=a(this.p,r,i+1,u,p+1).dot(c,f-1,s,l-1),M=a(this.p,r+1,i+1,u,p+1).dot(c-1,f-1,s,l-1),q=a(this.p,r,i,u+1,p+1).dot(c,f,s-1,l-1),E=a(this.p,r+1,i,u+1,p+1).dot(c-1,f,s-1,l-1),k=a(this.p,r,i+1,u+1,p+1).dot(c,f-1,s-1,l-1),x=a(this.p,r+1,i+1,u+1,p+1).dot(c-1,f-1,s-1,l-1);return y(y(y(y(d,b,c),y(m,O,c),h(f)),y(y(v,w,c),y(_,g,c),h(f)),h(s)),y(y(y(j,S,c),y(P,M,c),h(f)),y(y(q,E,c),y(k,x,c),h(f)),h(s)),h(l))}}]),o}();module.exports=d;
},{"../util/noise":"WRFH","../util/4d":"473b","../util/math":"CFdN"}],"pDH8":[function(require,module,exports) {
;function e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function n(e,n){for(var r=0;r<n.length;r++){var t=n[r];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}function r(e,r,t){return r&&n(e.prototype,r),t&&n(e,t),e}var t=require("./math"),l=t.lerp,i=t.fade;function o(e,n){return 1===n.length?e[n[0]]:e[n[0]+o(e,n.slice(1))]}var a=function(){function n(r){e(this,n),this.R=r}return r(n,[{key:"dot",value:function(e){for(var n=0,r=0;r<e.length;r++)n+=this.R[r]*e[r];return n}}]),n}(),u=[];function c(e){for(var n=0;n<2*e;n++){var r=new Array(e).fill(0);r[n%e]=n/e>=1?1:-1,u[n]=new a(r)}}function f(e,n){if(1===n.length)return l(e[0],e[1],i(n[0]));var r=e.slice(0,Math.floor(e.length/2)),t=e.slice(Math.ceil(e.length/2));return l(f(r,n.slice(0,n.length-1)),f(t,n.slice(0,n.length-1)),i(n[n.length-1]))}function h(e,n,r,t){var l=[];0===u.length&&c(n);for(var i=0;i<2<<n-1;i++){for(var a=r.slice(),f=t.slice(),h=i,s=0;s<n;s++)1&h&&(a[s]+=1,f[s]-=1),h>>=1;l[i]=u[o(e,a)%u.length].dot(f)}return l}module.exports={lerpN:f,getNs:h};
},{"./math":"CFdN"}],"wUKa":[function(require,module,exports) {
;function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function r(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}function o(e,n){return!n||"object"!==t(n)&&"function"!=typeof n?u(e):n}function u(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var l=require("../util/noise"),p=require("../util/nd"),a=p.lerpN,y=p.getNs,s=function(t){function n(){return e(this,n),o(this,i(n).apply(this,arguments))}return c(n,l),r(n,[{key:"gen",value:function(){for(var t=[],e=[],n=0;n<arguments.length;n++)t[n]=Math.trunc(n<0||arguments.length<=n?void 0:arguments[n])%256,e[n]=(n<0||arguments.length<=n?void 0:arguments[n])-t[n];var r=y(this.p,arguments.length,t,e);return a(r,e)}}]),n}();module.exports=s;
},{"../util/noise":"WRFH","../util/nd":"pDH8"}],"bRhr":[function(require,module,exports) {
var e=require("./simplex/simplex1"),r=require("./simplex/simplex2"),i=require("./perlin/perlin1"),l=require("./perlin/perlin2"),p=require("./perlin/perlin3"),n=require("./perlin/perlin4"),u=require("./perlin/perlinN");module.exports={Simplex1:e,Simplex2:r,Perlin1:i,Perlin2:l,Perlin3:p,Perlin4:n,PerlinN:u};
},{"./simplex/simplex1":"g3gc","./simplex/simplex2":"kSyG","./perlin/perlin1":"nJiC","./perlin/perlin2":"N+bM","./perlin/perlin3":"AAuj","./perlin/perlin4":"Noxp","./perlin/perlinN":"wUKa"}],"Focm":[function(require,module,exports) {
;module.exports=require("./lib");
},{"./lib":"bRhr"}]},{},["Focm"], "tumult")
//# sourceMappingURL=/tumult.min.map