From 10814e99f2fed89b2a2a444c2f1299ae7fdbf141 Mon Sep 17 00:00:00 2001 From: TS Date: Wed, 13 Jan 2021 21:53:28 +0100 Subject: [PATCH 1/3] Updated demo index.html --- demo/index.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/demo/index.html b/demo/index.html index c9f0ae0..b285840 100644 --- a/demo/index.html +++ b/demo/index.html @@ -106,7 +106,10 @@

Seamless texture generator

- + + From fc79b0ef4fdfd3a080086f123019b0943f95ae7b Mon Sep 17 00:00:00 2001 From: TS Date: Wed, 13 Jan 2021 22:31:51 +0100 Subject: [PATCH 2/3] Fixed test again --- dist/tgen-with-presets.js | 6 ++++-- dist/tgen-with-presets.min.js | 4 ++-- dist/tgen-with-presets.min.js.gz | Bin 14307 -> 14310 bytes dist/tgen.js | 6 ++++-- dist/tgen.min.js | 4 ++-- dist/tgen.min.js.gz | Bin 11132 -> 11135 bytes package.json | 2 +- src/tgen-base.js | 2 +- src/tgen-generator.js | 4 +++- 9 files changed, 17 insertions(+), 11 deletions(-) diff --git a/dist/tgen-with-presets.js b/dist/tgen-with-presets.js index a515fe4..9dc3580 100644 --- a/dist/tgen-with-presets.js +++ b/dist/tgen-with-presets.js @@ -11,7 +11,7 @@ var SeamlessTextureGenerator = (function() { return { - version: '1.3.3', + version: '1.3.4', defaults: {}, effects: {}, filters: [], @@ -6053,7 +6053,9 @@ if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') { if (config.preset.seed) { for (key in items) { - items[key][2].seed = config.preset.seed; + if (items[key][2]) { + items[key][2].seed = config.preset.seed; + } } } diff --git a/dist/tgen-with-presets.min.js b/dist/tgen-with-presets.min.js index d535d3f..6b2ddfd 100644 --- a/dist/tgen-with-presets.min.js +++ b/dist/tgen-with-presets.min.js @@ -1,8 +1,8 @@ /** * seamless-texture-generator - Seamless texture generator * - * @version v1.3.3 + * @version v1.3.4 * @link https://github.com/schalkt/tgen/ * @license MIT */ -var SeamlessTextureGenerator={version:"1.3.3",defaults:{},effects:{},filters:[],presets:{},functions:[],blends:{},shapes:{},colormaps:{},events:{beforeEffect:{},afterEffect:{},beforeRender:{},afterRender:{}},config:{historyLast:0,historyName:"history",historyList:[]},blendSafe:["average","lighten","linearburn","linearlight","difference","difference-invert","screen","lineardodge","lineardodge-invert","opacity","exclusion"],blendFlat:["lighten","screen","opacity"],effect:function(e,r,t){this.defaults[e]=r,this.effects[e]=t},function:function(e,r,t){this.functions.push(e),this.defaults[e]=r,this.effects[e]=t},filter:function(e,r,t){this.filters.push(e),this.defaults[e]=r,this.effects[e]=t},preset:function(e,r){r.name=e,this.presets[e]=r},event:function(e,r,t){null!=this.events[e]&&(this.events[e][r]=t)},blend:function(e,r){this.blends[e]=r},shape:function(e,r){this.shapes[e]=r},colormap:function(e,r){this.colormaps[e]=r},init:function(e,r,t){return this.getGenerator(e,r,t)}};"undefined"!=typeof module&&void 0!==module.exports?module.exports=SeamlessTextureGenerator:"function"==typeof define&&define.amd?define([],function(){return SeamlessTextureGenerator}):window.tgen=SeamlessTextureGenerator,SeamlessTextureGenerator.effect("checkerboard",{blend:SeamlessTextureGenerator.blendFlat,rgba:"randomalpha",even:"random",size:[[2,32],[2,32]]},function(a,e){e.even=a.randItemByArraySeed(e.even,[!0,!1]);var r,t,s=a.texture.width,i=a.texture.height;"number"==typeof e.size?r=t=e.size:(r=e.size[0]=a.randByArraySeed(e.size[0],null,!0),t=e.size[1]=a.randByArraySeed(e.size[1],null,!0));function n(e,r){for(var t=0;tr.skip&&(e.point.rgba=[x%l*u,x%d*h,x%c*p,e.point.rgba[3]],e.point.set(y,g))}}return r}),SeamlessTextureGenerator.effect("lines",{blend:SeamlessTextureGenerator.blendFlat,rgba:"randomalpha",size:[77,221],count:[21,512],freq1s:[4,221],freq1c:[4,221],freq2s:[4,221],freq2c:[4,221]},function(e,r){r.freq1s=e.randByArraySeed(r.freq1s,!0),r.freq1c=e.randByArraySeed(r.freq1c,!0),r.freq2s=e.randByArraySeed(r.freq2s,!0),r.freq2c=e.randByArraySeed(r.freq2c,!0),r.size=e.randByArraySeed(r.size);for(var t=0;tr[0]?t[0]:r[0],t[1]=t[1]>r[1]?t[1]:r[1],t[2]=t[2]>r[2]?t[2]:r[2],t}),e.blend("lineardodge",function(e,r,t){return t[0]=r[0]+t[0],t[1]=r[1]+t[1],t[2]=r[2]+t[2],t}),e.blend("lineardodge-invert",function(e,r,t){return t[0]=255-(t[0]+r[0]),t[1]=255-(t[1]+r[1]),t[2]=255-(t[2]+r[2]),t}),e.blend("linearlight",function(e,r,t){return t[0]=r[0]+2*t[0]-255,t[1]=r[1]+2*t[1]-255,t[2]=r[2]+2*t[2]-255,t}),e.blend("linearburn",function(e,r,t){return t[0]=r[0]+t[0]-255,t[1]=r[1]+t[1]-255,t[2]=r[2]+t[2]-255,t}),e.blend("softlight",function(e,r,t){return t[0]=128>16)):m+o*r.xamount*c/(c*c),a=u%16==0?e.wrapy(t+(l*r.yamount*u>>16)):t+l*r.yamount*u/(u*u),s=e.point.get(n,a),d.data[i]=s[0],d.data[i+1]=s[1],d.data[i+2]=s[2],d.data[i+3]=s[3];for(var f=e.texture.size();f--;)e.texture.data[f]=d.data[f];return r}),e.function("rotate",{angle:90,times:1,type:1,blend:e.blendSafe},function(e,r){r.type=e.randByArraySeed(r.type),null===r.angle?r.angle=e.randItemByArraySeed(r.angle,[90,180,270]):r.angle=e.randByArraySeed(r.angle),r.times=e.randByArraySeed(r.times);for(var t,n,a,s,i,o,l=new e.buffer,d=e.texture.size(),c=e.texture.width,u=e.texture.height,h=r.angle*(Math.PI/180),p=1;p<=r.times;p++)d=e.texture.size(),h=p*r.angle*(Math.PI/180),(1===r.type?function(){for(t=0;t=this.width)&&(e=this.pattern(e,this.width)),(r<0||r>=this.height)&&(r=this.pattern(r,this.height)),r*this.width*this.components+e*this.components},this.set=function(e,r,t){var n=this.offset(e,r);this.data[n]=t[0],this.data[n+1]=t[1],this.data[n+2]=t[2],this.data[n+3]=t[3]},this.get=function(e,r){var t=this.offset(e,r);return[this.data[t],this.data[t+1],this.data[t+2],this.data[t+3]]},this.alpha=function(e){switch(e){case"sphere":for(;size;)m.texture.data[size]=.5,size-=4}},this.canvas=function(e){for(var r=this.size(),t=e.getContext("2d").getImageData(0,0,this.width,this.height).data;r--;)m.texture.data[r]=t[r]},null===this.data&&this.clear()},m.texture=new m.buffer,m.layerCopy=function(e){for(var r=[],t=this.layers[e],n=t.length;n--;)r[n]=t[n];return r};function d(e,r){var t,n={};for(t in e)n[t]=e[t];for(t in r)n[t]=r[t];return n}m.clone=function(e,r){for(var t in r)"object"==typeof r[t]&&null!==r[t]&&e[t]?this.clone(e[t],r[t]):e[t]=r[t]},m.minMaxNormalize=function(e,r){return{min:Math.min(e,r),max:Math.max(e,r)}},m.randInt=function(e,r,t){var n=m.minMaxNormalize(e,r);return e=n.min,r=n.max,(!0===t?(e=Math.round(e/2),r=Math.round(r/2),2):1)*(Math.floor(Math.random()*(r-e+1))+e)},m.randIntSeed=function(e,r,t){var n=m.minMaxNormalize(e,r);return e=n.min,r=n.max,mul=!0===t?(e=Math.round(e/2),r=Math.round(r/2),2):1,mul*(Math.floor(m.calc.randomseed()*(r-e+1))+e)},m.randReal=function(e,r){var t=m.minMaxNormalize(e,r);return e=t.min,r=t.max,Math.random()*(r-e)+e},m.randRealSeed=function(e,r){var t=m.minMaxNormalize(e,r);return e=t.min,r=t.max,m.calc.randomseed()*(r-e)+e},m.randByArray=function(e,r){return void 0===e||"object"!=typeof e||void 0===e[0]?(m.calc.seed++,e):e=void 0!==r?m.randReal(e[0],e[1]):m.randInt(e[0],e[1])},m.randByArraySeed=function(e,r,t){return null==e||"object"!=typeof e||void 0===e[0]?(m.calc.seed++,e):e=void 0!==r?m.randRealSeed(e[0],e[1]):m.randIntSeed(e[0],e[1],t)},m.randIntByArraySeed=function(e,r,t){return null!=e&&"random"!==e||(e=r),"object"!=typeof e?(m.calc.seed++,e):e=m.randIntSeed(e[0],e[1],t)},m.randRealByArraySeed=function(e,r){return null!=e&&"random"!==e||(e=r),"object"!=typeof e?(m.calc.seed++,e):e=m.randRealSeed(e[0],e[1])},m.randItemSeed=function(e){if("object"!=typeof e||void 0===e[0])return m.calc.seed++,e;var r=e.length;return e[m.randIntSeed(0,r-1)]},m.randItemByArraySeed=function(e,r){if(null!=e&&"random"!==e)return m.calc.seed++,e;var t=r.length;return r[m.randIntSeed(0,t-1)]},m.randProperty=function(e,r){if(null!=e&&"random"!==e)return m.calc.seed++,e;var t=Object.keys(r);return t[m.randByArraySeed([0,t.length-1])]},m.rgba=function(e,r){return"random"!==e&&null!=e||(e=[[0,255],[0,255],[0,255],255]),"randomalpha"===e&&(e=[[0,255],[0,255],[0,255],[128,255]]),void 0!==e[0]&&null!==e[0]||(e[0]=0),void 0!==e[1]&&null!==e[1]||(e[1]=0),void 0!==e[2]&&null!==e[2]||(e[2]=0),void 0!==e[3]&&null!==e[3]||(e[3]=1),e[0]=m.randByArraySeed(e[0]),e[1]=m.randByArraySeed(e[1]),e[2]=m.randByArraySeed(e[2]),e[3]=m.randByArraySeed(e[3]),e[3]%1!=0&&(e[3]=Math.round(255*e[3])),1==e[3]&&(e[3]=255),e};return m.findClosestIndex=function(e,r,t){for(var n=r;0<=n&&n<=e.length-1;n+=t)if(e[n])return n;return e.length-1},m.calc={seed:void 0,pi:3.1415927,luminance:function(e){return.21*e[0]+.72*e[1]+.07*e[2]},randomseed:function(e){void 0===this.seed&&(this.seed=m.randInt(1,Number.MAX_SAFE_INTEGER)),void 0!==e&&(this.seed=e);var r=1e4*Math.sin(this.seed++);return r-Math.floor(r)},normalize1:function(e){return m.calc.normalize(e,0,1)},normalize255:function(e){return m.calc.normalize(e,0,255)},normalize:function(e,r,t){return t=p.config.historyLast&&p.config.historyList.shift(),p.config.historyList.push(r),window.localStorage.setItem(p.config.historyName,JSON.stringify(p.config.historyList))}}},m.params=function(e){var r;return null==e&&(e=(r=new Date).getHours()+":"+r.getMinutes()+":"+r.getSeconds()+" l"+m.layers.length+" i"+l.length),{name:e,version:p.version,width:c,height:u,normalize:m.normalize,items:l}},m.render=function(e,r){this.debug=!0===e.debug,m.event("beforeRender",e);var t,n,a=0,s=0;if(null!=e.width&&(c=e.width),null!=e.height&&(u=e.height),null!=e.normalize?m.normalize=e.normalize:m.normalize="limitless",h(),m.texture=new m.buffer(e.background),1!=r&&m.clear(),e.preset&&e.preset.name){var i=e.preset.name;if("random"===e.preset.name&&(i=m.randItemByArraySeed(null,Object.keys(f.presets))),"object"==typeof e.preset.name&&(i=m.randItemByArraySeed(null,e.preset.name)),i){var o,l=JSON.parse(JSON.stringify(f.presets[i].items));if(e.preset.seed)for(o in l)l[o][2].seed=e.preset.seed;for(o in e.items)l.push(e.items[o]);e.items=l}}for(var d in e.items)a=e.items[d][0],t=e.items[d][1],n=e.items[d][2]?e.items[d][2]:{},null===a&&(a="copy"===t?s+1:s),e.seed&&(n.seed=e.seed*d),"random"==t&&(t=m.randProperty(m.defaults)),"object"==typeof t&&(t=m.randItemSeed(t)),s!=a&&(null!=m.layers[a]?m.texture.data=m.layers[a]:m.texture.clear(),s=a),null!=m[t]?m[t](n):null!=p.effects[t]?m.do(t,n,a):console.warn("undefined effect: "+t),m.layers[a]=m.texture.export();return m.event("afterRender",m.params()),m.history.add(),this},m.event=function(e,r){for(var t in p.events[e]){var n=p.events[e][t];"function"==typeof n&&n(m,r)}},m.do=function(e,r,t){var n,a,s,i,o=r;return void 0===r?r=d({},p.defaults[e]):"object"==typeof r&&(r=d(p.defaults[e],r)),r.seed=void 0!==r.seed&&null!==r.seed?r.seed:[1,Number.MAX_SAFE_INTEGER],r.seed=m.randByArray(r.seed),m.calc.randomseed(r.seed),(n=r).count=m.randByArraySeed(n.count),n.level=m.randByArraySeed(n.level),n.opacity=m.randByArraySeed(n.opacity),void 0!==n.blend?(n.blend=m.randProperty(n.blend,p.blends),n.blend=m.randItemSeed(n.blend),m.point.blend=n.blend):m.point.blend="",n.rgba=m.rgba(n.rgb?n.rgb:n.rgba),n.rgba&&(m.point.rgba=[n.rgba[0],n.rgba[1],n.rgba[2],n.rgba[3]]),Object.keys(n).forEach(function(e){void 0===n[e]&&delete n[e]}),r=n,m.event("beforeEffect",{layer:t,name:e,params:r}),"function"==typeof p.effects[e]?r=p.effects[e](m,r):console.warn("effect not callable: "+e),void 0===r&&(r=o),m.event("afterEffect",{layer:t,name:e,params:r}),r&&!1!==r.store&&(a=t,s=e,i=r,l.push([a,s,i])),m},m}}(SeamlessTextureGenerator),function(e){e.shape("rect",function(e,r,t,n,a,s){void 0!==s&&(r-=parseInt(n/2,10),t-=parseInt(a/2,10));for(var i=0;ir.skip&&(e.point.rgba=[x%l*u,x%d*h,x%c*p,e.point.rgba[3]],e.point.set(y,g))}}return r}),SeamlessTextureGenerator.effect("lines",{blend:SeamlessTextureGenerator.blendFlat,rgba:"randomalpha",size:[77,221],count:[21,512],freq1s:[4,221],freq1c:[4,221],freq2s:[4,221],freq2c:[4,221]},function(e,r){r.freq1s=e.randByArraySeed(r.freq1s,!0),r.freq1c=e.randByArraySeed(r.freq1c,!0),r.freq2s=e.randByArraySeed(r.freq2s,!0),r.freq2c=e.randByArraySeed(r.freq2c,!0),r.size=e.randByArraySeed(r.size);for(var t=0;tr[0]?t[0]:r[0],t[1]=t[1]>r[1]?t[1]:r[1],t[2]=t[2]>r[2]?t[2]:r[2],t}),e.blend("lineardodge",function(e,r,t){return t[0]=r[0]+t[0],t[1]=r[1]+t[1],t[2]=r[2]+t[2],t}),e.blend("lineardodge-invert",function(e,r,t){return t[0]=255-(t[0]+r[0]),t[1]=255-(t[1]+r[1]),t[2]=255-(t[2]+r[2]),t}),e.blend("linearlight",function(e,r,t){return t[0]=r[0]+2*t[0]-255,t[1]=r[1]+2*t[1]-255,t[2]=r[2]+2*t[2]-255,t}),e.blend("linearburn",function(e,r,t){return t[0]=r[0]+t[0]-255,t[1]=r[1]+t[1]-255,t[2]=r[2]+t[2]-255,t}),e.blend("softlight",function(e,r,t){return t[0]=128>16)):m+o*r.xamount*c/(c*c),a=u%16==0?e.wrapy(t+(l*r.yamount*u>>16)):t+l*r.yamount*u/(u*u),s=e.point.get(n,a),d.data[i]=s[0],d.data[i+1]=s[1],d.data[i+2]=s[2],d.data[i+3]=s[3];for(var f=e.texture.size();f--;)e.texture.data[f]=d.data[f];return r}),e.function("rotate",{angle:90,times:1,type:1,blend:e.blendSafe},function(e,r){r.type=e.randByArraySeed(r.type),null===r.angle?r.angle=e.randItemByArraySeed(r.angle,[90,180,270]):r.angle=e.randByArraySeed(r.angle),r.times=e.randByArraySeed(r.times);for(var t,n,a,s,i,o,l=new e.buffer,d=e.texture.size(),c=e.texture.width,u=e.texture.height,h=r.angle*(Math.PI/180),p=1;p<=r.times;p++)d=e.texture.size(),h=p*r.angle*(Math.PI/180),(1===r.type?function(){for(t=0;t=this.width)&&(e=this.pattern(e,this.width)),(r<0||r>=this.height)&&(r=this.pattern(r,this.height)),r*this.width*this.components+e*this.components},this.set=function(e,r,t){var n=this.offset(e,r);this.data[n]=t[0],this.data[n+1]=t[1],this.data[n+2]=t[2],this.data[n+3]=t[3]},this.get=function(e,r){var t=this.offset(e,r);return[this.data[t],this.data[t+1],this.data[t+2],this.data[t+3]]},this.alpha=function(e){switch(e){case"sphere":for(;size;)m.texture.data[size]=.5,size-=4}},this.canvas=function(e){for(var r=this.size(),t=e.getContext("2d").getImageData(0,0,this.width,this.height).data;r--;)m.texture.data[r]=t[r]},null===this.data&&this.clear()},m.texture=new m.buffer,m.layerCopy=function(e){for(var r=[],t=this.layers[e],n=t.length;n--;)r[n]=t[n];return r};function d(e,r){var t,n={};for(t in e)n[t]=e[t];for(t in r)n[t]=r[t];return n}m.clone=function(e,r){for(var t in r)"object"==typeof r[t]&&null!==r[t]&&e[t]?this.clone(e[t],r[t]):e[t]=r[t]},m.minMaxNormalize=function(e,r){return{min:Math.min(e,r),max:Math.max(e,r)}},m.randInt=function(e,r,t){var n=m.minMaxNormalize(e,r);return e=n.min,r=n.max,(!0===t?(e=Math.round(e/2),r=Math.round(r/2),2):1)*(Math.floor(Math.random()*(r-e+1))+e)},m.randIntSeed=function(e,r,t){var n=m.minMaxNormalize(e,r);return e=n.min,r=n.max,mul=!0===t?(e=Math.round(e/2),r=Math.round(r/2),2):1,mul*(Math.floor(m.calc.randomseed()*(r-e+1))+e)},m.randReal=function(e,r){var t=m.minMaxNormalize(e,r);return e=t.min,r=t.max,Math.random()*(r-e)+e},m.randRealSeed=function(e,r){var t=m.minMaxNormalize(e,r);return e=t.min,r=t.max,m.calc.randomseed()*(r-e)+e},m.randByArray=function(e,r){return void 0===e||"object"!=typeof e||void 0===e[0]?(m.calc.seed++,e):e=void 0!==r?m.randReal(e[0],e[1]):m.randInt(e[0],e[1])},m.randByArraySeed=function(e,r,t){return null==e||"object"!=typeof e||void 0===e[0]?(m.calc.seed++,e):e=void 0!==r?m.randRealSeed(e[0],e[1]):m.randIntSeed(e[0],e[1],t)},m.randIntByArraySeed=function(e,r,t){return null!=e&&"random"!==e||(e=r),"object"!=typeof e?(m.calc.seed++,e):e=m.randIntSeed(e[0],e[1],t)},m.randRealByArraySeed=function(e,r){return null!=e&&"random"!==e||(e=r),"object"!=typeof e?(m.calc.seed++,e):e=m.randRealSeed(e[0],e[1])},m.randItemSeed=function(e){if("object"!=typeof e||void 0===e[0])return m.calc.seed++,e;var r=e.length;return e[m.randIntSeed(0,r-1)]},m.randItemByArraySeed=function(e,r){if(null!=e&&"random"!==e)return m.calc.seed++,e;var t=r.length;return r[m.randIntSeed(0,t-1)]},m.randProperty=function(e,r){if(null!=e&&"random"!==e)return m.calc.seed++,e;var t=Object.keys(r);return t[m.randByArraySeed([0,t.length-1])]},m.rgba=function(e,r){return"random"!==e&&null!=e||(e=[[0,255],[0,255],[0,255],255]),"randomalpha"===e&&(e=[[0,255],[0,255],[0,255],[128,255]]),void 0!==e[0]&&null!==e[0]||(e[0]=0),void 0!==e[1]&&null!==e[1]||(e[1]=0),void 0!==e[2]&&null!==e[2]||(e[2]=0),void 0!==e[3]&&null!==e[3]||(e[3]=1),e[0]=m.randByArraySeed(e[0]),e[1]=m.randByArraySeed(e[1]),e[2]=m.randByArraySeed(e[2]),e[3]=m.randByArraySeed(e[3]),e[3]%1!=0&&(e[3]=Math.round(255*e[3])),1==e[3]&&(e[3]=255),e};return m.findClosestIndex=function(e,r,t){for(var n=r;0<=n&&n<=e.length-1;n+=t)if(e[n])return n;return e.length-1},m.calc={seed:void 0,pi:3.1415927,luminance:function(e){return.21*e[0]+.72*e[1]+.07*e[2]},randomseed:function(e){void 0===this.seed&&(this.seed=m.randInt(1,Number.MAX_SAFE_INTEGER)),void 0!==e&&(this.seed=e);var r=1e4*Math.sin(this.seed++);return r-Math.floor(r)},normalize1:function(e){return m.calc.normalize(e,0,1)},normalize255:function(e){return m.calc.normalize(e,0,255)},normalize:function(e,r,t){return t=p.config.historyLast&&p.config.historyList.shift(),p.config.historyList.push(r),window.localStorage.setItem(p.config.historyName,JSON.stringify(p.config.historyList))}}},m.params=function(e){var r;return null==e&&(e=(r=new Date).getHours()+":"+r.getMinutes()+":"+r.getSeconds()+" l"+m.layers.length+" i"+l.length),{name:e,version:p.version,width:c,height:u,normalize:m.normalize,items:l}},m.render=function(e,r){this.debug=!0===e.debug,m.event("beforeRender",e);var t,n,a=0,s=0;if(null!=e.width&&(c=e.width),null!=e.height&&(u=e.height),null!=e.normalize?m.normalize=e.normalize:m.normalize="limitless",h(),m.texture=new m.buffer(e.background),1!=r&&m.clear(),e.preset&&e.preset.name){var i=e.preset.name;if("random"===e.preset.name&&(i=m.randItemByArraySeed(null,Object.keys(f.presets))),"object"==typeof e.preset.name&&(i=m.randItemByArraySeed(null,e.preset.name)),i){var o,l=JSON.parse(JSON.stringify(f.presets[i].items));if(e.preset.seed)for(o in l)l[o][2]&&(l[o][2].seed=e.preset.seed);for(o in e.items)l.push(e.items[o]);e.items=l}}for(var d in e.items)a=e.items[d][0],t=e.items[d][1],n=e.items[d][2]?e.items[d][2]:{},null===a&&(a="copy"===t?s+1:s),e.seed&&(n.seed=e.seed*d),"random"==t&&(t=m.randProperty(m.defaults)),"object"==typeof t&&(t=m.randItemSeed(t)),s!=a&&(null!=m.layers[a]?m.texture.data=m.layers[a]:m.texture.clear(),s=a),null!=m[t]?m[t](n):null!=p.effects[t]?m.do(t,n,a):console.warn("undefined effect: "+t),m.layers[a]=m.texture.export();return m.event("afterRender",m.params()),m.history.add(),this},m.event=function(e,r){for(var t in p.events[e]){var n=p.events[e][t];"function"==typeof n&&n(m,r)}},m.do=function(e,r,t){var n,a,s,i,o=r;return void 0===r?r=d({},p.defaults[e]):"object"==typeof r&&(r=d(p.defaults[e],r)),r.seed=void 0!==r.seed&&null!==r.seed?r.seed:[1,Number.MAX_SAFE_INTEGER],r.seed=m.randByArray(r.seed),m.calc.randomseed(r.seed),(n=r).count=m.randByArraySeed(n.count),n.level=m.randByArraySeed(n.level),n.opacity=m.randByArraySeed(n.opacity),void 0!==n.blend?(n.blend=m.randProperty(n.blend,p.blends),n.blend=m.randItemSeed(n.blend),m.point.blend=n.blend):m.point.blend="",n.rgba=m.rgba(n.rgb?n.rgb:n.rgba),n.rgba&&(m.point.rgba=[n.rgba[0],n.rgba[1],n.rgba[2],n.rgba[3]]),Object.keys(n).forEach(function(e){void 0===n[e]&&delete n[e]}),r=n,m.event("beforeEffect",{layer:t,name:e,params:r}),"function"==typeof p.effects[e]?r=p.effects[e](m,r):console.warn("effect not callable: "+e),void 0===r&&(r=o),m.event("afterEffect",{layer:t,name:e,params:r}),r&&!1!==r.store&&(a=t,s=e,i=r,l.push([a,s,i])),m},m}}(SeamlessTextureGenerator),function(e){e.shape("rect",function(e,r,t,n,a,s){void 0!==s&&(r-=parseInt(n/2,10),t-=parseInt(a/2,10));for(var i=0;ins^9}K8HYwVwqj* zRWMMRm0mAt2$KGenvedDy0QK?dz8U35se6BhXrX+0_aV%5~rK*TV!Gg_|sp@9kibC zgqWL#&JOrt6CF~VwC0@YRivX9gSN_Z3JN1|!Q_i*d1Go`de*EN!CQuZkzkS?2DR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anq_%!gQ#csSQ&#mV`W8SbmoAxxMc`dauvtGs+5l#0!a_Kj~ zs({=m6<)okf6p7Weby@cKz_6S@DlpI#MXUVRi9N2@Z(~lDvER*7;U)X&}$>(`IQ`y zJ>R2%SNLzU?ilZ7qJy)|FZ?-VOjz}A%hHYZv@h$FOB26>Fp~2>HelV;P&7I;j3kh5{=s0WiCkewyWNgh&;LJT_95p80s#PquAk5V diff --git a/dist/tgen.js b/dist/tgen.js index 6d2dd68..5c56f42 100644 --- a/dist/tgen.js +++ b/dist/tgen.js @@ -11,7 +11,7 @@ var SeamlessTextureGenerator = (function() { return { - version: '1.3.3', + version: '1.3.4', defaults: {}, effects: {}, filters: [], @@ -3449,7 +3449,9 @@ if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') { if (config.preset.seed) { for (key in items) { - items[key][2].seed = config.preset.seed; + if (items[key][2]) { + items[key][2].seed = config.preset.seed; + } } } diff --git a/dist/tgen.min.js b/dist/tgen.min.js index 84be118..3ee8dc1 100644 --- a/dist/tgen.min.js +++ b/dist/tgen.min.js @@ -1,8 +1,8 @@ /** * seamless-texture-generator - Seamless texture generator * - * @version v1.3.3 + * @version v1.3.4 * @link https://github.com/schalkt/tgen/ * @license MIT */ -var SeamlessTextureGenerator={version:"1.3.3",defaults:{},effects:{},filters:[],presets:{},functions:[],blends:{},shapes:{},colormaps:{},events:{beforeEffect:{},afterEffect:{},beforeRender:{},afterRender:{}},config:{historyLast:0,historyName:"history",historyList:[]},blendSafe:["average","lighten","linearburn","linearlight","difference","difference-invert","screen","lineardodge","lineardodge-invert","opacity","exclusion"],blendFlat:["lighten","screen","opacity"],effect:function(e,t,r){this.defaults[e]=t,this.effects[e]=r},function:function(e,t,r){this.functions.push(e),this.defaults[e]=t,this.effects[e]=r},filter:function(e,t,r){this.filters.push(e),this.defaults[e]=t,this.effects[e]=r},preset:function(e,t){t.name=e,this.presets[e]=t},event:function(e,t,r){null!=this.events[e]&&(this.events[e][t]=r)},blend:function(e,t){this.blends[e]=t},shape:function(e,t){this.shapes[e]=t},colormap:function(e,t){this.colormaps[e]=t},init:function(e,t,r){return this.getGenerator(e,t,r)}};"undefined"!=typeof module&&void 0!==module.exports?module.exports=SeamlessTextureGenerator:"function"==typeof define&&define.amd?define([],function(){return SeamlessTextureGenerator}):window.tgen=SeamlessTextureGenerator,SeamlessTextureGenerator.effect("checkerboard",{blend:SeamlessTextureGenerator.blendFlat,rgba:"randomalpha",even:"random",size:[[2,32],[2,32]]},function(a,e){e.even=a.randItemByArraySeed(e.even,[!0,!1]);var t,r,i=a.texture.width,o=a.texture.height;"number"==typeof e.size?t=r=e.size:(t=e.size[0]=a.randByArraySeed(e.size[0],null,!0),r=e.size[1]=a.randByArraySeed(e.size[1],null,!0));function n(e,t){for(var r=0;rt.skip&&(e.point.rgba=[v%l*d,v%c*f,v%u*h,e.point.rgba[3]],e.point.set(b,y))}}return t}),SeamlessTextureGenerator.effect("lines",{blend:SeamlessTextureGenerator.blendFlat,rgba:"randomalpha",size:[77,221],count:[21,512],freq1s:[4,221],freq1c:[4,221],freq2s:[4,221],freq2c:[4,221]},function(e,t){t.freq1s=e.randByArraySeed(t.freq1s,!0),t.freq1c=e.randByArraySeed(t.freq1c,!0),t.freq2s=e.randByArraySeed(t.freq2s,!0),t.freq2c=e.randByArraySeed(t.freq2c,!0),t.size=e.randByArraySeed(t.size);for(var r=0;rt[0]?r[0]:t[0],r[1]=r[1]>t[1]?r[1]:t[1],r[2]=r[2]>t[2]?r[2]:t[2],r}),e.blend("lineardodge",function(e,t,r){return r[0]=t[0]+r[0],r[1]=t[1]+r[1],r[2]=t[2]+r[2],r}),e.blend("lineardodge-invert",function(e,t,r){return r[0]=255-(r[0]+t[0]),r[1]=255-(r[1]+t[1]),r[2]=255-(r[2]+t[2]),r}),e.blend("linearlight",function(e,t,r){return r[0]=t[0]+2*r[0]-255,r[1]=t[1]+2*r[1]-255,r[2]=t[2]+2*r[2]-255,r}),e.blend("linearburn",function(e,t,r){return r[0]=t[0]+r[0]-255,r[1]=t[1]+r[1]-255,r[2]=t[2]+r[2]-255,r}),e.blend("softlight",function(e,t,r){return r[0]=128>16)):p+s*t.xamount*u/(u*u),a=d%16==0?e.wrapy(r+(l*t.yamount*d>>16)):r+l*t.yamount*d/(d*d),i=e.point.get(n,a),c.data[o]=i[0],c.data[o+1]=i[1],c.data[o+2]=i[2],c.data[o+3]=i[3];for(var m=e.texture.size();m--;)e.texture.data[m]=c.data[m];return t}),e.function("rotate",{angle:90,times:1,type:1,blend:e.blendSafe},function(e,t){t.type=e.randByArraySeed(t.type),null===t.angle?t.angle=e.randItemByArraySeed(t.angle,[90,180,270]):t.angle=e.randByArraySeed(t.angle),t.times=e.randByArraySeed(t.times);for(var r,n,a,i,o,s,l=new e.buffer,c=e.texture.size(),u=e.texture.width,d=e.texture.height,f=t.angle*(Math.PI/180),h=1;h<=t.times;h++)c=e.texture.size(),f=h*t.angle*(Math.PI/180),(1===t.type?function(){for(r=0;r=this.width)&&(e=this.pattern(e,this.width)),(t<0||t>=this.height)&&(t=this.pattern(t,this.height)),t*this.width*this.components+e*this.components},this.set=function(e,t,r){var n=this.offset(e,t);this.data[n]=r[0],this.data[n+1]=r[1],this.data[n+2]=r[2],this.data[n+3]=r[3]},this.get=function(e,t){var r=this.offset(e,t);return[this.data[r],this.data[r+1],this.data[r+2],this.data[r+3]]},this.alpha=function(e){switch(e){case"sphere":for(;size;)p.texture.data[size]=.5,size-=4}},this.canvas=function(e){for(var t=this.size(),r=e.getContext("2d").getImageData(0,0,this.width,this.height).data;t--;)p.texture.data[t]=r[t]},null===this.data&&this.clear()},p.texture=new p.buffer,p.layerCopy=function(e){for(var t=[],r=this.layers[e],n=r.length;n--;)t[n]=r[n];return t};function c(e,t){var r,n={};for(r in e)n[r]=e[r];for(r in t)n[r]=t[r];return n}p.clone=function(e,t){for(var r in t)"object"==typeof t[r]&&null!==t[r]&&e[r]?this.clone(e[r],t[r]):e[r]=t[r]},p.minMaxNormalize=function(e,t){return{min:Math.min(e,t),max:Math.max(e,t)}},p.randInt=function(e,t,r){var n=p.minMaxNormalize(e,t);return e=n.min,t=n.max,(!0===r?(e=Math.round(e/2),t=Math.round(t/2),2):1)*(Math.floor(Math.random()*(t-e+1))+e)},p.randIntSeed=function(e,t,r){var n=p.minMaxNormalize(e,t);return e=n.min,t=n.max,mul=!0===r?(e=Math.round(e/2),t=Math.round(t/2),2):1,mul*(Math.floor(p.calc.randomseed()*(t-e+1))+e)},p.randReal=function(e,t){var r=p.minMaxNormalize(e,t);return e=r.min,t=r.max,Math.random()*(t-e)+e},p.randRealSeed=function(e,t){var r=p.minMaxNormalize(e,t);return e=r.min,t=r.max,p.calc.randomseed()*(t-e)+e},p.randByArray=function(e,t){return void 0===e||"object"!=typeof e||void 0===e[0]?(p.calc.seed++,e):e=void 0!==t?p.randReal(e[0],e[1]):p.randInt(e[0],e[1])},p.randByArraySeed=function(e,t,r){return null==e||"object"!=typeof e||void 0===e[0]?(p.calc.seed++,e):e=void 0!==t?p.randRealSeed(e[0],e[1]):p.randIntSeed(e[0],e[1],r)},p.randIntByArraySeed=function(e,t,r){return null!=e&&"random"!==e||(e=t),"object"!=typeof e?(p.calc.seed++,e):e=p.randIntSeed(e[0],e[1],r)},p.randRealByArraySeed=function(e,t){return null!=e&&"random"!==e||(e=t),"object"!=typeof e?(p.calc.seed++,e):e=p.randRealSeed(e[0],e[1])},p.randItemSeed=function(e){if("object"!=typeof e||void 0===e[0])return p.calc.seed++,e;var t=e.length;return e[p.randIntSeed(0,t-1)]},p.randItemByArraySeed=function(e,t){if(null!=e&&"random"!==e)return p.calc.seed++,e;var r=t.length;return t[p.randIntSeed(0,r-1)]},p.randProperty=function(e,t){if(null!=e&&"random"!==e)return p.calc.seed++,e;var r=Object.keys(t);return r[p.randByArraySeed([0,r.length-1])]},p.rgba=function(e,t){return"random"!==e&&null!=e||(e=[[0,255],[0,255],[0,255],255]),"randomalpha"===e&&(e=[[0,255],[0,255],[0,255],[128,255]]),void 0!==e[0]&&null!==e[0]||(e[0]=0),void 0!==e[1]&&null!==e[1]||(e[1]=0),void 0!==e[2]&&null!==e[2]||(e[2]=0),void 0!==e[3]&&null!==e[3]||(e[3]=1),e[0]=p.randByArraySeed(e[0]),e[1]=p.randByArraySeed(e[1]),e[2]=p.randByArraySeed(e[2]),e[3]=p.randByArraySeed(e[3]),e[3]%1!=0&&(e[3]=Math.round(255*e[3])),1==e[3]&&(e[3]=255),e};return p.findClosestIndex=function(e,t,r){for(var n=t;0<=n&&n<=e.length-1;n+=r)if(e[n])return n;return e.length-1},p.calc={seed:void 0,pi:3.1415927,luminance:function(e){return.21*e[0]+.72*e[1]+.07*e[2]},randomseed:function(e){void 0===this.seed&&(this.seed=p.randInt(1,Number.MAX_SAFE_INTEGER)),void 0!==e&&(this.seed=e);var t=1e4*Math.sin(this.seed++);return t-Math.floor(t)},normalize1:function(e){return p.calc.normalize(e,0,1)},normalize255:function(e){return p.calc.normalize(e,0,255)},normalize:function(e,t,r){return r=h.config.historyLast&&h.config.historyList.shift(),h.config.historyList.push(t),window.localStorage.setItem(h.config.historyName,JSON.stringify(h.config.historyList))}}},p.params=function(e){var t;return null==e&&(e=(t=new Date).getHours()+":"+t.getMinutes()+":"+t.getSeconds()+" l"+p.layers.length+" i"+l.length),{name:e,version:h.version,width:u,height:d,normalize:p.normalize,items:l}},p.render=function(e,t){this.debug=!0===e.debug,p.event("beforeRender",e);var r,n,a=0,i=0;if(null!=e.width&&(u=e.width),null!=e.height&&(d=e.height),null!=e.normalize?p.normalize=e.normalize:p.normalize="limitless",f(),p.texture=new p.buffer(e.background),1!=t&&p.clear(),e.preset&&e.preset.name){var o=e.preset.name;if("random"===e.preset.name&&(o=p.randItemByArraySeed(null,Object.keys(m.presets))),"object"==typeof e.preset.name&&(o=p.randItemByArraySeed(null,e.preset.name)),o){var s,l=JSON.parse(JSON.stringify(m.presets[o].items));if(e.preset.seed)for(s in l)l[s][2].seed=e.preset.seed;for(s in e.items)l.push(e.items[s]);e.items=l}}for(var c in e.items)a=e.items[c][0],r=e.items[c][1],n=e.items[c][2]?e.items[c][2]:{},null===a&&(a="copy"===r?i+1:i),e.seed&&(n.seed=e.seed*c),"random"==r&&(r=p.randProperty(p.defaults)),"object"==typeof r&&(r=p.randItemSeed(r)),i!=a&&(null!=p.layers[a]?p.texture.data=p.layers[a]:p.texture.clear(),i=a),null!=p[r]?p[r](n):null!=h.effects[r]?p.do(r,n,a):console.warn("undefined effect: "+r),p.layers[a]=p.texture.export();return p.event("afterRender",p.params()),p.history.add(),this},p.event=function(e,t){for(var r in h.events[e]){var n=h.events[e][r];"function"==typeof n&&n(p,t)}},p.do=function(e,t,r){var n,a,i,o,s=t;return void 0===t?t=c({},h.defaults[e]):"object"==typeof t&&(t=c(h.defaults[e],t)),t.seed=void 0!==t.seed&&null!==t.seed?t.seed:[1,Number.MAX_SAFE_INTEGER],t.seed=p.randByArray(t.seed),p.calc.randomseed(t.seed),(n=t).count=p.randByArraySeed(n.count),n.level=p.randByArraySeed(n.level),n.opacity=p.randByArraySeed(n.opacity),void 0!==n.blend?(n.blend=p.randProperty(n.blend,h.blends),n.blend=p.randItemSeed(n.blend),p.point.blend=n.blend):p.point.blend="",n.rgba=p.rgba(n.rgb?n.rgb:n.rgba),n.rgba&&(p.point.rgba=[n.rgba[0],n.rgba[1],n.rgba[2],n.rgba[3]]),Object.keys(n).forEach(function(e){void 0===n[e]&&delete n[e]}),t=n,p.event("beforeEffect",{layer:r,name:e,params:t}),"function"==typeof h.effects[e]?t=h.effects[e](p,t):console.warn("effect not callable: "+e),void 0===t&&(t=s),p.event("afterEffect",{layer:r,name:e,params:t}),t&&!1!==t.store&&(a=r,i=e,o=t,l.push([a,i,o])),p},p}}(SeamlessTextureGenerator),function(e){e.shape("rect",function(e,t,r,n,a,i){void 0!==i&&(t-=parseInt(n/2,10),r-=parseInt(a/2,10));for(var o=0;ot.skip&&(e.point.rgba=[v%l*d,v%c*f,v%u*h,e.point.rgba[3]],e.point.set(b,y))}}return t}),SeamlessTextureGenerator.effect("lines",{blend:SeamlessTextureGenerator.blendFlat,rgba:"randomalpha",size:[77,221],count:[21,512],freq1s:[4,221],freq1c:[4,221],freq2s:[4,221],freq2c:[4,221]},function(e,t){t.freq1s=e.randByArraySeed(t.freq1s,!0),t.freq1c=e.randByArraySeed(t.freq1c,!0),t.freq2s=e.randByArraySeed(t.freq2s,!0),t.freq2c=e.randByArraySeed(t.freq2c,!0),t.size=e.randByArraySeed(t.size);for(var r=0;rt[0]?r[0]:t[0],r[1]=r[1]>t[1]?r[1]:t[1],r[2]=r[2]>t[2]?r[2]:t[2],r}),e.blend("lineardodge",function(e,t,r){return r[0]=t[0]+r[0],r[1]=t[1]+r[1],r[2]=t[2]+r[2],r}),e.blend("lineardodge-invert",function(e,t,r){return r[0]=255-(r[0]+t[0]),r[1]=255-(r[1]+t[1]),r[2]=255-(r[2]+t[2]),r}),e.blend("linearlight",function(e,t,r){return r[0]=t[0]+2*r[0]-255,r[1]=t[1]+2*r[1]-255,r[2]=t[2]+2*r[2]-255,r}),e.blend("linearburn",function(e,t,r){return r[0]=t[0]+r[0]-255,r[1]=t[1]+r[1]-255,r[2]=t[2]+r[2]-255,r}),e.blend("softlight",function(e,t,r){return r[0]=128>16)):p+s*t.xamount*u/(u*u),a=d%16==0?e.wrapy(r+(l*t.yamount*d>>16)):r+l*t.yamount*d/(d*d),i=e.point.get(n,a),c.data[o]=i[0],c.data[o+1]=i[1],c.data[o+2]=i[2],c.data[o+3]=i[3];for(var m=e.texture.size();m--;)e.texture.data[m]=c.data[m];return t}),e.function("rotate",{angle:90,times:1,type:1,blend:e.blendSafe},function(e,t){t.type=e.randByArraySeed(t.type),null===t.angle?t.angle=e.randItemByArraySeed(t.angle,[90,180,270]):t.angle=e.randByArraySeed(t.angle),t.times=e.randByArraySeed(t.times);for(var r,n,a,i,o,s,l=new e.buffer,c=e.texture.size(),u=e.texture.width,d=e.texture.height,f=t.angle*(Math.PI/180),h=1;h<=t.times;h++)c=e.texture.size(),f=h*t.angle*(Math.PI/180),(1===t.type?function(){for(r=0;r=this.width)&&(e=this.pattern(e,this.width)),(t<0||t>=this.height)&&(t=this.pattern(t,this.height)),t*this.width*this.components+e*this.components},this.set=function(e,t,r){var n=this.offset(e,t);this.data[n]=r[0],this.data[n+1]=r[1],this.data[n+2]=r[2],this.data[n+3]=r[3]},this.get=function(e,t){var r=this.offset(e,t);return[this.data[r],this.data[r+1],this.data[r+2],this.data[r+3]]},this.alpha=function(e){switch(e){case"sphere":for(;size;)p.texture.data[size]=.5,size-=4}},this.canvas=function(e){for(var t=this.size(),r=e.getContext("2d").getImageData(0,0,this.width,this.height).data;t--;)p.texture.data[t]=r[t]},null===this.data&&this.clear()},p.texture=new p.buffer,p.layerCopy=function(e){for(var t=[],r=this.layers[e],n=r.length;n--;)t[n]=r[n];return t};function c(e,t){var r,n={};for(r in e)n[r]=e[r];for(r in t)n[r]=t[r];return n}p.clone=function(e,t){for(var r in t)"object"==typeof t[r]&&null!==t[r]&&e[r]?this.clone(e[r],t[r]):e[r]=t[r]},p.minMaxNormalize=function(e,t){return{min:Math.min(e,t),max:Math.max(e,t)}},p.randInt=function(e,t,r){var n=p.minMaxNormalize(e,t);return e=n.min,t=n.max,(!0===r?(e=Math.round(e/2),t=Math.round(t/2),2):1)*(Math.floor(Math.random()*(t-e+1))+e)},p.randIntSeed=function(e,t,r){var n=p.minMaxNormalize(e,t);return e=n.min,t=n.max,mul=!0===r?(e=Math.round(e/2),t=Math.round(t/2),2):1,mul*(Math.floor(p.calc.randomseed()*(t-e+1))+e)},p.randReal=function(e,t){var r=p.minMaxNormalize(e,t);return e=r.min,t=r.max,Math.random()*(t-e)+e},p.randRealSeed=function(e,t){var r=p.minMaxNormalize(e,t);return e=r.min,t=r.max,p.calc.randomseed()*(t-e)+e},p.randByArray=function(e,t){return void 0===e||"object"!=typeof e||void 0===e[0]?(p.calc.seed++,e):e=void 0!==t?p.randReal(e[0],e[1]):p.randInt(e[0],e[1])},p.randByArraySeed=function(e,t,r){return null==e||"object"!=typeof e||void 0===e[0]?(p.calc.seed++,e):e=void 0!==t?p.randRealSeed(e[0],e[1]):p.randIntSeed(e[0],e[1],r)},p.randIntByArraySeed=function(e,t,r){return null!=e&&"random"!==e||(e=t),"object"!=typeof e?(p.calc.seed++,e):e=p.randIntSeed(e[0],e[1],r)},p.randRealByArraySeed=function(e,t){return null!=e&&"random"!==e||(e=t),"object"!=typeof e?(p.calc.seed++,e):e=p.randRealSeed(e[0],e[1])},p.randItemSeed=function(e){if("object"!=typeof e||void 0===e[0])return p.calc.seed++,e;var t=e.length;return e[p.randIntSeed(0,t-1)]},p.randItemByArraySeed=function(e,t){if(null!=e&&"random"!==e)return p.calc.seed++,e;var r=t.length;return t[p.randIntSeed(0,r-1)]},p.randProperty=function(e,t){if(null!=e&&"random"!==e)return p.calc.seed++,e;var r=Object.keys(t);return r[p.randByArraySeed([0,r.length-1])]},p.rgba=function(e,t){return"random"!==e&&null!=e||(e=[[0,255],[0,255],[0,255],255]),"randomalpha"===e&&(e=[[0,255],[0,255],[0,255],[128,255]]),void 0!==e[0]&&null!==e[0]||(e[0]=0),void 0!==e[1]&&null!==e[1]||(e[1]=0),void 0!==e[2]&&null!==e[2]||(e[2]=0),void 0!==e[3]&&null!==e[3]||(e[3]=1),e[0]=p.randByArraySeed(e[0]),e[1]=p.randByArraySeed(e[1]),e[2]=p.randByArraySeed(e[2]),e[3]=p.randByArraySeed(e[3]),e[3]%1!=0&&(e[3]=Math.round(255*e[3])),1==e[3]&&(e[3]=255),e};return p.findClosestIndex=function(e,t,r){for(var n=t;0<=n&&n<=e.length-1;n+=r)if(e[n])return n;return e.length-1},p.calc={seed:void 0,pi:3.1415927,luminance:function(e){return.21*e[0]+.72*e[1]+.07*e[2]},randomseed:function(e){void 0===this.seed&&(this.seed=p.randInt(1,Number.MAX_SAFE_INTEGER)),void 0!==e&&(this.seed=e);var t=1e4*Math.sin(this.seed++);return t-Math.floor(t)},normalize1:function(e){return p.calc.normalize(e,0,1)},normalize255:function(e){return p.calc.normalize(e,0,255)},normalize:function(e,t,r){return r=h.config.historyLast&&h.config.historyList.shift(),h.config.historyList.push(t),window.localStorage.setItem(h.config.historyName,JSON.stringify(h.config.historyList))}}},p.params=function(e){var t;return null==e&&(e=(t=new Date).getHours()+":"+t.getMinutes()+":"+t.getSeconds()+" l"+p.layers.length+" i"+l.length),{name:e,version:h.version,width:u,height:d,normalize:p.normalize,items:l}},p.render=function(e,t){this.debug=!0===e.debug,p.event("beforeRender",e);var r,n,a=0,i=0;if(null!=e.width&&(u=e.width),null!=e.height&&(d=e.height),null!=e.normalize?p.normalize=e.normalize:p.normalize="limitless",f(),p.texture=new p.buffer(e.background),1!=t&&p.clear(),e.preset&&e.preset.name){var o=e.preset.name;if("random"===e.preset.name&&(o=p.randItemByArraySeed(null,Object.keys(m.presets))),"object"==typeof e.preset.name&&(o=p.randItemByArraySeed(null,e.preset.name)),o){var s,l=JSON.parse(JSON.stringify(m.presets[o].items));if(e.preset.seed)for(s in l)l[s][2]&&(l[s][2].seed=e.preset.seed);for(s in e.items)l.push(e.items[s]);e.items=l}}for(var c in e.items)a=e.items[c][0],r=e.items[c][1],n=e.items[c][2]?e.items[c][2]:{},null===a&&(a="copy"===r?i+1:i),e.seed&&(n.seed=e.seed*c),"random"==r&&(r=p.randProperty(p.defaults)),"object"==typeof r&&(r=p.randItemSeed(r)),i!=a&&(null!=p.layers[a]?p.texture.data=p.layers[a]:p.texture.clear(),i=a),null!=p[r]?p[r](n):null!=h.effects[r]?p.do(r,n,a):console.warn("undefined effect: "+r),p.layers[a]=p.texture.export();return p.event("afterRender",p.params()),p.history.add(),this},p.event=function(e,t){for(var r in h.events[e]){var n=h.events[e][r];"function"==typeof n&&n(p,t)}},p.do=function(e,t,r){var n,a,i,o,s=t;return void 0===t?t=c({},h.defaults[e]):"object"==typeof t&&(t=c(h.defaults[e],t)),t.seed=void 0!==t.seed&&null!==t.seed?t.seed:[1,Number.MAX_SAFE_INTEGER],t.seed=p.randByArray(t.seed),p.calc.randomseed(t.seed),(n=t).count=p.randByArraySeed(n.count),n.level=p.randByArraySeed(n.level),n.opacity=p.randByArraySeed(n.opacity),void 0!==n.blend?(n.blend=p.randProperty(n.blend,h.blends),n.blend=p.randItemSeed(n.blend),p.point.blend=n.blend):p.point.blend="",n.rgba=p.rgba(n.rgb?n.rgb:n.rgba),n.rgba&&(p.point.rgba=[n.rgba[0],n.rgba[1],n.rgba[2],n.rgba[3]]),Object.keys(n).forEach(function(e){void 0===n[e]&&delete n[e]}),t=n,p.event("beforeEffect",{layer:r,name:e,params:t}),"function"==typeof h.effects[e]?t=h.effects[e](p,t):console.warn("effect not callable: "+e),void 0===t&&(t=s),p.event("afterEffect",{layer:r,name:e,params:t}),t&&!1!==t.store&&(a=r,i=e,o=t,l.push([a,i,o])),p},p}}(SeamlessTextureGenerator),function(e){e.shape("rect",function(e,t,r,n,a,i){void 0!==i&&(t-=parseInt(n/2,10),r-=parseInt(a/2,10));for(var o=0;oC)IkFWS{Fv4Y^Dt3c;pjwyQ%4Ab)Waj$Iz!ryO zoz{ThfIqIYBY*b5K(^rTvIKCoaMJmzL@U`bbJhGFXEiJR=NhUzRvozHtGH$qB>NFV zO4DiG$#s{G565cfai5);D-lRfo`QJZn4_RGCr8L{oI?-CTqKaBNLfhwYGIHcv+P|g z@+SfW=*vsb4OrGtq%Y~CStLRV;+6#weRn|#!k18r_J6wo^|+9*X`Z$*FFB0W{DKnP z^I8vD8UOOK7#v|#Y=OWw1E}KDffw70eX%)a{POalNH-VLcX2EN#{BV6ly!CMe#U*A zVLnjk3}ThFDC_c4Jjcm?b1Pmw82%c2jd)+yFaG>Xns16PV`N&r7_hzwNhjW5z2oc8 zyu2%5e18qtv*^6uRC;u=^8PNF56T2^*eBUxmkfw@RM3D`>3;%;SVn9Xt(bVM%)s#y z#{Fkb)DtITO!R%t_y79zo3c!ve&T%NiAc75H)Zd_mA^n94CS&E;3eB1e@Qp>julqO zj^m(T4D#dtj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Zh1bnZ#X7+?!xUTrRTW4kM--7aJ1JzZ3=yspGa3!|tC3RVWv3xULJ zotEpY<;sY-tXxDR#nl0HeF^_;7we;3U%+Irv6Lu3Xus?EFdwDEl(uk21>U6Bfm_y-`sNNR;uGmI zTS4W+#rh`xKz`}%Iu@fftAe#tPiaNmSxHL<6Nlh`h%UMa25Jw4as)y->I?Zs-rAt+ zk_jDyCJNu&tm%@z>5W%8*Ag*HdyekUBJHLZGuaF`0cJA6@#71RXg+O<7U(=}Sj|(~ zZ*h1io{b(>3{OPUBf>}KdIYG0Bh+Z)J8dMdz3poxChr6>Ck0!hd)FG=)Re%IQqhiE zY{wmwv?&%}Ja--^x$g(<@XaKFwt)iHadn%`i*}O~(i7`2V}Om26k?6#A{mo z2274_Z<dZv6wBIgJ%ag*#S z7<(#mnNTLnb#eNXrAUUZb-J$!d{NOI{=ugvwtcHuG<{LNh8!LzJPmd7w*~K3`z+)& zsSNtb%A~ Date: Thu, 14 Jan 2021 07:48:18 +0100 Subject: [PATCH 3/3] Fixed copy (layer id) --- dist/tgen-with-presets.js | 4 +-- dist/tgen-with-presets.min.js | 4 +-- dist/tgen-with-presets.min.js.gz | Bin 14310 -> 14312 bytes dist/tgen.js | 4 +-- dist/tgen.min.js | 4 +-- dist/tgen.min.js.gz | Bin 11135 -> 11138 bytes package.json | 2 +- src/tgen-base.js | 2 +- src/tgen-generator.js | 2 +- test/test.js | 46 +++++++++++++++++++++++++++++++ 10 files changed, 57 insertions(+), 11 deletions(-) diff --git a/dist/tgen-with-presets.js b/dist/tgen-with-presets.js index 9dc3580..31b0ed0 100644 --- a/dist/tgen-with-presets.js +++ b/dist/tgen-with-presets.js @@ -11,7 +11,7 @@ var SeamlessTextureGenerator = (function() { return { - version: '1.3.4', + version: '1.3.5', defaults: {}, effects: {}, filters: [], @@ -6075,7 +6075,7 @@ if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') { layerId = config.items[index][0]; effect = config.items[index][1]; - values = config.items[index][2] ? config.items[index][2] : {}; + values = config.items[index][2] !== undefined ? config.items[index][2] : {}; if (layerId === null) { layerId = effect === 'copy' ? currentId + 1 : currentId; diff --git a/dist/tgen-with-presets.min.js b/dist/tgen-with-presets.min.js index 6b2ddfd..f09f9e4 100644 --- a/dist/tgen-with-presets.min.js +++ b/dist/tgen-with-presets.min.js @@ -1,8 +1,8 @@ /** * seamless-texture-generator - Seamless texture generator * - * @version v1.3.4 + * @version v1.3.5 * @link https://github.com/schalkt/tgen/ * @license MIT */ -var SeamlessTextureGenerator={version:"1.3.4",defaults:{},effects:{},filters:[],presets:{},functions:[],blends:{},shapes:{},colormaps:{},events:{beforeEffect:{},afterEffect:{},beforeRender:{},afterRender:{}},config:{historyLast:0,historyName:"history",historyList:[]},blendSafe:["average","lighten","linearburn","linearlight","difference","difference-invert","screen","lineardodge","lineardodge-invert","opacity","exclusion"],blendFlat:["lighten","screen","opacity"],effect:function(e,r,t){this.defaults[e]=r,this.effects[e]=t},function:function(e,r,t){this.functions.push(e),this.defaults[e]=r,this.effects[e]=t},filter:function(e,r,t){this.filters.push(e),this.defaults[e]=r,this.effects[e]=t},preset:function(e,r){r.name=e,this.presets[e]=r},event:function(e,r,t){null!=this.events[e]&&(this.events[e][r]=t)},blend:function(e,r){this.blends[e]=r},shape:function(e,r){this.shapes[e]=r},colormap:function(e,r){this.colormaps[e]=r},init:function(e,r,t){return this.getGenerator(e,r,t)}};"undefined"!=typeof module&&void 0!==module.exports?module.exports=SeamlessTextureGenerator:"function"==typeof define&&define.amd?define([],function(){return SeamlessTextureGenerator}):window.tgen=SeamlessTextureGenerator,SeamlessTextureGenerator.effect("checkerboard",{blend:SeamlessTextureGenerator.blendFlat,rgba:"randomalpha",even:"random",size:[[2,32],[2,32]]},function(a,e){e.even=a.randItemByArraySeed(e.even,[!0,!1]);var r,t,s=a.texture.width,i=a.texture.height;"number"==typeof e.size?r=t=e.size:(r=e.size[0]=a.randByArraySeed(e.size[0],null,!0),t=e.size[1]=a.randByArraySeed(e.size[1],null,!0));function n(e,r){for(var t=0;tr.skip&&(e.point.rgba=[x%l*u,x%d*h,x%c*p,e.point.rgba[3]],e.point.set(y,g))}}return r}),SeamlessTextureGenerator.effect("lines",{blend:SeamlessTextureGenerator.blendFlat,rgba:"randomalpha",size:[77,221],count:[21,512],freq1s:[4,221],freq1c:[4,221],freq2s:[4,221],freq2c:[4,221]},function(e,r){r.freq1s=e.randByArraySeed(r.freq1s,!0),r.freq1c=e.randByArraySeed(r.freq1c,!0),r.freq2s=e.randByArraySeed(r.freq2s,!0),r.freq2c=e.randByArraySeed(r.freq2c,!0),r.size=e.randByArraySeed(r.size);for(var t=0;tr[0]?t[0]:r[0],t[1]=t[1]>r[1]?t[1]:r[1],t[2]=t[2]>r[2]?t[2]:r[2],t}),e.blend("lineardodge",function(e,r,t){return t[0]=r[0]+t[0],t[1]=r[1]+t[1],t[2]=r[2]+t[2],t}),e.blend("lineardodge-invert",function(e,r,t){return t[0]=255-(t[0]+r[0]),t[1]=255-(t[1]+r[1]),t[2]=255-(t[2]+r[2]),t}),e.blend("linearlight",function(e,r,t){return t[0]=r[0]+2*t[0]-255,t[1]=r[1]+2*t[1]-255,t[2]=r[2]+2*t[2]-255,t}),e.blend("linearburn",function(e,r,t){return t[0]=r[0]+t[0]-255,t[1]=r[1]+t[1]-255,t[2]=r[2]+t[2]-255,t}),e.blend("softlight",function(e,r,t){return t[0]=128>16)):m+o*r.xamount*c/(c*c),a=u%16==0?e.wrapy(t+(l*r.yamount*u>>16)):t+l*r.yamount*u/(u*u),s=e.point.get(n,a),d.data[i]=s[0],d.data[i+1]=s[1],d.data[i+2]=s[2],d.data[i+3]=s[3];for(var f=e.texture.size();f--;)e.texture.data[f]=d.data[f];return r}),e.function("rotate",{angle:90,times:1,type:1,blend:e.blendSafe},function(e,r){r.type=e.randByArraySeed(r.type),null===r.angle?r.angle=e.randItemByArraySeed(r.angle,[90,180,270]):r.angle=e.randByArraySeed(r.angle),r.times=e.randByArraySeed(r.times);for(var t,n,a,s,i,o,l=new e.buffer,d=e.texture.size(),c=e.texture.width,u=e.texture.height,h=r.angle*(Math.PI/180),p=1;p<=r.times;p++)d=e.texture.size(),h=p*r.angle*(Math.PI/180),(1===r.type?function(){for(t=0;t=this.width)&&(e=this.pattern(e,this.width)),(r<0||r>=this.height)&&(r=this.pattern(r,this.height)),r*this.width*this.components+e*this.components},this.set=function(e,r,t){var n=this.offset(e,r);this.data[n]=t[0],this.data[n+1]=t[1],this.data[n+2]=t[2],this.data[n+3]=t[3]},this.get=function(e,r){var t=this.offset(e,r);return[this.data[t],this.data[t+1],this.data[t+2],this.data[t+3]]},this.alpha=function(e){switch(e){case"sphere":for(;size;)m.texture.data[size]=.5,size-=4}},this.canvas=function(e){for(var r=this.size(),t=e.getContext("2d").getImageData(0,0,this.width,this.height).data;r--;)m.texture.data[r]=t[r]},null===this.data&&this.clear()},m.texture=new m.buffer,m.layerCopy=function(e){for(var r=[],t=this.layers[e],n=t.length;n--;)r[n]=t[n];return r};function d(e,r){var t,n={};for(t in e)n[t]=e[t];for(t in r)n[t]=r[t];return n}m.clone=function(e,r){for(var t in r)"object"==typeof r[t]&&null!==r[t]&&e[t]?this.clone(e[t],r[t]):e[t]=r[t]},m.minMaxNormalize=function(e,r){return{min:Math.min(e,r),max:Math.max(e,r)}},m.randInt=function(e,r,t){var n=m.minMaxNormalize(e,r);return e=n.min,r=n.max,(!0===t?(e=Math.round(e/2),r=Math.round(r/2),2):1)*(Math.floor(Math.random()*(r-e+1))+e)},m.randIntSeed=function(e,r,t){var n=m.minMaxNormalize(e,r);return e=n.min,r=n.max,mul=!0===t?(e=Math.round(e/2),r=Math.round(r/2),2):1,mul*(Math.floor(m.calc.randomseed()*(r-e+1))+e)},m.randReal=function(e,r){var t=m.minMaxNormalize(e,r);return e=t.min,r=t.max,Math.random()*(r-e)+e},m.randRealSeed=function(e,r){var t=m.minMaxNormalize(e,r);return e=t.min,r=t.max,m.calc.randomseed()*(r-e)+e},m.randByArray=function(e,r){return void 0===e||"object"!=typeof e||void 0===e[0]?(m.calc.seed++,e):e=void 0!==r?m.randReal(e[0],e[1]):m.randInt(e[0],e[1])},m.randByArraySeed=function(e,r,t){return null==e||"object"!=typeof e||void 0===e[0]?(m.calc.seed++,e):e=void 0!==r?m.randRealSeed(e[0],e[1]):m.randIntSeed(e[0],e[1],t)},m.randIntByArraySeed=function(e,r,t){return null!=e&&"random"!==e||(e=r),"object"!=typeof e?(m.calc.seed++,e):e=m.randIntSeed(e[0],e[1],t)},m.randRealByArraySeed=function(e,r){return null!=e&&"random"!==e||(e=r),"object"!=typeof e?(m.calc.seed++,e):e=m.randRealSeed(e[0],e[1])},m.randItemSeed=function(e){if("object"!=typeof e||void 0===e[0])return m.calc.seed++,e;var r=e.length;return e[m.randIntSeed(0,r-1)]},m.randItemByArraySeed=function(e,r){if(null!=e&&"random"!==e)return m.calc.seed++,e;var t=r.length;return r[m.randIntSeed(0,t-1)]},m.randProperty=function(e,r){if(null!=e&&"random"!==e)return m.calc.seed++,e;var t=Object.keys(r);return t[m.randByArraySeed([0,t.length-1])]},m.rgba=function(e,r){return"random"!==e&&null!=e||(e=[[0,255],[0,255],[0,255],255]),"randomalpha"===e&&(e=[[0,255],[0,255],[0,255],[128,255]]),void 0!==e[0]&&null!==e[0]||(e[0]=0),void 0!==e[1]&&null!==e[1]||(e[1]=0),void 0!==e[2]&&null!==e[2]||(e[2]=0),void 0!==e[3]&&null!==e[3]||(e[3]=1),e[0]=m.randByArraySeed(e[0]),e[1]=m.randByArraySeed(e[1]),e[2]=m.randByArraySeed(e[2]),e[3]=m.randByArraySeed(e[3]),e[3]%1!=0&&(e[3]=Math.round(255*e[3])),1==e[3]&&(e[3]=255),e};return m.findClosestIndex=function(e,r,t){for(var n=r;0<=n&&n<=e.length-1;n+=t)if(e[n])return n;return e.length-1},m.calc={seed:void 0,pi:3.1415927,luminance:function(e){return.21*e[0]+.72*e[1]+.07*e[2]},randomseed:function(e){void 0===this.seed&&(this.seed=m.randInt(1,Number.MAX_SAFE_INTEGER)),void 0!==e&&(this.seed=e);var r=1e4*Math.sin(this.seed++);return r-Math.floor(r)},normalize1:function(e){return m.calc.normalize(e,0,1)},normalize255:function(e){return m.calc.normalize(e,0,255)},normalize:function(e,r,t){return t=p.config.historyLast&&p.config.historyList.shift(),p.config.historyList.push(r),window.localStorage.setItem(p.config.historyName,JSON.stringify(p.config.historyList))}}},m.params=function(e){var r;return null==e&&(e=(r=new Date).getHours()+":"+r.getMinutes()+":"+r.getSeconds()+" l"+m.layers.length+" i"+l.length),{name:e,version:p.version,width:c,height:u,normalize:m.normalize,items:l}},m.render=function(e,r){this.debug=!0===e.debug,m.event("beforeRender",e);var t,n,a=0,s=0;if(null!=e.width&&(c=e.width),null!=e.height&&(u=e.height),null!=e.normalize?m.normalize=e.normalize:m.normalize="limitless",h(),m.texture=new m.buffer(e.background),1!=r&&m.clear(),e.preset&&e.preset.name){var i=e.preset.name;if("random"===e.preset.name&&(i=m.randItemByArraySeed(null,Object.keys(f.presets))),"object"==typeof e.preset.name&&(i=m.randItemByArraySeed(null,e.preset.name)),i){var o,l=JSON.parse(JSON.stringify(f.presets[i].items));if(e.preset.seed)for(o in l)l[o][2]&&(l[o][2].seed=e.preset.seed);for(o in e.items)l.push(e.items[o]);e.items=l}}for(var d in e.items)a=e.items[d][0],t=e.items[d][1],n=e.items[d][2]?e.items[d][2]:{},null===a&&(a="copy"===t?s+1:s),e.seed&&(n.seed=e.seed*d),"random"==t&&(t=m.randProperty(m.defaults)),"object"==typeof t&&(t=m.randItemSeed(t)),s!=a&&(null!=m.layers[a]?m.texture.data=m.layers[a]:m.texture.clear(),s=a),null!=m[t]?m[t](n):null!=p.effects[t]?m.do(t,n,a):console.warn("undefined effect: "+t),m.layers[a]=m.texture.export();return m.event("afterRender",m.params()),m.history.add(),this},m.event=function(e,r){for(var t in p.events[e]){var n=p.events[e][t];"function"==typeof n&&n(m,r)}},m.do=function(e,r,t){var n,a,s,i,o=r;return void 0===r?r=d({},p.defaults[e]):"object"==typeof r&&(r=d(p.defaults[e],r)),r.seed=void 0!==r.seed&&null!==r.seed?r.seed:[1,Number.MAX_SAFE_INTEGER],r.seed=m.randByArray(r.seed),m.calc.randomseed(r.seed),(n=r).count=m.randByArraySeed(n.count),n.level=m.randByArraySeed(n.level),n.opacity=m.randByArraySeed(n.opacity),void 0!==n.blend?(n.blend=m.randProperty(n.blend,p.blends),n.blend=m.randItemSeed(n.blend),m.point.blend=n.blend):m.point.blend="",n.rgba=m.rgba(n.rgb?n.rgb:n.rgba),n.rgba&&(m.point.rgba=[n.rgba[0],n.rgba[1],n.rgba[2],n.rgba[3]]),Object.keys(n).forEach(function(e){void 0===n[e]&&delete n[e]}),r=n,m.event("beforeEffect",{layer:t,name:e,params:r}),"function"==typeof p.effects[e]?r=p.effects[e](m,r):console.warn("effect not callable: "+e),void 0===r&&(r=o),m.event("afterEffect",{layer:t,name:e,params:r}),r&&!1!==r.store&&(a=t,s=e,i=r,l.push([a,s,i])),m},m}}(SeamlessTextureGenerator),function(e){e.shape("rect",function(e,r,t,n,a,s){void 0!==s&&(r-=parseInt(n/2,10),t-=parseInt(a/2,10));for(var i=0;ir.skip&&(e.point.rgba=[x%l*u,x%d*h,x%c*p,e.point.rgba[3]],e.point.set(y,g))}}return r}),SeamlessTextureGenerator.effect("lines",{blend:SeamlessTextureGenerator.blendFlat,rgba:"randomalpha",size:[77,221],count:[21,512],freq1s:[4,221],freq1c:[4,221],freq2s:[4,221],freq2c:[4,221]},function(e,r){r.freq1s=e.randByArraySeed(r.freq1s,!0),r.freq1c=e.randByArraySeed(r.freq1c,!0),r.freq2s=e.randByArraySeed(r.freq2s,!0),r.freq2c=e.randByArraySeed(r.freq2c,!0),r.size=e.randByArraySeed(r.size);for(var t=0;tr[0]?t[0]:r[0],t[1]=t[1]>r[1]?t[1]:r[1],t[2]=t[2]>r[2]?t[2]:r[2],t}),e.blend("lineardodge",function(e,r,t){return t[0]=r[0]+t[0],t[1]=r[1]+t[1],t[2]=r[2]+t[2],t}),e.blend("lineardodge-invert",function(e,r,t){return t[0]=255-(t[0]+r[0]),t[1]=255-(t[1]+r[1]),t[2]=255-(t[2]+r[2]),t}),e.blend("linearlight",function(e,r,t){return t[0]=r[0]+2*t[0]-255,t[1]=r[1]+2*t[1]-255,t[2]=r[2]+2*t[2]-255,t}),e.blend("linearburn",function(e,r,t){return t[0]=r[0]+t[0]-255,t[1]=r[1]+t[1]-255,t[2]=r[2]+t[2]-255,t}),e.blend("softlight",function(e,r,t){return t[0]=128>16)):m+o*r.xamount*c/(c*c),a=u%16==0?e.wrapy(t+(l*r.yamount*u>>16)):t+l*r.yamount*u/(u*u),s=e.point.get(n,a),d.data[i]=s[0],d.data[i+1]=s[1],d.data[i+2]=s[2],d.data[i+3]=s[3];for(var f=e.texture.size();f--;)e.texture.data[f]=d.data[f];return r}),e.function("rotate",{angle:90,times:1,type:1,blend:e.blendSafe},function(e,r){r.type=e.randByArraySeed(r.type),null===r.angle?r.angle=e.randItemByArraySeed(r.angle,[90,180,270]):r.angle=e.randByArraySeed(r.angle),r.times=e.randByArraySeed(r.times);for(var t,n,a,s,i,o,l=new e.buffer,d=e.texture.size(),c=e.texture.width,u=e.texture.height,h=r.angle*(Math.PI/180),p=1;p<=r.times;p++)d=e.texture.size(),h=p*r.angle*(Math.PI/180),(1===r.type?function(){for(t=0;t=this.width)&&(e=this.pattern(e,this.width)),(r<0||r>=this.height)&&(r=this.pattern(r,this.height)),r*this.width*this.components+e*this.components},this.set=function(e,r,t){var n=this.offset(e,r);this.data[n]=t[0],this.data[n+1]=t[1],this.data[n+2]=t[2],this.data[n+3]=t[3]},this.get=function(e,r){var t=this.offset(e,r);return[this.data[t],this.data[t+1],this.data[t+2],this.data[t+3]]},this.alpha=function(e){switch(e){case"sphere":for(;size;)m.texture.data[size]=.5,size-=4}},this.canvas=function(e){for(var r=this.size(),t=e.getContext("2d").getImageData(0,0,this.width,this.height).data;r--;)m.texture.data[r]=t[r]},null===this.data&&this.clear()},m.texture=new m.buffer,m.layerCopy=function(e){for(var r=[],t=this.layers[e],n=t.length;n--;)r[n]=t[n];return r};function d(e,r){var t,n={};for(t in e)n[t]=e[t];for(t in r)n[t]=r[t];return n}m.clone=function(e,r){for(var t in r)"object"==typeof r[t]&&null!==r[t]&&e[t]?this.clone(e[t],r[t]):e[t]=r[t]},m.minMaxNormalize=function(e,r){return{min:Math.min(e,r),max:Math.max(e,r)}},m.randInt=function(e,r,t){var n=m.minMaxNormalize(e,r);return e=n.min,r=n.max,(!0===t?(e=Math.round(e/2),r=Math.round(r/2),2):1)*(Math.floor(Math.random()*(r-e+1))+e)},m.randIntSeed=function(e,r,t){var n=m.minMaxNormalize(e,r);return e=n.min,r=n.max,mul=!0===t?(e=Math.round(e/2),r=Math.round(r/2),2):1,mul*(Math.floor(m.calc.randomseed()*(r-e+1))+e)},m.randReal=function(e,r){var t=m.minMaxNormalize(e,r);return e=t.min,r=t.max,Math.random()*(r-e)+e},m.randRealSeed=function(e,r){var t=m.minMaxNormalize(e,r);return e=t.min,r=t.max,m.calc.randomseed()*(r-e)+e},m.randByArray=function(e,r){return void 0===e||"object"!=typeof e||void 0===e[0]?(m.calc.seed++,e):e=void 0!==r?m.randReal(e[0],e[1]):m.randInt(e[0],e[1])},m.randByArraySeed=function(e,r,t){return null==e||"object"!=typeof e||void 0===e[0]?(m.calc.seed++,e):e=void 0!==r?m.randRealSeed(e[0],e[1]):m.randIntSeed(e[0],e[1],t)},m.randIntByArraySeed=function(e,r,t){return null!=e&&"random"!==e||(e=r),"object"!=typeof e?(m.calc.seed++,e):e=m.randIntSeed(e[0],e[1],t)},m.randRealByArraySeed=function(e,r){return null!=e&&"random"!==e||(e=r),"object"!=typeof e?(m.calc.seed++,e):e=m.randRealSeed(e[0],e[1])},m.randItemSeed=function(e){if("object"!=typeof e||void 0===e[0])return m.calc.seed++,e;var r=e.length;return e[m.randIntSeed(0,r-1)]},m.randItemByArraySeed=function(e,r){if(null!=e&&"random"!==e)return m.calc.seed++,e;var t=r.length;return r[m.randIntSeed(0,t-1)]},m.randProperty=function(e,r){if(null!=e&&"random"!==e)return m.calc.seed++,e;var t=Object.keys(r);return t[m.randByArraySeed([0,t.length-1])]},m.rgba=function(e,r){return"random"!==e&&null!=e||(e=[[0,255],[0,255],[0,255],255]),"randomalpha"===e&&(e=[[0,255],[0,255],[0,255],[128,255]]),void 0!==e[0]&&null!==e[0]||(e[0]=0),void 0!==e[1]&&null!==e[1]||(e[1]=0),void 0!==e[2]&&null!==e[2]||(e[2]=0),void 0!==e[3]&&null!==e[3]||(e[3]=1),e[0]=m.randByArraySeed(e[0]),e[1]=m.randByArraySeed(e[1]),e[2]=m.randByArraySeed(e[2]),e[3]=m.randByArraySeed(e[3]),e[3]%1!=0&&(e[3]=Math.round(255*e[3])),1==e[3]&&(e[3]=255),e};return m.findClosestIndex=function(e,r,t){for(var n=r;0<=n&&n<=e.length-1;n+=t)if(e[n])return n;return e.length-1},m.calc={seed:void 0,pi:3.1415927,luminance:function(e){return.21*e[0]+.72*e[1]+.07*e[2]},randomseed:function(e){void 0===this.seed&&(this.seed=m.randInt(1,Number.MAX_SAFE_INTEGER)),void 0!==e&&(this.seed=e);var r=1e4*Math.sin(this.seed++);return r-Math.floor(r)},normalize1:function(e){return m.calc.normalize(e,0,1)},normalize255:function(e){return m.calc.normalize(e,0,255)},normalize:function(e,r,t){return t=p.config.historyLast&&p.config.historyList.shift(),p.config.historyList.push(r),window.localStorage.setItem(p.config.historyName,JSON.stringify(p.config.historyList))}}},m.params=function(e){var r;return null==e&&(e=(r=new Date).getHours()+":"+r.getMinutes()+":"+r.getSeconds()+" l"+m.layers.length+" i"+l.length),{name:e,version:p.version,width:c,height:u,normalize:m.normalize,items:l}},m.render=function(e,r){this.debug=!0===e.debug,m.event("beforeRender",e);var t,n,a=0,s=0;if(null!=e.width&&(c=e.width),null!=e.height&&(u=e.height),null!=e.normalize?m.normalize=e.normalize:m.normalize="limitless",h(),m.texture=new m.buffer(e.background),1!=r&&m.clear(),e.preset&&e.preset.name){var i=e.preset.name;if("random"===e.preset.name&&(i=m.randItemByArraySeed(null,Object.keys(f.presets))),"object"==typeof e.preset.name&&(i=m.randItemByArraySeed(null,e.preset.name)),i){var o,l=JSON.parse(JSON.stringify(f.presets[i].items));if(e.preset.seed)for(o in l)l[o][2]&&(l[o][2].seed=e.preset.seed);for(o in e.items)l.push(e.items[o]);e.items=l}}for(var d in e.items)a=e.items[d][0],t=e.items[d][1],n=void 0!==e.items[d][2]?e.items[d][2]:{},null===a&&(a="copy"===t?s+1:s),e.seed&&(n.seed=e.seed*d),"random"==t&&(t=m.randProperty(m.defaults)),"object"==typeof t&&(t=m.randItemSeed(t)),s!=a&&(null!=m.layers[a]?m.texture.data=m.layers[a]:m.texture.clear(),s=a),null!=m[t]?m[t](n):null!=p.effects[t]?m.do(t,n,a):console.warn("undefined effect: "+t),m.layers[a]=m.texture.export();return m.event("afterRender",m.params()),m.history.add(),this},m.event=function(e,r){for(var t in p.events[e]){var n=p.events[e][t];"function"==typeof n&&n(m,r)}},m.do=function(e,r,t){var n,a,s,i,o=r;return void 0===r?r=d({},p.defaults[e]):"object"==typeof r&&(r=d(p.defaults[e],r)),r.seed=void 0!==r.seed&&null!==r.seed?r.seed:[1,Number.MAX_SAFE_INTEGER],r.seed=m.randByArray(r.seed),m.calc.randomseed(r.seed),(n=r).count=m.randByArraySeed(n.count),n.level=m.randByArraySeed(n.level),n.opacity=m.randByArraySeed(n.opacity),void 0!==n.blend?(n.blend=m.randProperty(n.blend,p.blends),n.blend=m.randItemSeed(n.blend),m.point.blend=n.blend):m.point.blend="",n.rgba=m.rgba(n.rgb?n.rgb:n.rgba),n.rgba&&(m.point.rgba=[n.rgba[0],n.rgba[1],n.rgba[2],n.rgba[3]]),Object.keys(n).forEach(function(e){void 0===n[e]&&delete n[e]}),r=n,m.event("beforeEffect",{layer:t,name:e,params:r}),"function"==typeof p.effects[e]?r=p.effects[e](m,r):console.warn("effect not callable: "+e),void 0===r&&(r=o),m.event("afterEffect",{layer:t,name:e,params:r}),r&&!1!==r.store&&(a=t,s=e,i=r,l.push([a,s,i])),m},m}}(SeamlessTextureGenerator),function(e){e.shape("rect",function(e,r,t,n,a,s){void 0!==s&&(r-=parseInt(n/2,10),t-=parseInt(a/2,10));for(var i=0;iNk55rv#94ar$#cfelqMx{`tf30 zmiuBh8r{d`_HgH{vfZdyZNubaIVz!*5ihxl(jvO}!w-Li_tC$73Uk@#A6b{b6Fmk` zysKG{cGV;6XcHcivY0(RlW4PvR_t*TCnc1eEtX`TM@7U_59z9e+BE$xiPAMqF1F!5 zqED+V$?{#eXU%ngQ)RP#xQa^vuope7k^{~_k7Mw+NeHlN zFv)gBr6r%3nLxi4k(`wFQwhU$!~`y)WdNy|#OD!HN;PTC)#a2r`$Ms{BAaw!oqV(NViV;39C1}5?pyUf)HcsO@!r z3)o*mF9C0B`q`d+j?;Da*+HSz3IS=$;B;d3R@-RxG0N{U;IAHeVw2ZeOL7;<@9)A{ zFAo8RU6|~*VUN;|Na~Ry{yRvBg-^!*lCYnpVjL?Zk^K}=>Ip&zEB#PLyMKTDF3-cq zpQC7Pu}reKbjhW+wC5;;Va`Ya<+<2*KF8~FOJXf$8zIxrd+A|!7v&1?k%Iu;=0O>- z$C;J$r-i%ZAei0rJc86uE?wX`QNcS>!BZ9Nxft#RCtQ%q7LKC~+=^(#}udYI8pT%kE0H0crLm=6H7S*z#8091h;!#P~(8T&CpRb{b zcw?=<@q@sX9jqXCbyLn)kega7nt8kKXEXRa$jGXn*mF*H(X-uwbmDvk1zt%tSsvfV z8r`h214y8SM2yA^xs05LN33AMpzV3Y#G1oU24F?bKFUGI zDF0-o&V#Mq{|xVs+WVg{0UNTBqMrHubq#jZk$ zFz6h}Fvu%n1&0ih1=49-VX(2vVNTK^Afmt*_85zFn`A822GIg3BOioIN`F_7k&rdn zJF75RIVnzd0tD(=RyZgI@gTEDlL6w%w#fl1M+2xfXAQShiwCR0#yXI-t?E*NzlBak z{RClb>l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?^|SI2>8=q%N?|y@PwF~hRzQ7VG|uvoV4bg=~bko z7K66Ra|#M0aKYq@XnA95UV7H78NpkIkzkS?2DRWnPUg;7k_=#`S$GRwx*VZemIL`7kACj8^)~5b#9Mg5yuh2VqSN56*r*gIzTXcIk5=9tQlBDBlFgd zQI62_vW$e3dyvzX2tuN-H|z&*o^06^TZ)DZ&D>^b!OqoM0mZh2fd(V5uWTyrvWP^l4oXeuLteu z`z7@4hW+yHyB<(zR3J?CxRybyd1nqm>^uaxv_{LOODvb;J2iedUb zuy`!yEo2VtBFtT~v!3Zc0v^;n_Zd+GkH=KHR=7<;lCU6L&@U*vp_zq;2%fs1o2REU z9DZwM%LbyLy%NVT45eEp8{>CbK;CF+5leGxJ6{>y_)-zy-aH3OJ7# z%LF)NtE2!~Y=ceM(@1f}0H(fze^ke1ILyGFhre3S#-mW6CjGc$0 zbYUYH7(Ecm3J7JzK|h2;XRW|B$%LMWrWAg-Ue6Cu#k+R$&~TV*j&!^U4MSK|BZvNB zfQ^iie_VDsnoIXb6TC;QpU+CV^Qz0cMDMq`oHVKh_y=g! zbL%1^LDj+vXg;($C-}6RopS21|-JH{)T=-_Pg%l`L+=6D#$ z22kbjaW%VKMTXm`k34xk8Guy#DWg}v%{ErP-_cSVv4h@3}q{n|SSZX3y U7}9RH)7JC<509^ipA!NB0Cr`%6951J diff --git a/dist/tgen.js b/dist/tgen.js index 5c56f42..fbd2444 100644 --- a/dist/tgen.js +++ b/dist/tgen.js @@ -11,7 +11,7 @@ var SeamlessTextureGenerator = (function() { return { - version: '1.3.4', + version: '1.3.5', defaults: {}, effects: {}, filters: [], @@ -3471,7 +3471,7 @@ if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') { layerId = config.items[index][0]; effect = config.items[index][1]; - values = config.items[index][2] ? config.items[index][2] : {}; + values = config.items[index][2] !== undefined ? config.items[index][2] : {}; if (layerId === null) { layerId = effect === 'copy' ? currentId + 1 : currentId; diff --git a/dist/tgen.min.js b/dist/tgen.min.js index 3ee8dc1..2d1352e 100644 --- a/dist/tgen.min.js +++ b/dist/tgen.min.js @@ -1,8 +1,8 @@ /** * seamless-texture-generator - Seamless texture generator * - * @version v1.3.4 + * @version v1.3.5 * @link https://github.com/schalkt/tgen/ * @license MIT */ -var SeamlessTextureGenerator={version:"1.3.4",defaults:{},effects:{},filters:[],presets:{},functions:[],blends:{},shapes:{},colormaps:{},events:{beforeEffect:{},afterEffect:{},beforeRender:{},afterRender:{}},config:{historyLast:0,historyName:"history",historyList:[]},blendSafe:["average","lighten","linearburn","linearlight","difference","difference-invert","screen","lineardodge","lineardodge-invert","opacity","exclusion"],blendFlat:["lighten","screen","opacity"],effect:function(e,t,r){this.defaults[e]=t,this.effects[e]=r},function:function(e,t,r){this.functions.push(e),this.defaults[e]=t,this.effects[e]=r},filter:function(e,t,r){this.filters.push(e),this.defaults[e]=t,this.effects[e]=r},preset:function(e,t){t.name=e,this.presets[e]=t},event:function(e,t,r){null!=this.events[e]&&(this.events[e][t]=r)},blend:function(e,t){this.blends[e]=t},shape:function(e,t){this.shapes[e]=t},colormap:function(e,t){this.colormaps[e]=t},init:function(e,t,r){return this.getGenerator(e,t,r)}};"undefined"!=typeof module&&void 0!==module.exports?module.exports=SeamlessTextureGenerator:"function"==typeof define&&define.amd?define([],function(){return SeamlessTextureGenerator}):window.tgen=SeamlessTextureGenerator,SeamlessTextureGenerator.effect("checkerboard",{blend:SeamlessTextureGenerator.blendFlat,rgba:"randomalpha",even:"random",size:[[2,32],[2,32]]},function(a,e){e.even=a.randItemByArraySeed(e.even,[!0,!1]);var t,r,i=a.texture.width,o=a.texture.height;"number"==typeof e.size?t=r=e.size:(t=e.size[0]=a.randByArraySeed(e.size[0],null,!0),r=e.size[1]=a.randByArraySeed(e.size[1],null,!0));function n(e,t){for(var r=0;rt.skip&&(e.point.rgba=[v%l*d,v%c*f,v%u*h,e.point.rgba[3]],e.point.set(b,y))}}return t}),SeamlessTextureGenerator.effect("lines",{blend:SeamlessTextureGenerator.blendFlat,rgba:"randomalpha",size:[77,221],count:[21,512],freq1s:[4,221],freq1c:[4,221],freq2s:[4,221],freq2c:[4,221]},function(e,t){t.freq1s=e.randByArraySeed(t.freq1s,!0),t.freq1c=e.randByArraySeed(t.freq1c,!0),t.freq2s=e.randByArraySeed(t.freq2s,!0),t.freq2c=e.randByArraySeed(t.freq2c,!0),t.size=e.randByArraySeed(t.size);for(var r=0;rt[0]?r[0]:t[0],r[1]=r[1]>t[1]?r[1]:t[1],r[2]=r[2]>t[2]?r[2]:t[2],r}),e.blend("lineardodge",function(e,t,r){return r[0]=t[0]+r[0],r[1]=t[1]+r[1],r[2]=t[2]+r[2],r}),e.blend("lineardodge-invert",function(e,t,r){return r[0]=255-(r[0]+t[0]),r[1]=255-(r[1]+t[1]),r[2]=255-(r[2]+t[2]),r}),e.blend("linearlight",function(e,t,r){return r[0]=t[0]+2*r[0]-255,r[1]=t[1]+2*r[1]-255,r[2]=t[2]+2*r[2]-255,r}),e.blend("linearburn",function(e,t,r){return r[0]=t[0]+r[0]-255,r[1]=t[1]+r[1]-255,r[2]=t[2]+r[2]-255,r}),e.blend("softlight",function(e,t,r){return r[0]=128>16)):p+s*t.xamount*u/(u*u),a=d%16==0?e.wrapy(r+(l*t.yamount*d>>16)):r+l*t.yamount*d/(d*d),i=e.point.get(n,a),c.data[o]=i[0],c.data[o+1]=i[1],c.data[o+2]=i[2],c.data[o+3]=i[3];for(var m=e.texture.size();m--;)e.texture.data[m]=c.data[m];return t}),e.function("rotate",{angle:90,times:1,type:1,blend:e.blendSafe},function(e,t){t.type=e.randByArraySeed(t.type),null===t.angle?t.angle=e.randItemByArraySeed(t.angle,[90,180,270]):t.angle=e.randByArraySeed(t.angle),t.times=e.randByArraySeed(t.times);for(var r,n,a,i,o,s,l=new e.buffer,c=e.texture.size(),u=e.texture.width,d=e.texture.height,f=t.angle*(Math.PI/180),h=1;h<=t.times;h++)c=e.texture.size(),f=h*t.angle*(Math.PI/180),(1===t.type?function(){for(r=0;r=this.width)&&(e=this.pattern(e,this.width)),(t<0||t>=this.height)&&(t=this.pattern(t,this.height)),t*this.width*this.components+e*this.components},this.set=function(e,t,r){var n=this.offset(e,t);this.data[n]=r[0],this.data[n+1]=r[1],this.data[n+2]=r[2],this.data[n+3]=r[3]},this.get=function(e,t){var r=this.offset(e,t);return[this.data[r],this.data[r+1],this.data[r+2],this.data[r+3]]},this.alpha=function(e){switch(e){case"sphere":for(;size;)p.texture.data[size]=.5,size-=4}},this.canvas=function(e){for(var t=this.size(),r=e.getContext("2d").getImageData(0,0,this.width,this.height).data;t--;)p.texture.data[t]=r[t]},null===this.data&&this.clear()},p.texture=new p.buffer,p.layerCopy=function(e){for(var t=[],r=this.layers[e],n=r.length;n--;)t[n]=r[n];return t};function c(e,t){var r,n={};for(r in e)n[r]=e[r];for(r in t)n[r]=t[r];return n}p.clone=function(e,t){for(var r in t)"object"==typeof t[r]&&null!==t[r]&&e[r]?this.clone(e[r],t[r]):e[r]=t[r]},p.minMaxNormalize=function(e,t){return{min:Math.min(e,t),max:Math.max(e,t)}},p.randInt=function(e,t,r){var n=p.minMaxNormalize(e,t);return e=n.min,t=n.max,(!0===r?(e=Math.round(e/2),t=Math.round(t/2),2):1)*(Math.floor(Math.random()*(t-e+1))+e)},p.randIntSeed=function(e,t,r){var n=p.minMaxNormalize(e,t);return e=n.min,t=n.max,mul=!0===r?(e=Math.round(e/2),t=Math.round(t/2),2):1,mul*(Math.floor(p.calc.randomseed()*(t-e+1))+e)},p.randReal=function(e,t){var r=p.minMaxNormalize(e,t);return e=r.min,t=r.max,Math.random()*(t-e)+e},p.randRealSeed=function(e,t){var r=p.minMaxNormalize(e,t);return e=r.min,t=r.max,p.calc.randomseed()*(t-e)+e},p.randByArray=function(e,t){return void 0===e||"object"!=typeof e||void 0===e[0]?(p.calc.seed++,e):e=void 0!==t?p.randReal(e[0],e[1]):p.randInt(e[0],e[1])},p.randByArraySeed=function(e,t,r){return null==e||"object"!=typeof e||void 0===e[0]?(p.calc.seed++,e):e=void 0!==t?p.randRealSeed(e[0],e[1]):p.randIntSeed(e[0],e[1],r)},p.randIntByArraySeed=function(e,t,r){return null!=e&&"random"!==e||(e=t),"object"!=typeof e?(p.calc.seed++,e):e=p.randIntSeed(e[0],e[1],r)},p.randRealByArraySeed=function(e,t){return null!=e&&"random"!==e||(e=t),"object"!=typeof e?(p.calc.seed++,e):e=p.randRealSeed(e[0],e[1])},p.randItemSeed=function(e){if("object"!=typeof e||void 0===e[0])return p.calc.seed++,e;var t=e.length;return e[p.randIntSeed(0,t-1)]},p.randItemByArraySeed=function(e,t){if(null!=e&&"random"!==e)return p.calc.seed++,e;var r=t.length;return t[p.randIntSeed(0,r-1)]},p.randProperty=function(e,t){if(null!=e&&"random"!==e)return p.calc.seed++,e;var r=Object.keys(t);return r[p.randByArraySeed([0,r.length-1])]},p.rgba=function(e,t){return"random"!==e&&null!=e||(e=[[0,255],[0,255],[0,255],255]),"randomalpha"===e&&(e=[[0,255],[0,255],[0,255],[128,255]]),void 0!==e[0]&&null!==e[0]||(e[0]=0),void 0!==e[1]&&null!==e[1]||(e[1]=0),void 0!==e[2]&&null!==e[2]||(e[2]=0),void 0!==e[3]&&null!==e[3]||(e[3]=1),e[0]=p.randByArraySeed(e[0]),e[1]=p.randByArraySeed(e[1]),e[2]=p.randByArraySeed(e[2]),e[3]=p.randByArraySeed(e[3]),e[3]%1!=0&&(e[3]=Math.round(255*e[3])),1==e[3]&&(e[3]=255),e};return p.findClosestIndex=function(e,t,r){for(var n=t;0<=n&&n<=e.length-1;n+=r)if(e[n])return n;return e.length-1},p.calc={seed:void 0,pi:3.1415927,luminance:function(e){return.21*e[0]+.72*e[1]+.07*e[2]},randomseed:function(e){void 0===this.seed&&(this.seed=p.randInt(1,Number.MAX_SAFE_INTEGER)),void 0!==e&&(this.seed=e);var t=1e4*Math.sin(this.seed++);return t-Math.floor(t)},normalize1:function(e){return p.calc.normalize(e,0,1)},normalize255:function(e){return p.calc.normalize(e,0,255)},normalize:function(e,t,r){return r=h.config.historyLast&&h.config.historyList.shift(),h.config.historyList.push(t),window.localStorage.setItem(h.config.historyName,JSON.stringify(h.config.historyList))}}},p.params=function(e){var t;return null==e&&(e=(t=new Date).getHours()+":"+t.getMinutes()+":"+t.getSeconds()+" l"+p.layers.length+" i"+l.length),{name:e,version:h.version,width:u,height:d,normalize:p.normalize,items:l}},p.render=function(e,t){this.debug=!0===e.debug,p.event("beforeRender",e);var r,n,a=0,i=0;if(null!=e.width&&(u=e.width),null!=e.height&&(d=e.height),null!=e.normalize?p.normalize=e.normalize:p.normalize="limitless",f(),p.texture=new p.buffer(e.background),1!=t&&p.clear(),e.preset&&e.preset.name){var o=e.preset.name;if("random"===e.preset.name&&(o=p.randItemByArraySeed(null,Object.keys(m.presets))),"object"==typeof e.preset.name&&(o=p.randItemByArraySeed(null,e.preset.name)),o){var s,l=JSON.parse(JSON.stringify(m.presets[o].items));if(e.preset.seed)for(s in l)l[s][2]&&(l[s][2].seed=e.preset.seed);for(s in e.items)l.push(e.items[s]);e.items=l}}for(var c in e.items)a=e.items[c][0],r=e.items[c][1],n=e.items[c][2]?e.items[c][2]:{},null===a&&(a="copy"===r?i+1:i),e.seed&&(n.seed=e.seed*c),"random"==r&&(r=p.randProperty(p.defaults)),"object"==typeof r&&(r=p.randItemSeed(r)),i!=a&&(null!=p.layers[a]?p.texture.data=p.layers[a]:p.texture.clear(),i=a),null!=p[r]?p[r](n):null!=h.effects[r]?p.do(r,n,a):console.warn("undefined effect: "+r),p.layers[a]=p.texture.export();return p.event("afterRender",p.params()),p.history.add(),this},p.event=function(e,t){for(var r in h.events[e]){var n=h.events[e][r];"function"==typeof n&&n(p,t)}},p.do=function(e,t,r){var n,a,i,o,s=t;return void 0===t?t=c({},h.defaults[e]):"object"==typeof t&&(t=c(h.defaults[e],t)),t.seed=void 0!==t.seed&&null!==t.seed?t.seed:[1,Number.MAX_SAFE_INTEGER],t.seed=p.randByArray(t.seed),p.calc.randomseed(t.seed),(n=t).count=p.randByArraySeed(n.count),n.level=p.randByArraySeed(n.level),n.opacity=p.randByArraySeed(n.opacity),void 0!==n.blend?(n.blend=p.randProperty(n.blend,h.blends),n.blend=p.randItemSeed(n.blend),p.point.blend=n.blend):p.point.blend="",n.rgba=p.rgba(n.rgb?n.rgb:n.rgba),n.rgba&&(p.point.rgba=[n.rgba[0],n.rgba[1],n.rgba[2],n.rgba[3]]),Object.keys(n).forEach(function(e){void 0===n[e]&&delete n[e]}),t=n,p.event("beforeEffect",{layer:r,name:e,params:t}),"function"==typeof h.effects[e]?t=h.effects[e](p,t):console.warn("effect not callable: "+e),void 0===t&&(t=s),p.event("afterEffect",{layer:r,name:e,params:t}),t&&!1!==t.store&&(a=r,i=e,o=t,l.push([a,i,o])),p},p}}(SeamlessTextureGenerator),function(e){e.shape("rect",function(e,t,r,n,a,i){void 0!==i&&(t-=parseInt(n/2,10),r-=parseInt(a/2,10));for(var o=0;ot.skip&&(e.point.rgba=[v%l*d,v%c*f,v%u*h,e.point.rgba[3]],e.point.set(b,y))}}return t}),SeamlessTextureGenerator.effect("lines",{blend:SeamlessTextureGenerator.blendFlat,rgba:"randomalpha",size:[77,221],count:[21,512],freq1s:[4,221],freq1c:[4,221],freq2s:[4,221],freq2c:[4,221]},function(e,t){t.freq1s=e.randByArraySeed(t.freq1s,!0),t.freq1c=e.randByArraySeed(t.freq1c,!0),t.freq2s=e.randByArraySeed(t.freq2s,!0),t.freq2c=e.randByArraySeed(t.freq2c,!0),t.size=e.randByArraySeed(t.size);for(var r=0;rt[0]?r[0]:t[0],r[1]=r[1]>t[1]?r[1]:t[1],r[2]=r[2]>t[2]?r[2]:t[2],r}),e.blend("lineardodge",function(e,t,r){return r[0]=t[0]+r[0],r[1]=t[1]+r[1],r[2]=t[2]+r[2],r}),e.blend("lineardodge-invert",function(e,t,r){return r[0]=255-(r[0]+t[0]),r[1]=255-(r[1]+t[1]),r[2]=255-(r[2]+t[2]),r}),e.blend("linearlight",function(e,t,r){return r[0]=t[0]+2*r[0]-255,r[1]=t[1]+2*r[1]-255,r[2]=t[2]+2*r[2]-255,r}),e.blend("linearburn",function(e,t,r){return r[0]=t[0]+r[0]-255,r[1]=t[1]+r[1]-255,r[2]=t[2]+r[2]-255,r}),e.blend("softlight",function(e,t,r){return r[0]=128>16)):p+s*t.xamount*u/(u*u),a=d%16==0?e.wrapy(r+(l*t.yamount*d>>16)):r+l*t.yamount*d/(d*d),i=e.point.get(n,a),c.data[o]=i[0],c.data[o+1]=i[1],c.data[o+2]=i[2],c.data[o+3]=i[3];for(var m=e.texture.size();m--;)e.texture.data[m]=c.data[m];return t}),e.function("rotate",{angle:90,times:1,type:1,blend:e.blendSafe},function(e,t){t.type=e.randByArraySeed(t.type),null===t.angle?t.angle=e.randItemByArraySeed(t.angle,[90,180,270]):t.angle=e.randByArraySeed(t.angle),t.times=e.randByArraySeed(t.times);for(var r,n,a,i,o,s,l=new e.buffer,c=e.texture.size(),u=e.texture.width,d=e.texture.height,f=t.angle*(Math.PI/180),h=1;h<=t.times;h++)c=e.texture.size(),f=h*t.angle*(Math.PI/180),(1===t.type?function(){for(r=0;r=this.width)&&(e=this.pattern(e,this.width)),(t<0||t>=this.height)&&(t=this.pattern(t,this.height)),t*this.width*this.components+e*this.components},this.set=function(e,t,r){var n=this.offset(e,t);this.data[n]=r[0],this.data[n+1]=r[1],this.data[n+2]=r[2],this.data[n+3]=r[3]},this.get=function(e,t){var r=this.offset(e,t);return[this.data[r],this.data[r+1],this.data[r+2],this.data[r+3]]},this.alpha=function(e){switch(e){case"sphere":for(;size;)p.texture.data[size]=.5,size-=4}},this.canvas=function(e){for(var t=this.size(),r=e.getContext("2d").getImageData(0,0,this.width,this.height).data;t--;)p.texture.data[t]=r[t]},null===this.data&&this.clear()},p.texture=new p.buffer,p.layerCopy=function(e){for(var t=[],r=this.layers[e],n=r.length;n--;)t[n]=r[n];return t};function c(e,t){var r,n={};for(r in e)n[r]=e[r];for(r in t)n[r]=t[r];return n}p.clone=function(e,t){for(var r in t)"object"==typeof t[r]&&null!==t[r]&&e[r]?this.clone(e[r],t[r]):e[r]=t[r]},p.minMaxNormalize=function(e,t){return{min:Math.min(e,t),max:Math.max(e,t)}},p.randInt=function(e,t,r){var n=p.minMaxNormalize(e,t);return e=n.min,t=n.max,(!0===r?(e=Math.round(e/2),t=Math.round(t/2),2):1)*(Math.floor(Math.random()*(t-e+1))+e)},p.randIntSeed=function(e,t,r){var n=p.minMaxNormalize(e,t);return e=n.min,t=n.max,mul=!0===r?(e=Math.round(e/2),t=Math.round(t/2),2):1,mul*(Math.floor(p.calc.randomseed()*(t-e+1))+e)},p.randReal=function(e,t){var r=p.minMaxNormalize(e,t);return e=r.min,t=r.max,Math.random()*(t-e)+e},p.randRealSeed=function(e,t){var r=p.minMaxNormalize(e,t);return e=r.min,t=r.max,p.calc.randomseed()*(t-e)+e},p.randByArray=function(e,t){return void 0===e||"object"!=typeof e||void 0===e[0]?(p.calc.seed++,e):e=void 0!==t?p.randReal(e[0],e[1]):p.randInt(e[0],e[1])},p.randByArraySeed=function(e,t,r){return null==e||"object"!=typeof e||void 0===e[0]?(p.calc.seed++,e):e=void 0!==t?p.randRealSeed(e[0],e[1]):p.randIntSeed(e[0],e[1],r)},p.randIntByArraySeed=function(e,t,r){return null!=e&&"random"!==e||(e=t),"object"!=typeof e?(p.calc.seed++,e):e=p.randIntSeed(e[0],e[1],r)},p.randRealByArraySeed=function(e,t){return null!=e&&"random"!==e||(e=t),"object"!=typeof e?(p.calc.seed++,e):e=p.randRealSeed(e[0],e[1])},p.randItemSeed=function(e){if("object"!=typeof e||void 0===e[0])return p.calc.seed++,e;var t=e.length;return e[p.randIntSeed(0,t-1)]},p.randItemByArraySeed=function(e,t){if(null!=e&&"random"!==e)return p.calc.seed++,e;var r=t.length;return t[p.randIntSeed(0,r-1)]},p.randProperty=function(e,t){if(null!=e&&"random"!==e)return p.calc.seed++,e;var r=Object.keys(t);return r[p.randByArraySeed([0,r.length-1])]},p.rgba=function(e,t){return"random"!==e&&null!=e||(e=[[0,255],[0,255],[0,255],255]),"randomalpha"===e&&(e=[[0,255],[0,255],[0,255],[128,255]]),void 0!==e[0]&&null!==e[0]||(e[0]=0),void 0!==e[1]&&null!==e[1]||(e[1]=0),void 0!==e[2]&&null!==e[2]||(e[2]=0),void 0!==e[3]&&null!==e[3]||(e[3]=1),e[0]=p.randByArraySeed(e[0]),e[1]=p.randByArraySeed(e[1]),e[2]=p.randByArraySeed(e[2]),e[3]=p.randByArraySeed(e[3]),e[3]%1!=0&&(e[3]=Math.round(255*e[3])),1==e[3]&&(e[3]=255),e};return p.findClosestIndex=function(e,t,r){for(var n=t;0<=n&&n<=e.length-1;n+=r)if(e[n])return n;return e.length-1},p.calc={seed:void 0,pi:3.1415927,luminance:function(e){return.21*e[0]+.72*e[1]+.07*e[2]},randomseed:function(e){void 0===this.seed&&(this.seed=p.randInt(1,Number.MAX_SAFE_INTEGER)),void 0!==e&&(this.seed=e);var t=1e4*Math.sin(this.seed++);return t-Math.floor(t)},normalize1:function(e){return p.calc.normalize(e,0,1)},normalize255:function(e){return p.calc.normalize(e,0,255)},normalize:function(e,t,r){return r=h.config.historyLast&&h.config.historyList.shift(),h.config.historyList.push(t),window.localStorage.setItem(h.config.historyName,JSON.stringify(h.config.historyList))}}},p.params=function(e){var t;return null==e&&(e=(t=new Date).getHours()+":"+t.getMinutes()+":"+t.getSeconds()+" l"+p.layers.length+" i"+l.length),{name:e,version:h.version,width:u,height:d,normalize:p.normalize,items:l}},p.render=function(e,t){this.debug=!0===e.debug,p.event("beforeRender",e);var r,n,a=0,i=0;if(null!=e.width&&(u=e.width),null!=e.height&&(d=e.height),null!=e.normalize?p.normalize=e.normalize:p.normalize="limitless",f(),p.texture=new p.buffer(e.background),1!=t&&p.clear(),e.preset&&e.preset.name){var o=e.preset.name;if("random"===e.preset.name&&(o=p.randItemByArraySeed(null,Object.keys(m.presets))),"object"==typeof e.preset.name&&(o=p.randItemByArraySeed(null,e.preset.name)),o){var s,l=JSON.parse(JSON.stringify(m.presets[o].items));if(e.preset.seed)for(s in l)l[s][2]&&(l[s][2].seed=e.preset.seed);for(s in e.items)l.push(e.items[s]);e.items=l}}for(var c in e.items)a=e.items[c][0],r=e.items[c][1],n=void 0!==e.items[c][2]?e.items[c][2]:{},null===a&&(a="copy"===r?i+1:i),e.seed&&(n.seed=e.seed*c),"random"==r&&(r=p.randProperty(p.defaults)),"object"==typeof r&&(r=p.randItemSeed(r)),i!=a&&(null!=p.layers[a]?p.texture.data=p.layers[a]:p.texture.clear(),i=a),null!=p[r]?p[r](n):null!=h.effects[r]?p.do(r,n,a):console.warn("undefined effect: "+r),p.layers[a]=p.texture.export();return p.event("afterRender",p.params()),p.history.add(),this},p.event=function(e,t){for(var r in h.events[e]){var n=h.events[e][r];"function"==typeof n&&n(p,t)}},p.do=function(e,t,r){var n,a,i,o,s=t;return void 0===t?t=c({},h.defaults[e]):"object"==typeof t&&(t=c(h.defaults[e],t)),t.seed=void 0!==t.seed&&null!==t.seed?t.seed:[1,Number.MAX_SAFE_INTEGER],t.seed=p.randByArray(t.seed),p.calc.randomseed(t.seed),(n=t).count=p.randByArraySeed(n.count),n.level=p.randByArraySeed(n.level),n.opacity=p.randByArraySeed(n.opacity),void 0!==n.blend?(n.blend=p.randProperty(n.blend,h.blends),n.blend=p.randItemSeed(n.blend),p.point.blend=n.blend):p.point.blend="",n.rgba=p.rgba(n.rgb?n.rgb:n.rgba),n.rgba&&(p.point.rgba=[n.rgba[0],n.rgba[1],n.rgba[2],n.rgba[3]]),Object.keys(n).forEach(function(e){void 0===n[e]&&delete n[e]}),t=n,p.event("beforeEffect",{layer:r,name:e,params:t}),"function"==typeof h.effects[e]?t=h.effects[e](p,t):console.warn("effect not callable: "+e),void 0===t&&(t=s),p.event("afterEffect",{layer:r,name:e,params:t}),t&&!1!==t.store&&(a=r,i=e,o=t,l.push([a,i,o])),p},p}}(SeamlessTextureGenerator),function(e){e.shape("rect",function(e,t,r,n,a,i){void 0!==i&&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