From beb7a400d33b7754acd47b18c478a9f980425070 Mon Sep 17 00:00:00 2001 From: Tamas Schalk Date: Sun, 8 Sep 2019 21:50:43 +0200 Subject: [PATCH 1/2] Added xor and xor-sharpen Added some basic tests (mocha) Fixed checkerboard --- .gitignore | 1 + demo/index.html | 100 ++++-- dist/tgen.js | 293 +++++++++++------- dist/tgen.min.js | 6 +- dist/tgen.min.js.gz | Bin 10453 -> 10522 bytes gulpfile.js | 10 +- package.json | 18 +- src/tgen-base.js | 111 ++++--- src/tgen-blends.js | 6 +- src/tgen-colormaps.js | 6 +- src/tgen-effects.js | 91 ++++-- src/tgen-events.js | 6 +- src/tgen-filters.js | 6 +- src/tgen-functions.js | 6 +- src/tgen-shapes.js | 49 +-- src/tgen-tests.js | 16 +- test/test.js | 250 +++++++++++++++ yarn.lock | 697 ++++++++++++++++++++++++++++++++++++++++-- 18 files changed, 1389 insertions(+), 283 deletions(-) create mode 100644 test/test.js diff --git a/.gitignore b/.gitignore index 1bda797..fe4a162 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /node_modules/ /closure-compiler.jar /releases +/test/*.png diff --git a/demo/index.html b/demo/index.html index f4a79d3..1fadb4b 100644 --- a/demo/index.html +++ b/demo/index.html @@ -131,6 +131,69 @@

Seamless texture generator

+ + + + @@ -1542,23 +1605,24 @@

Seamless texture generator

var params = { "width": 256, "height": 256, - "normalize" : "compress", + "normalize" : "pingpong", "items": [ - [0, "subplasma", { - "seed": 3612991, - "size": [1,5], - "rgba": [[0, 255], [0, 255], [77, 255], 1] + [0, "xor", { }], - [0, "sinecolor", { - "seed": 10373136, - "channel": [0, 2] + [1, "xor", { }], - [0, "subplasma", { - "blend": "backlight", - "size": 5, - "rgba": [139, 67, 248, 138] + [2, "spheres", { + "dynamic": true + }], + [3, "copy", 0], + [3, "merge", { + "layer": 1, + "blend": "random" }], - [0, "colorize", {"colormap": "ice"}] + [3, "merge", { + "layer": 2, + "blend": "random" + }] ] } diff --git a/dist/tgen.js b/dist/tgen.js index fbd163c..4b7da49 100644 --- a/dist/tgen.js +++ b/dist/tgen.js @@ -3,15 +3,15 @@ * https://github.com/schalkt/tgen/ * http://texture-generator.com/ * - * Copyright (c) 2015-2018 Tamas Schalk + * Copyright (c) 2015-2019 Tamas Schalk * MIT license */ -(function (fn) { +var SeamlessTextureGenerator = (function () { - window[fn] = { + return { - version: '1.1.12', + version: '1.1.15', defaults: {}, effects: {}, filters: [], @@ -184,7 +184,7 @@ this.size = function () { return this.data.length; - } + }; this.export = function (normalize, texture) { @@ -192,32 +192,33 @@ normalize = (normalize !== undefined) ? normalize : generator.normalize; texture = texture ? texture : this.data; var size = texture.length; + var data; switch (normalize) { case 'limitless': - var data = new Float32Array(size); + data = new Float32Array(size); while (size--) { data[size] = texture[size]; } break; case 'clamped': - var data = new Uint8ClampedArray(size); + data = new Uint8ClampedArray(size); while (size--) { data[size] = texture[size]; } break; case 'pingpong': - var data = new Uint8ClampedArray(size); + data = new Uint8ClampedArray(size); while (size--) { data[size] = generator.calc.pingpong(texture[size], 0, 255); } break; case 'compress': - var data = new Uint8ClampedArray(size); + data = new Uint8ClampedArray(size); var min = texture[0]; var max = texture[0]; var s = size; @@ -270,17 +271,18 @@ this.pattern = function (val, max) { + var smax, sval; var s = val / max; if (val >= max) { - var smax = Math.floor(s) * (max); - var sval = (val - smax); + smax = Math.floor(s) * (max); + sval = (val - smax); return sval; } if (val < 0) { - var smax = Math.ceil(s) * (max); - var sval = max - Math.abs((val - smax)); + smax = Math.ceil(s) * (max); + sval = max - Math.abs((val - smax)); if (sval >= max) { sval = (sval - max); return sval; @@ -422,7 +424,8 @@ } return mul * (Math.floor(Math.random() * (max - min + 1)) + min); - } + + }, // random int min max by seed generator.randIntSeed = function (min, max, even) { @@ -441,7 +444,7 @@ return mul * (Math.floor(generator.calc.randomseed() * (max - min + 1)) + min); - } + }, // random real min max generator.randReal = function (min, max) { @@ -449,7 +452,7 @@ min = norm.min; max = norm.max; return Math.random() * (max - min) + min; - }; + }, // random real min max by seed generator.randRealSeed = function (min, max) { @@ -457,7 +460,7 @@ min = norm.min; max = norm.max; return generator.calc.randomseed() * (max - min) + min; - }; + }, generator.randByArray = function (data, real) { @@ -473,7 +476,7 @@ return data; - } + }, generator.randByArraySeed = function (data, real, even) { @@ -489,7 +492,7 @@ return data; - } + }; // random color @@ -504,19 +507,19 @@ return [generator.randIntSeed(0, 255), generator.randIntSeed(0, 255), generator.randIntSeed(0, 255), opacity]; - } + }; // get random blend mode var randBlend = function () { return randProperty(self.blends); - } + }; // get random array item generator.randItem = function (array) { var count = array.length; var index = generator.randIntSeed(0, count - 1); return array[index]; - } + }; // get random property from object @@ -532,7 +535,7 @@ return result; - } + }; // set rgba color - if the channel is an array then random generator.rgba = function (rgba, alpha) { @@ -633,7 +636,7 @@ // store generated texture params for save var store = function (type, params) { - rendered.push([layer, type, params]) + rendered.push([layer, type, params]); }; @@ -743,7 +746,7 @@ } - } + }; generator.colormap = { @@ -766,7 +769,7 @@ if (typeof colormap[0] == 'object') { // by items rgba - for (key in colormap) { + for (var key in colormap) { var item = colormap[key]; item.rgba = generator.rgba(item.rgba); colormap[key] = item; @@ -783,12 +786,13 @@ if (colormap === 'random') { var count = generator.randIntSeed(1, 4); - var colormap = []; + colormap = []; + for (var i = 0; i <= count; i++) { colormap[i] = { percent: parseInt((i / count) * 100), rgba: [generator.randIntSeed(0, 255), generator.randIntSeed(0, 255), generator.randIntSeed(0, 255), 255] - } + }; } } @@ -966,7 +970,7 @@ } - } + }; // read and modify all pixel by callback function generator.walk = function (func) { @@ -982,24 +986,24 @@ } } - } + }; // for percent calculations generator.percent = function (c, max) { return parseInt((c / 100) * max, 10); - } + }; generator.percentX = function (c) { return parseInt((c / 100) * width, 10); - } + }; generator.percentY = function (c) { return parseInt((c / 100) * height, 10); - } + }; generator.percentXY = function (c) { return parseInt((c / 100) * wha, 10); - } + }; generator.xysize = function (i, params) { @@ -1034,7 +1038,7 @@ size: size }; - } + }; // copy texture to image @@ -1071,6 +1075,7 @@ context.putImageData(imageData, 0, 0); return canvas; + }; // get canvas @@ -1105,7 +1110,7 @@ return this; - } + }; // stat generator.stat = function (func) { @@ -1119,7 +1124,7 @@ return this; - } + }; // save to localstorage @@ -1128,7 +1133,7 @@ available: function () { try { - return 'localStorage' in window && window['localStorage'] !== null && window['localStorage'] !== undefined; + return window && 'localStorage' in window && window['localStorage'] !== null && window['localStorage'] !== undefined; } catch (e) { return false; } @@ -1193,7 +1198,7 @@ } - } + }; generator.params = function (name) { @@ -1212,9 +1217,9 @@ "height": height, "normalize": generator.normalize, "items": rendered - } + }; - } + }; // parse params generator.render = function (config, noclear) { @@ -1367,13 +1372,31 @@ // the generator object return generator; } - } + }; })('tgen'); -(function (fn) { - var tgen = window[fn]; + +if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') { + + module.exports = SeamlessTextureGenerator; + +} else { + + if (typeof define === 'function' && define.amd) { + + define([], function() { + return SeamlessTextureGenerator; + }); + + } else { + + window.tgen = SeamlessTextureGenerator; + + } +} +(function (tgen) { // opacity tgen.blend('opacity', function ($g, current, input) { @@ -1573,10 +1596,8 @@ }); -})('tgen'); -(function (fn) { - - var tgen = window[fn]; +})(SeamlessTextureGenerator); +(function (tgen) { // dawn tgen.colormap('blackwhite', function () { @@ -1684,11 +1705,8 @@ }); -})('tgen'); -(function (fn) { - - var tgen = window[fn]; - +})(SeamlessTextureGenerator); +(function (tgen) { var blendSafe = [ "average", @@ -2334,8 +2352,8 @@ rgba: "randomalpha", even: "random", size: [ - [2,32], - [2,32], + [2, 32], + [2, 32], ], }, function ($g, params) { @@ -2347,31 +2365,49 @@ var height = $g.texture.height; var sizeX, sizeY; - if (params.size && params.size[0] && typeof params.size[0] == 'object') { + if (typeof params.size === 'number') { + + sizeX = sizeY = params.size; - if (params.even) { - sizeX = params.size[0] = $g.randByArraySeed(params.size[0], null, true); - } else { + } else { + + if (typeof params.size[0] == 'object') { sizeX = params.size[0] = $g.randByArraySeed(params.size[0], null, true); + } else { + sizeX = params.size[0]; + } + + if (typeof params.size[1] == 'object') { + sizeY = params.size[1] = $g.randByArraySeed(params.size[1], null, true); + } else { + sizeY = params.size[1]; } - } else { - sizeX = params.size[0]; } - if (params.size && params.size[1] && typeof params.size[1] == 'object') { + // if (params.size && params.size[0] && typeof params.size[0] == 'object') { - if (params.even) { - sizeX = params.size[1] = $g.randByArraySeed(params.size[1], null, true); - } else { - sizeY = params.size[1] = $g.randByArraySeed(params.size[1], null, true); - } + // if (params.even) { + // sizeX = params.size[0] = $g.randByArraySeed(params.size[0], null, true); + // } else { + // sizeY = params.size[0] = $g.randByArraySeed(params.size[0], null, true); + // } - } else { - sizeY = params.size[1]; - } + // } else { + // sizeX = params.size; + // } + // if (params.size && params.size[1] && typeof params.size[1] == 'object') { + // if (params.even) { + // sizeX = params.size[1] = $g.randByArraySeed(params.size[1], null, true); + // } else { + // sizeY = params.size[1] = $g.randByArraySeed(params.size[1], null, true); + // } + + // } else { + // sizeY = params.size; + // } var cellX = width / sizeX; var cellY = height / sizeY; @@ -2476,6 +2512,38 @@ }); + // xor texture + tgen.effect('xor', { + blend: "", + rgba: "randomalpha", + level: [1, 100], + zoom: [0.1, 77], + }, function ($g, params) { + + var width = $g.texture.width; + var height = $g.texture.height; + + if (params.zoom === undefined) { + params.zoom = $g.randIntSeed(1, 10); + } else if (typeof params.zoom == 'object') { + params.zoom = $g.randIntSeed(params.zoom[0], params.zoom[1]); + } + + for (var x = 0; x < width; x++) { + for (var y = 0; y < height; y++) { + + var color = (x * params.zoom) ^ y * (params.zoom); + $g.point.rgba = $g.point.colorize([color, color, color, 255], params.rgba, params.level); + //$g.point.rgba = [color, color, color, 255]; + $g.point.set(x, y); + + } + } + + return params; + + }); + // fractal [UNDER DEVELOPMENT] tgen.effect('mandelbrot', { blend: "opacity", @@ -2552,10 +2620,8 @@ }); -})('tgen'); -(function (fn) { - - var tgen = window[fn]; +})(SeamlessTextureGenerator); +(function (tgen) { var time; var fulltime; @@ -2583,10 +2649,8 @@ }); -})('tgen'); -(function (fn) { - - var tgen = window[fn]; +})(SeamlessTextureGenerator); +(function (tgen) { // opacity tgen.filter('opacity', { @@ -3112,10 +3176,8 @@ }); -})('tgen'); -(function (fn) { - - var tgen = window[fn]; +})(SeamlessTextureGenerator); +(function (tgen) { // layer copy to the current layer tgen.function('copy', { @@ -3273,10 +3335,8 @@ }); -})('tgen'); -(function (fn) { - - var tgen = window[fn]; +})(SeamlessTextureGenerator); +(function (tgen) { // rect tgen.shape('rect', function ($g, x, y, sizeX, sizeY, centered) { @@ -3321,11 +3381,12 @@ var dy = (y2 - y1) / d; var x = 0; var y = 0; + var i; - for (var i = 0; i < d; i++) { + for (i = 0; i < d; i++) { x = x1 + (dx * i); y = y1 + (dy * i); - $g.point.set(x, y) + $g.point.set(x, y); } }); @@ -3339,19 +3400,20 @@ var dy = (y2 - y1) / d; var x = 0; var y = 0; + var percent, index, w, i; var colorMapSize = colorMap.length; var weight = 7; - for (var i = 0; i < d; i++) { + for (i = 0; i < d; i++) { x = x1 + (dx * i); y = y1 + (dy * i); - var percent = i / d; - var index = parseInt(colorMapSize * percent); + percent = i / d; + index = parseInt(colorMapSize * percent); $g.point.rgba = colorMap[index]; - for (var w = 1; w <= weight; w++) { + for (w = 1; w <= weight; w++) { $g.point.set(x - w, y + w); } @@ -3362,25 +3424,27 @@ // sphere tgen.shape('sphere', function ($g, x1, y1, radius, centered, rgba, dynamicopacity) { + var c, o, h, x, y; + if (centered == undefined) { x1 = x1 + radius; y1 = y1 + radius; } - for (var x = -radius; x < radius; x++) { + for (x = -radius; x < radius; x++) { - var h = parseInt(Math.sqrt(radius * radius - x * x), 10); + h = parseInt(Math.sqrt(radius * radius - x * x), 10); - for (var y = -h; y < h; y++) { + for (y = -h; y < h; y++) { - var c = Math.min(255, Math.max(0, (255 - 255 * Math.sqrt((y * y) + (x * x)) / (radius / 2)))) / 255; + c = Math.min(255, Math.max(0, (255 - 255 * Math.sqrt((y * y) + (x * x)) / (radius / 2)))) / 255; if (c > 0) { if (dynamicopacity) { - var o = c * 255; + o = c * 255; } else { - var o = rgba[3]; + o = rgba[3]; } $g.point.rgba = [rgba[0] * c, rgba[1] * c, rgba[2] * c, o]; @@ -3398,25 +3462,26 @@ var halfX = parseInt(sizeX / 2, 10); var halfY = parseInt(sizeY / 2, 10); + var c, o, cx, cy, ix, iy; if (centered != true) { x = x + halfX; y = y + halfY; } - for (var ix = -halfX; ix < halfX; ix++) { - for (var iy = -halfY; iy < halfY; iy++) { + for (ix = -halfX; ix < halfX; ix++) { + for (iy = -halfY; iy < halfY; iy++) { - var cx = (0.25 - Math.abs(ix / sizeX)) * 255; - var cy = (0.25 - Math.abs(iy / sizeY)) * 255; - var c = cx + cy; + cx = (0.25 - Math.abs(ix / sizeX)) * 255; + cy = (0.25 - Math.abs(iy / sizeY)) * 255; + c = cx + cy; if (c > 1) { if (dynamicopacity) { - var o = c; + o = c; } else { - var o = rgba[3]; + o = rgba[3]; } $g.point.rgba = [(rgba[0] / 255) * c, (rgba[1] / 255) * c, (rgba[2] / 255) * c, o]; @@ -3429,22 +3494,20 @@ }); -})('tgen'); -(function (fn) { - - var tgen = window[fn]; - +})(SeamlessTextureGenerator); +(function (tgen) { // pattern test tgen.effect('test-pattern', {}, function ($g, params) { var width = $g.texture.width; var height = $g.texture.height; + var s; var check = function (x, y, rgba) { var color = $g.point.get(x, y); - for (key in rgba) { + for (var key in rgba) { if (rgba[key] != color[key]) { var msg = 'Not equal : ' + x + ' : ' + y + ' ' + JSON.stringify(rgba) + ', ' + JSON.stringify(color); @@ -3453,7 +3516,7 @@ } } - } + }; $g.point.blend = 'opacity'; @@ -3517,7 +3580,7 @@ $g.point.rgba = [255, 255, 155, 255]; $g.shape.rect($g, 1, 1, width - 2, height - 2); - var s = 20; + s = 20; $g.point.rgba = [0, 150, 0, 153]; $g.shape.rect($g, 2, 2, s, s); $g.shape.rect($g, width - s - 2, 2, s, s); @@ -3536,7 +3599,7 @@ check(2, 2, [38, 72, 165, 178]); - var s = 20; + s = 20; $g.point.rgba = [10, 10, 210, 250]; $g.shape.line($g, s, s, width - s, height - s); $g.shape.line($g, width - s, s, s, height - s); @@ -3617,4 +3680,4 @@ }); -})('tgen'); \ No newline at end of file +})(SeamlessTextureGenerator); \ No newline at end of file diff --git a/dist/tgen.min.js b/dist/tgen.min.js index 5297301..2fd348e 100644 --- a/dist/tgen.min.js +++ b/dist/tgen.min.js @@ -1,8 +1,8 @@ /** * seamless-texture-generator - Seamless texture generator * - * @version v1.1.12 - * @link https://texture-generator.com/ + * @version v1.1.15 + * @link https://github.com/schalkt/tgen/ * @license MIT */ -window.tgen={version:"1.1.12",defaults:{},effects:{},filters:[],functions:[],blends:{},shapes:{},colormaps:{},events:{beforeEffect:{},afterEffect:{},beforeRender:{},afterRender:{}},config:{historyLast:15,historyName:"history",historyList:[]},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},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(c,o,e){function s(){null==c&&(c=256),c<1&&(c=256),o<1&&(o=256),2048=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.canvas=function(e){for(var t=this.size(),r=e.getContext("2d").getImageData(0,0,this.width,this.height).data;t--;)u.texture.data[t]=r[t]},null===this.data&&this.clear()},u.texture=new u.buffer,u.layerCopy=function(e){for(var t=[],r=(e=this.layers[e]).length;r--;)t[r]=e[r];return t},u.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]},u.minMaxNormalize=function(e,t){return{min:Math.min(e,t),max:Math.max(e,t)}},u.randInt=function(e,t,r){var n=u.minMaxNormalize(e,t);return e=n.min,t=n.max,!0===r?(e=Math.round(e/2),t=Math.round(t/2),mul=2):mul=1,mul*(Math.floor(Math.random()*(t-e+1))+e)},u.randIntSeed=function(e,t,r){var n=u.minMaxNormalize(e,t);return e=n.min,t=n.max,!0===r?(e=Math.round(e/2),t=Math.round(t/2),mul=2):mul=1,mul*(Math.floor(u.calc.randomseed()*(t-e+1))+e)},u.randReal=function(e,t){var r=u.minMaxNormalize(e,t);return e=r.min,t=r.max,Math.random()*(t-e)+e},u.randRealSeed=function(e,t){var r=u.minMaxNormalize(e,t);return e=r.min,t=r.max,u.calc.randomseed()*(t-e)+e},u.randByArray=function(e,t){return"object"==typeof e&&(e=null!=t?u.randReal(e[0],e[1]):u.randInt(e[0],e[1])),e},u.randByArraySeed=function(e,t,r){return"object"==typeof e&&(e=null!=t?u.randRealSeed(e[0],e[1]):u.randIntSeed(e[0],e[1],r)),e},u.randItem=function(e){var t=e.length;return e[u.randIntSeed(0,t-1)]};var f=function(e){var t,r=0;for(var n in e)u.randRealSeed(0,1)<1/++r&&(t=n);return t};function h(e,t,r){if(void 0!==r&&(t=r(t)),t.count&&"object"==typeof t.count&&(t.count=u.randIntSeed(t.count[0],t.count[1])),t.level&&"object"==typeof t.level&&(t.level=u.randIntSeed(t.level[0],t.level[1])),t.opacity&&"object"==typeof t.opacity&&(t.opacity=u.randIntSeed(t.opacity[0],t.opacity[1])),"random"===t.blend&&(t.blend=f(l.blends)),"object"==typeof t.blend){var n=t.blend.length;t.blend=t.blend[u.randIntSeed(0,n-1)]}return void 0!==t.blend?u.point.blend=t.blend:u.point.blend="",t.rgba&&(t.rgba=u.rgba(t.rgba),u.point.rgba=[t.rgba[0],t.rgba[1],t.rgba[2],t.rgba[3]]),t.rgb&&(t.rgb=u.rgba(t.rgb),u.point.rgba=[t.rgb[0],t.rgb[1],t.rgb[2],255]),t}return u.rgba=function(e,t){return"random"===e?i(t):"randomalpha"===e?i(!0):("object"==typeof e[0]&&(e[0]=u.randIntSeed(e[0][0],e[0][1])),"object"==typeof e[1]&&(e[1]=u.randIntSeed(e[1][0],e[1][1])),"object"==typeof e[2]&&(e[2]=u.randIntSeed(e[2][0],e[2][1])),"object"==typeof e[3]&&(e[3]=u.randIntSeed(e[3][0],e[3][1])),e[3]%1!=0&&(e[3]=Math.round(255*e[3])),1==e[3]&&(e[3]=255),e)},u.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},u.calc={pi:3.1415927,luminance:function(e){return.21*e[0]+.72*e[1]+.07*e[2]},randomseed:function(e){null==this.seed&&(this.seed=u.randInt(1,16777216)),void 0!==e&&(this.seed=e);var t=1e4*Math.sin(this.seed++);return t-Math.floor(t)},normalize1:function(e){return u.calc.normalize(e,0,1)},normalize:function(e,t,r){return r=l.config.historyLast&&l.config.historyList.shift(),l.config.historyList.push(t),window.localStorage.setItem(l.config.historyName,JSON.stringify(l.config.historyList))}}},u.params=function(e){if(null==e){var t=new Date;e=t.getHours()+":"+t.getMinutes()+":"+t.getSeconds()+" l"+u.layers.length+" i"+n.length}return{name:e,version:l.version,width:c,height:o,normalize:u.normalize,items:n}},u.render=function(e,t){this.debug=!0===e.debug,u.event("beforeRender",e);var r=0;for(var n in null!=e.width&&(c=e.width),null!=e.height&&(o=e.height),null!=e.normalize?u.normalize=e.normalize:u.normalize="limitless",s(),u.texture=new u.buffer(e.background),1!=t&&u.clear(),e.items){d=e.items[n][0];var a=e.items[n][1],i=e.items[n][2];"random"==a&&(a=f(u.defaults)),"object"==typeof a&&(a=u.randItem(a)),r!=d&&(null!=u.layers[d]?u.texture.data=u.layers[d]:u.texture.clear(),r=d),null!=u[a]?u[a](i):null!=l.effects[a]?u.do(a,i):console.warn("undefined effect: "+a),u.layers[d]=u.texture.export()}return u.event("afterRender",u.params()),u.history.add(),this},u.event=function(e,t){for(var r in l.events[e]){var n=l.events[e][r];"function"==typeof n&&n(u,t)}},u.do=function(e,t){var r=t;return void 0===t?t=a({},l.defaults[e]):"object"==typeof t&&(t=a(l.defaults[e],t)),t.seed=t&&void 0!==t.seed&&null!==t.seed?t.seed:[1,16777216],t.seed=u.randByArray(t.seed),t=h(0,t),u.calc.randomseed(t.seed),u.event("beforeEffect",{layer:d,name:e,params:t}),"function"==typeof l.effects[e]?t=l.effects[e](u,t):console.warn("effect not callable: "+e),void 0===t&&(t=r),u.event("afterEffect",{layer:d,name:e,params:t}),!1!==t.store&&function(e,t){n.push([d,e,t])}(e,t),u},u}},function(){var e=window.tgen;e.blend("opacity",function(e,t,r){return r}),e.blend("multiply",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("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("difference",function(e,t,r){return r[0]=Math.abs(r[0]-t[0]),r[1]=Math.abs(r[1]-t[1]),r[2]=Math.abs(r[2]-t[2]),r}),e.blend("difference-invert",function(e,t,r){return r[0]=255-Math.abs(r[0]-t[0]),r[1]=255-Math.abs(r[1]-t[1]),r[2]=255-Math.abs(r[2]-t[2]),r}),e.blend("screen",function(e,t,r){return r[0]=255-(255-t[0])*(255-r[0])/255,r[1]=255-(255-t[1])*(255-r[1])/255,r[2]=255-(255-t[2])*(255-r[2])/255,r}),e.blend("overlay",function(e,t,r){return r[0]=128t[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]=128t.skip&&(e.point.rgba=[v%a*s,v%i*c,v%o*l,e.point.rgba[3]],e.point.set(m,b))}}return t})}(),function(){var n,a,e=window.tgen;e.event("beforeEffect","save start time",function(e,t){n=(new Date).getTime()}),e.event("afterEffect","log",function(e,t){var r=(new Date).getTime()-n;e.log(t.layer,r,t.name,t.params)}),e.event("beforeRender","log",function(e,t){a=(new Date).getTime()}),e.event("afterRender","log",function(e,t){var r=(new Date).getTime()-a;e.log(r,t)})}(),function(){var e=window.tgen;e.filter("opacity",{adjust:128},function(e,t){return e.walk(function(e){return e[3]=t.adjust,e}),t}),e.filter("vibrance",{adjust:128},function(e,t){var a=-1*t.adjust;return e.walk(function(e){var t=(e[0]+e[1]+e[2])/3,r=Math.max(e[0],e[1],e[2]),n=2*Math.abs(r-t)/255*a/100;return e[0]!==r&&(e[0]+=(r-e[0])*n),e[1]!==r&&(e[1]+=(r-e[1])*n),e[2]!==r&&(e[2]+=(r-e[2])*n),[e[0],e[1],e[2],e[3]]}),t}),e.filter("brightness",{adjust:50,legacy:!0},function(e,t){return!0===t.legacy?e.walk(function(e){return[Math.min(e[0]+t.adjust,255),Math.min(e[1]+t.adjust,255),Math.min(e[2]+t.adjust,255),e[3]]}):e.walk(function(e){return[e[0]=Math.min(255/e[0]*(t.adjust/255),255),e[1]=Math.min(255/e[1]*(t.adjust/255),255),e[2]=Math.min(255/e[2]*(t.adjust/255),255),e[3]]}),t}),e.filter("contrast",{adjust:50},function(e,t){var r=(100+t.adjust)/100;return e.walk(function(e){return e[0]=255*((e[0]/255-.5)*r+.5),e[1]=255*((e[1]/255-.5)*r+.5),e[2]=255*((e[2]/255-.5)*r+.5),[Math.max(Math.min(e[0],255),0),Math.max(Math.min(e[1],255),0),Math.max(Math.min(e[2],255),0),e[3]]}),t}),e.filter("threshold",{adjust:[64,128]},function(e,r){return r.adjust=e.randByArray(r.adjust),e.walk(function(e){var t=.2126*e[0]+.7152*e[1]+.0722*e[2]<=r.adjust?0:255;return[t,t,t,e[3]]}),r}),e.filter("gamma",{adjust:.5},function(e,t){return e.walk(function(e){return e[0]=255*Math.pow(e[0]/255,1/t.adjust),e[1]=255*Math.pow(e[1]/255,1/t.adjust),e[2]=255*Math.pow(e[2]/255,1/t.adjust),[e[0],e[1],e[2],e[3]]}),t}),e.filter("grayscale",{method:["ligthness","average","luminosity"]},function(r,e){switch("string"==typeof e&&(e={method:e}),"object"==typeof e.method&&(e.method=r.randItem(e.method)),e.method){case"ligthness":r.walk(function(e){var t=Math.max(e[0],e[1],e[2])+Math.min(e[0],e[1],e[2]);return[t,t,t,e[3]]});break;case"average":r.walk(function(e){var t=(e[0]+e[1]+e[2])/3;return[t,t,t,e[3]]});break;case"luminosity":r.walk(function(e){var t=r.calc.luminance(e);return[t,t,t,e[3]]})}return e}),e.filter("colorize",{level:50,rgba:"random",colormap:null},function(n,a){return n.colormap.init(a.colormap,255,function(e){a.colormap=e}),n.walk(function(e){if(n.colormap.data){var t=(e[0]+e[1]+e[2])/3,r=n.colormap.get(t,a.rgba);return r[3]=e[3],r}return n.point.colorize(e,a.rgba,a.level)}),a}),e.filter("invert",{channels:[1,1,1]},function(e,t){return e.walk(function(e){return[t.channels[0]?255-e[0]:e[0],t.channels[1]?255-e[1]:e[1],t.channels[2]?255-e[2]:e[2],e[3]]}),t}),e.filter("channel",{channels:[[.2,.8],[.4,1],[.8,1.2]]},function(e,t){return t.channels[0]=e.randByArray(t.channels[0],!0),t.channels[1]=e.randByArray(t.channels[1],!0),t.channels[2]=e.randByArray(t.channels[2],!0),e.walk(function(e){return[e[0]*t.channels[0],e[1]*t.channels[1],e[2]*t.channels[2],e[3]]}),t}),e.filter("backlight",{channels:[1,1,1]},function(e,t){return e.walk(function(e){return[t.channels[0]?255/e[0]*(255/e[0]):e[0],t.channels[1]?255/e[1]*(255/e[1]):e[1],t.channels[2]?255/e[2]*(255/e[2]):e[2],e[3]]}),t}),e.filter("sobel",{type:3},function(e,t){return e.do("convolute",{store:!1,transparent:!1,weights:"sobel"+t.type}),t}),e.filter("emboss",{type:2},function(e,t){return e.do("convolute",{store:!1,transparent:!1,weights:"emboss"+t.type}),t}),e.filter("edgedetect",{type:1},function(e,t){return e.do("convolute",{store:!1,transparent:!1,weights:"edgedetect"+t.type}),t}),e.filter("sharpen",{type:2},function(e,t){return e.do("convolute",{store:!1,transparent:!1,weights:"sharpen"+t.type}),t}),e.filter("blur",{},function(e,t){return e.do("convolute",{store:!1,transparent:!1,weights:[1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9]}),t}),e.filter("sinecolor",{sines:[1,7],channel:[0,2]},function(r,n){return n.sines=r.randByArray(n.sines),n.channel=r.randByArray(n.channel),r.walk(function(e){var t=parseInt(255*Math.sin(e[n.channel]*(r.calc.pi/180)*(255/360)*n.sines));return e[n.channel]=Math.abs(t),e}),n}),e.filter("convolute",{blend:"opacity",transparent:!1,weights:"default1"},function(e,t){if("object"!=typeof t.weights&&"string"!=typeof t.weights||null==t.weights)return t;if("string"==typeof t.weights[0]&&(t.weights=e.randByArray(t.weights)),"string"==typeof t.weights)if("random"===t.weights){var r=-32;t.weights=[e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32)],e.log(t.weights.join(", "))}else{var n={edgedetect1:[-1,-1,-1,-1,8,-1,-1,-1,-1],edgedetect2:[0,1,0,1,-4,1,0,1,0],edgedetect3:[1,0,-1,0,0,0,-1,0,1],sharpen1:[0,-1,0,-1,5,-1,0,-1,0],sharpen2:[-1,-1,-1,-1,9,-1,-1,-1,-1],emboss1:[1,1,1,1,.7,-1,-1,-1,-1],emboss2:[-2,-1,0,-1,1,1,0,1,2],emboss3:[10,3,-2,-8,-5,7,-3,-12,11],emboss4:[-6,11,-9,-9,0,-4,12,8,-2],sobel1:[-1,-2,-1,0,0,0,1,2,1],sobel2:[-1,0,1,-2,0,2,-1,0,1],sobel3:[-5,-8,12,-4,-8,-12,9,6,9],default1:[1,-11,-7,5,2,4,4,9,-2],default2:[-5,-21,25,22,31,-16,-2,-21,-10],default3:[1,1,1,1,1,1,1,1,1]};if(null==n[t.weights])return t;t.weights=n[t.weights]}var a=new e.buffer;a.clear();for(var i=Math.round(Math.sqrt(t.weights.length)),o=Math.floor(i/2),s=t.transparent?1:0,c=0;c>16));else f=s+d*t.xamount*n/(n*n);if(a%16==0)var h=e.wrapy(c+(u*t.yamount*a>>16));else h=c+u*t.yamount*a/(a*a);var p=e.point.get(f,h);r.data[l]=p[0],r.data[l+1]=p[1],r.data[l+2]=p[2],r.data[l+3]=p[3]}for(var g=e.texture.size();g--;)e.texture.data[g]=r.data[g];return t})}(),function(){var e=window.tgen;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;o=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.canvas=function(e){for(var t=this.size(),r=e.getContext("2d").getImageData(0,0,this.width,this.height).data;t--;)u.texture.data[t]=r[t]},null===this.data&&this.clear()},u.texture=new u.buffer,u.layerCopy=function(e){for(var t=[],r=(e=this.layers[e]).length;r--;)t[r]=e[r];return t},u.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]},u.minMaxNormalize=function(e,t){return{min:Math.min(e,t),max:Math.max(e,t)}},u.randInt=function(e,t,r){var n=u.minMaxNormalize(e,t);return e=n.min,t=n.max,!0===r?(e=Math.round(e/2),t=Math.round(t/2),mul=2):mul=1,mul*(Math.floor(Math.random()*(t-e+1))+e)},u.randIntSeed=function(e,t,r){var n=u.minMaxNormalize(e,t);return e=n.min,t=n.max,!0===r?(e=Math.round(e/2),t=Math.round(t/2),mul=2):mul=1,mul*(Math.floor(u.calc.randomseed()*(t-e+1))+e)},u.randReal=function(e,t){var r=u.minMaxNormalize(e,t);return e=r.min,t=r.max,Math.random()*(t-e)+e},u.randRealSeed=function(e,t){var r=u.minMaxNormalize(e,t);return e=r.min,t=r.max,u.calc.randomseed()*(t-e)+e},u.randByArray=function(e,t){return"object"==typeof e&&(e=null!=t?u.randReal(e[0],e[1]):u.randInt(e[0],e[1])),e},u.randByArraySeed=function(e,t,r){return"object"==typeof e&&(e=null!=t?u.randRealSeed(e[0],e[1]):u.randIntSeed(e[0],e[1],r)),e},u.randItem=function(e){var t=e.length;return e[u.randIntSeed(0,t-1)]};var f=function(e){var t,r=0;for(var n in e)u.randRealSeed(0,1)<1/++r&&(t=n);return t};function h(e,t,r){if(void 0!==r&&(t=r(t)),t.count&&"object"==typeof t.count&&(t.count=u.randIntSeed(t.count[0],t.count[1])),t.level&&"object"==typeof t.level&&(t.level=u.randIntSeed(t.level[0],t.level[1])),t.opacity&&"object"==typeof t.opacity&&(t.opacity=u.randIntSeed(t.opacity[0],t.opacity[1])),"random"===t.blend&&(t.blend=f(d.blends)),"object"==typeof t.blend){var n=t.blend.length;t.blend=t.blend[u.randIntSeed(0,n-1)]}return void 0!==t.blend?u.point.blend=t.blend:u.point.blend="",t.rgba&&(t.rgba=u.rgba(t.rgba),u.point.rgba=[t.rgba[0],t.rgba[1],t.rgba[2],t.rgba[3]]),t.rgb&&(t.rgb=u.rgba(t.rgb),u.point.rgba=[t.rgb[0],t.rgb[1],t.rgb[2],255]),t}return u.rgba=function(e,t){return"random"===e?i(t):"randomalpha"===e?i(!0):("object"==typeof e[0]&&(e[0]=u.randIntSeed(e[0][0],e[0][1])),"object"==typeof e[1]&&(e[1]=u.randIntSeed(e[1][0],e[1][1])),"object"==typeof e[2]&&(e[2]=u.randIntSeed(e[2][0],e[2][1])),"object"==typeof e[3]&&(e[3]=u.randIntSeed(e[3][0],e[3][1])),e[3]%1!=0&&(e[3]=Math.round(255*e[3])),1==e[3]&&(e[3]=255),e)},u.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},u.calc={pi:3.1415927,luminance:function(e){return.21*e[0]+.72*e[1]+.07*e[2]},randomseed:function(e){null==this.seed&&(this.seed=u.randInt(1,16777216)),void 0!==e&&(this.seed=e);var t=1e4*Math.sin(this.seed++);return t-Math.floor(t)},normalize1:function(e){return u.calc.normalize(e,0,1)},normalize:function(e,t,r){return r=d.config.historyLast&&d.config.historyList.shift(),d.config.historyList.push(t),window.localStorage.setItem(d.config.historyName,JSON.stringify(d.config.historyList))}}},u.params=function(e){if(null==e){var t=new Date;e=t.getHours()+":"+t.getMinutes()+":"+t.getSeconds()+" l"+u.layers.length+" i"+n.length}return{name:e,version:d.version,width:l,height:o,normalize:u.normalize,items:n}},u.render=function(e,t){this.debug=!0===e.debug,u.event("beforeRender",e);var r=0;for(var n in null!=e.width&&(l=e.width),null!=e.height&&(o=e.height),null!=e.normalize?u.normalize=e.normalize:u.normalize="limitless",s(),u.texture=new u.buffer(e.background),1!=t&&u.clear(),e.items){c=e.items[n][0];var a=e.items[n][1],i=e.items[n][2];"random"==a&&(a=f(u.defaults)),"object"==typeof a&&(a=u.randItem(a)),r!=c&&(null!=u.layers[c]?u.texture.data=u.layers[c]:u.texture.clear(),r=c),null!=u[a]?u[a](i):null!=d.effects[a]?u.do(a,i):console.warn("undefined effect: "+a),u.layers[c]=u.texture.export()}return u.event("afterRender",u.params()),u.history.add(),this},u.event=function(e,t){for(var r in d.events[e]){var n=d.events[e][r];"function"==typeof n&&n(u,t)}},u.do=function(e,t){var r=t;return void 0===t?t=a({},d.defaults[e]):"object"==typeof t&&(t=a(d.defaults[e],t)),t.seed=t&&void 0!==t.seed&&null!==t.seed?t.seed:[1,16777216],t.seed=u.randByArray(t.seed),t=h(0,t),u.calc.randomseed(t.seed),u.event("beforeEffect",{layer:c,name:e,params:t}),"function"==typeof d.effects[e]?t=d.effects[e](u,t):console.warn("effect not callable: "+e),void 0===t&&(t=r),u.event("afterEffect",{layer:c,name:e,params:t}),!1!==t.store&&function(e,t){n.push([c,e,t])}(e,t),u},u}};"undefined"!=typeof module&&void 0!==module.exports?module.exports=SeamlessTextureGenerator:"function"==typeof define&&define.amd?define([],function(){return SeamlessTextureGenerator}):window.tgen=SeamlessTextureGenerator,function(e){e.blend("opacity",function(e,t,r){return r}),e.blend("multiply",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("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("difference",function(e,t,r){return r[0]=Math.abs(r[0]-t[0]),r[1]=Math.abs(r[1]-t[1]),r[2]=Math.abs(r[2]-t[2]),r}),e.blend("difference-invert",function(e,t,r){return r[0]=255-Math.abs(r[0]-t[0]),r[1]=255-Math.abs(r[1]-t[1]),r[2]=255-Math.abs(r[2]-t[2]),r}),e.blend("screen",function(e,t,r){return r[0]=255-(255-t[0])*(255-r[0])/255,r[1]=255-(255-t[1])*(255-r[1])/255,r[2]=255-(255-t[2])*(255-r[2])/255,r}),e.blend("overlay",function(e,t,r){return r[0]=128t[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]=128t.skip&&(e.point.rgba=[v%a*s,v%i*c,v%o*l,e.point.rgba[3]],e.point.set(m,b))}}return t})}(SeamlessTextureGenerator),function(e){var n,a;e.event("beforeEffect","save start time",function(e,t){n=(new Date).getTime()}),e.event("afterEffect","log",function(e,t){var r=(new Date).getTime()-n;e.log(t.layer,r,t.name,t.params)}),e.event("beforeRender","log",function(e,t){a=(new Date).getTime()}),e.event("afterRender","log",function(e,t){var r=(new Date).getTime()-a;e.log(r,t)})}(SeamlessTextureGenerator),function(e){e.filter("opacity",{adjust:128},function(e,t){return e.walk(function(e){return e[3]=t.adjust,e}),t}),e.filter("vibrance",{adjust:128},function(e,t){var a=-1*t.adjust;return e.walk(function(e){var t=(e[0]+e[1]+e[2])/3,r=Math.max(e[0],e[1],e[2]),n=2*Math.abs(r-t)/255*a/100;return e[0]!==r&&(e[0]+=(r-e[0])*n),e[1]!==r&&(e[1]+=(r-e[1])*n),e[2]!==r&&(e[2]+=(r-e[2])*n),[e[0],e[1],e[2],e[3]]}),t}),e.filter("brightness",{adjust:50,legacy:!0},function(e,t){return!0===t.legacy?e.walk(function(e){return[Math.min(e[0]+t.adjust,255),Math.min(e[1]+t.adjust,255),Math.min(e[2]+t.adjust,255),e[3]]}):e.walk(function(e){return[e[0]=Math.min(255/e[0]*(t.adjust/255),255),e[1]=Math.min(255/e[1]*(t.adjust/255),255),e[2]=Math.min(255/e[2]*(t.adjust/255),255),e[3]]}),t}),e.filter("contrast",{adjust:50},function(e,t){var r=(100+t.adjust)/100;return e.walk(function(e){return e[0]=255*((e[0]/255-.5)*r+.5),e[1]=255*((e[1]/255-.5)*r+.5),e[2]=255*((e[2]/255-.5)*r+.5),[Math.max(Math.min(e[0],255),0),Math.max(Math.min(e[1],255),0),Math.max(Math.min(e[2],255),0),e[3]]}),t}),e.filter("threshold",{adjust:[64,128]},function(e,r){return r.adjust=e.randByArray(r.adjust),e.walk(function(e){var t=.2126*e[0]+.7152*e[1]+.0722*e[2]<=r.adjust?0:255;return[t,t,t,e[3]]}),r}),e.filter("gamma",{adjust:.5},function(e,t){return e.walk(function(e){return e[0]=255*Math.pow(e[0]/255,1/t.adjust),e[1]=255*Math.pow(e[1]/255,1/t.adjust),e[2]=255*Math.pow(e[2]/255,1/t.adjust),[e[0],e[1],e[2],e[3]]}),t}),e.filter("grayscale",{method:["ligthness","average","luminosity"]},function(r,e){switch("string"==typeof e&&(e={method:e}),"object"==typeof e.method&&(e.method=r.randItem(e.method)),e.method){case"ligthness":r.walk(function(e){var t=Math.max(e[0],e[1],e[2])+Math.min(e[0],e[1],e[2]);return[t,t,t,e[3]]});break;case"average":r.walk(function(e){var t=(e[0]+e[1]+e[2])/3;return[t,t,t,e[3]]});break;case"luminosity":r.walk(function(e){var t=r.calc.luminance(e);return[t,t,t,e[3]]})}return e}),e.filter("colorize",{level:50,rgba:"random",colormap:null},function(n,a){return n.colormap.init(a.colormap,255,function(e){a.colormap=e}),n.walk(function(e){if(n.colormap.data){var t=(e[0]+e[1]+e[2])/3,r=n.colormap.get(t,a.rgba);return r[3]=e[3],r}return n.point.colorize(e,a.rgba,a.level)}),a}),e.filter("invert",{channels:[1,1,1]},function(e,t){return e.walk(function(e){return[t.channels[0]?255-e[0]:e[0],t.channels[1]?255-e[1]:e[1],t.channels[2]?255-e[2]:e[2],e[3]]}),t}),e.filter("channel",{channels:[[.2,.8],[.4,1],[.8,1.2]]},function(e,t){return t.channels[0]=e.randByArray(t.channels[0],!0),t.channels[1]=e.randByArray(t.channels[1],!0),t.channels[2]=e.randByArray(t.channels[2],!0),e.walk(function(e){return[e[0]*t.channels[0],e[1]*t.channels[1],e[2]*t.channels[2],e[3]]}),t}),e.filter("backlight",{channels:[1,1,1]},function(e,t){return e.walk(function(e){return[t.channels[0]?255/e[0]*(255/e[0]):e[0],t.channels[1]?255/e[1]*(255/e[1]):e[1],t.channels[2]?255/e[2]*(255/e[2]):e[2],e[3]]}),t}),e.filter("sobel",{type:3},function(e,t){return e.do("convolute",{store:!1,transparent:!1,weights:"sobel"+t.type}),t}),e.filter("emboss",{type:2},function(e,t){return e.do("convolute",{store:!1,transparent:!1,weights:"emboss"+t.type}),t}),e.filter("edgedetect",{type:1},function(e,t){return e.do("convolute",{store:!1,transparent:!1,weights:"edgedetect"+t.type}),t}),e.filter("sharpen",{type:2},function(e,t){return e.do("convolute",{store:!1,transparent:!1,weights:"sharpen"+t.type}),t}),e.filter("blur",{},function(e,t){return e.do("convolute",{store:!1,transparent:!1,weights:[1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9]}),t}),e.filter("sinecolor",{sines:[1,7],channel:[0,2]},function(r,n){return n.sines=r.randByArray(n.sines),n.channel=r.randByArray(n.channel),r.walk(function(e){var t=parseInt(255*Math.sin(e[n.channel]*(r.calc.pi/180)*(255/360)*n.sines));return e[n.channel]=Math.abs(t),e}),n}),e.filter("convolute",{blend:"opacity",transparent:!1,weights:"default1"},function(e,t){if("object"!=typeof t.weights&&"string"!=typeof t.weights||null==t.weights)return t;if("string"==typeof t.weights[0]&&(t.weights=e.randByArray(t.weights)),"string"==typeof t.weights)if("random"===t.weights){var r=-32;t.weights=[e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32)],e.log(t.weights.join(", "))}else{var n={edgedetect1:[-1,-1,-1,-1,8,-1,-1,-1,-1],edgedetect2:[0,1,0,1,-4,1,0,1,0],edgedetect3:[1,0,-1,0,0,0,-1,0,1],sharpen1:[0,-1,0,-1,5,-1,0,-1,0],sharpen2:[-1,-1,-1,-1,9,-1,-1,-1,-1],emboss1:[1,1,1,1,.7,-1,-1,-1,-1],emboss2:[-2,-1,0,-1,1,1,0,1,2],emboss3:[10,3,-2,-8,-5,7,-3,-12,11],emboss4:[-6,11,-9,-9,0,-4,12,8,-2],sobel1:[-1,-2,-1,0,0,0,1,2,1],sobel2:[-1,0,1,-2,0,2,-1,0,1],sobel3:[-5,-8,12,-4,-8,-12,9,6,9],default1:[1,-11,-7,5,2,4,4,9,-2],default2:[-5,-21,25,22,31,-16,-2,-21,-10],default3:[1,1,1,1,1,1,1,1,1]};if(null==n[t.weights])return t;t.weights=n[t.weights]}var a=new e.buffer;a.clear();for(var i=Math.round(Math.sqrt(t.weights.length)),o=Math.floor(i/2),s=t.transparent?1:0,c=0;c>16));else f=s+d*t.xamount*n/(n*n);if(a%16==0)var h=e.wrapy(c+(u*t.yamount*a>>16));else h=c+u*t.yamount*a/(a*a);var p=e.point.get(f,h);r.data[l]=p[0],r.data[l+1]=p[1],r.data[l+2]=p[2],r.data[l+3]=p[3]}for(var g=e.texture.size();g--;)e.texture.data[g]=r.data[g];return t})}(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;oTJ-SI@b9aslN6&~rJu*o@E@**S0#^j zDKE=W#oww!!ABdO@gl17;%apDXPJ2=Gp}?eR>lAS(1zFcjq zYG2MLlTA`>56|N`-%ZMR8>L^WNd;ggvSiG&l3)Glr@z4ac)!1>=4%J5y{ znhyl70bBEz=#WQ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xD10til0FJ@pATwJwR>u zcT~n*5J#m!+`{e)>=ag>*jG;^bbhcPW>{>Jd4*t4XWo=rTj1Yzxd}QPi6cm_AD}2c zbg%*Q9vJ3#@BETqN)mAv2_WRp~~1Vx6og=^n2ZEo1U8B zZ&zWkl?qv`7TYcHjs)faBdN6llw0W?C4xo?r3QOTjJj(v6KbuTiWb)eWwA_Gr)E4^ z4BcSev4!s{yCXhxYI57rasg)6PlS-cB)o#%k#vm@^>F($I_evlOgQc6wn#)S{S<}g zt*k|~`tXZ{u3x>N?{|E^7(w%fK>O~@%dp6=lPGgeC!pKXaORp;E>vgqF= max) { - var smax = Math.floor(s) * (max); - var sval = (val - smax); + smax = Math.floor(s) * (max); + sval = (val - smax); return sval; } if (val < 0) { - var smax = Math.ceil(s) * (max); - var sval = max - Math.abs((val - smax)); + smax = Math.ceil(s) * (max); + sval = max - Math.abs((val - smax)); if (sval >= max) { sval = (sval - max); return sval; @@ -422,7 +424,8 @@ } return mul * (Math.floor(Math.random() * (max - min + 1)) + min); - } + + }, // random int min max by seed generator.randIntSeed = function (min, max, even) { @@ -441,7 +444,7 @@ return mul * (Math.floor(generator.calc.randomseed() * (max - min + 1)) + min); - } + }, // random real min max generator.randReal = function (min, max) { @@ -449,7 +452,7 @@ min = norm.min; max = norm.max; return Math.random() * (max - min) + min; - }; + }, // random real min max by seed generator.randRealSeed = function (min, max) { @@ -457,7 +460,7 @@ min = norm.min; max = norm.max; return generator.calc.randomseed() * (max - min) + min; - }; + }, generator.randByArray = function (data, real) { @@ -473,7 +476,7 @@ return data; - } + }, generator.randByArraySeed = function (data, real, even) { @@ -489,7 +492,7 @@ return data; - } + }; // random color @@ -504,19 +507,19 @@ return [generator.randIntSeed(0, 255), generator.randIntSeed(0, 255), generator.randIntSeed(0, 255), opacity]; - } + }; // get random blend mode var randBlend = function () { return randProperty(self.blends); - } + }; // get random array item generator.randItem = function (array) { var count = array.length; var index = generator.randIntSeed(0, count - 1); return array[index]; - } + }; // get random property from object @@ -532,7 +535,7 @@ return result; - } + }; // set rgba color - if the channel is an array then random generator.rgba = function (rgba, alpha) { @@ -633,7 +636,7 @@ // store generated texture params for save var store = function (type, params) { - rendered.push([layer, type, params]) + rendered.push([layer, type, params]); }; @@ -743,7 +746,7 @@ } - } + }; generator.colormap = { @@ -766,7 +769,7 @@ if (typeof colormap[0] == 'object') { // by items rgba - for (key in colormap) { + for (var key in colormap) { var item = colormap[key]; item.rgba = generator.rgba(item.rgba); colormap[key] = item; @@ -783,12 +786,13 @@ if (colormap === 'random') { var count = generator.randIntSeed(1, 4); - var colormap = []; + colormap = []; + for (var i = 0; i <= count; i++) { colormap[i] = { percent: parseInt((i / count) * 100), rgba: [generator.randIntSeed(0, 255), generator.randIntSeed(0, 255), generator.randIntSeed(0, 255), 255] - } + }; } } @@ -966,7 +970,7 @@ } - } + }; // read and modify all pixel by callback function generator.walk = function (func) { @@ -982,24 +986,24 @@ } } - } + }; // for percent calculations generator.percent = function (c, max) { return parseInt((c / 100) * max, 10); - } + }; generator.percentX = function (c) { return parseInt((c / 100) * width, 10); - } + }; generator.percentY = function (c) { return parseInt((c / 100) * height, 10); - } + }; generator.percentXY = function (c) { return parseInt((c / 100) * wha, 10); - } + }; generator.xysize = function (i, params) { @@ -1034,7 +1038,7 @@ size: size }; - } + }; // copy texture to image @@ -1071,6 +1075,7 @@ context.putImageData(imageData, 0, 0); return canvas; + }; // get canvas @@ -1105,7 +1110,7 @@ return this; - } + }; // stat generator.stat = function (func) { @@ -1119,7 +1124,7 @@ return this; - } + }; // save to localstorage @@ -1128,7 +1133,7 @@ available: function () { try { - return 'localStorage' in window && window['localStorage'] !== null && window['localStorage'] !== undefined; + return window && 'localStorage' in window && window['localStorage'] !== null && window['localStorage'] !== undefined; } catch (e) { return false; } @@ -1193,7 +1198,7 @@ } - } + }; generator.params = function (name) { @@ -1212,9 +1217,9 @@ "height": height, "normalize": generator.normalize, "items": rendered - } + }; - } + }; // parse params generator.render = function (config, noclear) { @@ -1367,7 +1372,27 @@ // the generator object return generator; } - } + }; + +})('tgen'); -})('tgen'); \ No newline at end of file + +if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') { + + module.exports = SeamlessTextureGenerator; + +} else { + + if (typeof define === 'function' && define.amd) { + + define([], function() { + return SeamlessTextureGenerator; + }); + + } else { + + window.tgen = SeamlessTextureGenerator; + + } +} \ No newline at end of file diff --git a/src/tgen-blends.js b/src/tgen-blends.js index 7164536..8b88d9b 100644 --- a/src/tgen-blends.js +++ b/src/tgen-blends.js @@ -1,6 +1,4 @@ -(function (fn) { - - var tgen = window[fn]; +(function (tgen) { // opacity tgen.blend('opacity', function ($g, current, input) { @@ -200,4 +198,4 @@ }); -})('tgen'); \ No newline at end of file +})(SeamlessTextureGenerator); \ No newline at end of file diff --git a/src/tgen-colormaps.js b/src/tgen-colormaps.js index 06868de..0191faa 100644 --- a/src/tgen-colormaps.js +++ b/src/tgen-colormaps.js @@ -1,6 +1,4 @@ -(function (fn) { - - var tgen = window[fn]; +(function (tgen) { // dawn tgen.colormap('blackwhite', function () { @@ -108,4 +106,4 @@ }); -})('tgen'); \ No newline at end of file +})(SeamlessTextureGenerator); \ No newline at end of file diff --git a/src/tgen-effects.js b/src/tgen-effects.js index fe33d76..98d339e 100644 --- a/src/tgen-effects.js +++ b/src/tgen-effects.js @@ -1,7 +1,4 @@ -(function (fn) { - - var tgen = window[fn]; - +(function (tgen) { var blendSafe = [ "average", @@ -647,8 +644,8 @@ rgba: "randomalpha", even: "random", size: [ - [2,32], - [2,32], + [2, 32], + [2, 32], ], }, function ($g, params) { @@ -660,31 +657,49 @@ var height = $g.texture.height; var sizeX, sizeY; - if (params.size && params.size[0] && typeof params.size[0] == 'object') { + if (typeof params.size === 'number') { + + sizeX = sizeY = params.size; - if (params.even) { - sizeX = params.size[0] = $g.randByArraySeed(params.size[0], null, true); - } else { + } else { + + if (typeof params.size[0] == 'object') { sizeX = params.size[0] = $g.randByArraySeed(params.size[0], null, true); + } else { + sizeX = params.size[0]; + } + + if (typeof params.size[1] == 'object') { + sizeY = params.size[1] = $g.randByArraySeed(params.size[1], null, true); + } else { + sizeY = params.size[1]; } - } else { - sizeX = params.size[0]; } - if (params.size && params.size[1] && typeof params.size[1] == 'object') { + // if (params.size && params.size[0] && typeof params.size[0] == 'object') { - if (params.even) { - sizeX = params.size[1] = $g.randByArraySeed(params.size[1], null, true); - } else { - sizeY = params.size[1] = $g.randByArraySeed(params.size[1], null, true); - } + // if (params.even) { + // sizeX = params.size[0] = $g.randByArraySeed(params.size[0], null, true); + // } else { + // sizeY = params.size[0] = $g.randByArraySeed(params.size[0], null, true); + // } - } else { - sizeY = params.size[1]; - } + // } else { + // sizeX = params.size; + // } + // if (params.size && params.size[1] && typeof params.size[1] == 'object') { + // if (params.even) { + // sizeX = params.size[1] = $g.randByArraySeed(params.size[1], null, true); + // } else { + // sizeY = params.size[1] = $g.randByArraySeed(params.size[1], null, true); + // } + + // } else { + // sizeY = params.size; + // } var cellX = width / sizeX; var cellY = height / sizeY; @@ -789,6 +804,38 @@ }); + // xor texture + tgen.effect('xor', { + blend: "", + rgba: "randomalpha", + level: [1, 100], + zoom: [0.1, 77], + }, function ($g, params) { + + var width = $g.texture.width; + var height = $g.texture.height; + + if (params.zoom === undefined) { + params.zoom = $g.randIntSeed(1, 10); + } else if (typeof params.zoom == 'object') { + params.zoom = $g.randIntSeed(params.zoom[0], params.zoom[1]); + } + + for (var x = 0; x < width; x++) { + for (var y = 0; y < height; y++) { + + var color = (x * params.zoom) ^ y * (params.zoom); + $g.point.rgba = $g.point.colorize([color, color, color, 255], params.rgba, params.level); + //$g.point.rgba = [color, color, color, 255]; + $g.point.set(x, y); + + } + } + + return params; + + }); + // fractal [UNDER DEVELOPMENT] tgen.effect('mandelbrot', { blend: "opacity", @@ -865,4 +912,4 @@ }); -})('tgen'); \ No newline at end of file +})(SeamlessTextureGenerator); \ No newline at end of file diff --git a/src/tgen-events.js b/src/tgen-events.js index a31576b..b2085d7 100644 --- a/src/tgen-events.js +++ b/src/tgen-events.js @@ -1,6 +1,4 @@ -(function (fn) { - - var tgen = window[fn]; +(function (tgen) { var time; var fulltime; @@ -28,4 +26,4 @@ }); -})('tgen'); \ No newline at end of file +})(SeamlessTextureGenerator); \ No newline at end of file diff --git a/src/tgen-filters.js b/src/tgen-filters.js index 9bdf74f..564b9a2 100644 --- a/src/tgen-filters.js +++ b/src/tgen-filters.js @@ -1,6 +1,4 @@ -(function (fn) { - - var tgen = window[fn]; +(function (tgen) { // opacity tgen.filter('opacity', { @@ -526,4 +524,4 @@ }); -})('tgen'); \ No newline at end of file +})(SeamlessTextureGenerator); \ No newline at end of file diff --git a/src/tgen-functions.js b/src/tgen-functions.js index af2b3a3..dea8ec4 100644 --- a/src/tgen-functions.js +++ b/src/tgen-functions.js @@ -1,6 +1,4 @@ -(function (fn) { - - var tgen = window[fn]; +(function (tgen) { // layer copy to the current layer tgen.function('copy', { @@ -158,4 +156,4 @@ }); -})('tgen'); \ No newline at end of file +})(SeamlessTextureGenerator); \ No newline at end of file diff --git a/src/tgen-shapes.js b/src/tgen-shapes.js index ce5ff6f..b18caf9 100644 --- a/src/tgen-shapes.js +++ b/src/tgen-shapes.js @@ -1,6 +1,4 @@ -(function (fn) { - - var tgen = window[fn]; +(function (tgen) { // rect tgen.shape('rect', function ($g, x, y, sizeX, sizeY, centered) { @@ -45,11 +43,12 @@ var dy = (y2 - y1) / d; var x = 0; var y = 0; + var i; - for (var i = 0; i < d; i++) { + for (i = 0; i < d; i++) { x = x1 + (dx * i); y = y1 + (dy * i); - $g.point.set(x, y) + $g.point.set(x, y); } }); @@ -63,19 +62,20 @@ var dy = (y2 - y1) / d; var x = 0; var y = 0; + var percent, index, w, i; var colorMapSize = colorMap.length; var weight = 7; - for (var i = 0; i < d; i++) { + for (i = 0; i < d; i++) { x = x1 + (dx * i); y = y1 + (dy * i); - var percent = i / d; - var index = parseInt(colorMapSize * percent); + percent = i / d; + index = parseInt(colorMapSize * percent); $g.point.rgba = colorMap[index]; - for (var w = 1; w <= weight; w++) { + for (w = 1; w <= weight; w++) { $g.point.set(x - w, y + w); } @@ -86,25 +86,27 @@ // sphere tgen.shape('sphere', function ($g, x1, y1, radius, centered, rgba, dynamicopacity) { + var c, o, h, x, y; + if (centered == undefined) { x1 = x1 + radius; y1 = y1 + radius; } - for (var x = -radius; x < radius; x++) { + for (x = -radius; x < radius; x++) { - var h = parseInt(Math.sqrt(radius * radius - x * x), 10); + h = parseInt(Math.sqrt(radius * radius - x * x), 10); - for (var y = -h; y < h; y++) { + for (y = -h; y < h; y++) { - var c = Math.min(255, Math.max(0, (255 - 255 * Math.sqrt((y * y) + (x * x)) / (radius / 2)))) / 255; + c = Math.min(255, Math.max(0, (255 - 255 * Math.sqrt((y * y) + (x * x)) / (radius / 2)))) / 255; if (c > 0) { if (dynamicopacity) { - var o = c * 255; + o = c * 255; } else { - var o = rgba[3]; + o = rgba[3]; } $g.point.rgba = [rgba[0] * c, rgba[1] * c, rgba[2] * c, o]; @@ -122,25 +124,26 @@ var halfX = parseInt(sizeX / 2, 10); var halfY = parseInt(sizeY / 2, 10); + var c, o, cx, cy, ix, iy; if (centered != true) { x = x + halfX; y = y + halfY; } - for (var ix = -halfX; ix < halfX; ix++) { - for (var iy = -halfY; iy < halfY; iy++) { + for (ix = -halfX; ix < halfX; ix++) { + for (iy = -halfY; iy < halfY; iy++) { - var cx = (0.25 - Math.abs(ix / sizeX)) * 255; - var cy = (0.25 - Math.abs(iy / sizeY)) * 255; - var c = cx + cy; + cx = (0.25 - Math.abs(ix / sizeX)) * 255; + cy = (0.25 - Math.abs(iy / sizeY)) * 255; + c = cx + cy; if (c > 1) { if (dynamicopacity) { - var o = c; + o = c; } else { - var o = rgba[3]; + o = rgba[3]; } $g.point.rgba = [(rgba[0] / 255) * c, (rgba[1] / 255) * c, (rgba[2] / 255) * c, o]; @@ -153,4 +156,4 @@ }); -})('tgen'); \ No newline at end of file +})(SeamlessTextureGenerator); \ No newline at end of file diff --git a/src/tgen-tests.js b/src/tgen-tests.js index 73f3086..b183638 100644 --- a/src/tgen-tests.js +++ b/src/tgen-tests.js @@ -1,18 +1,16 @@ -(function (fn) { - - var tgen = window[fn]; - +(function (tgen) { // pattern test tgen.effect('test-pattern', {}, function ($g, params) { var width = $g.texture.width; var height = $g.texture.height; + var s; var check = function (x, y, rgba) { var color = $g.point.get(x, y); - for (key in rgba) { + for (var key in rgba) { if (rgba[key] != color[key]) { var msg = 'Not equal : ' + x + ' : ' + y + ' ' + JSON.stringify(rgba) + ', ' + JSON.stringify(color); @@ -21,7 +19,7 @@ } } - } + }; $g.point.blend = 'opacity'; @@ -85,7 +83,7 @@ $g.point.rgba = [255, 255, 155, 255]; $g.shape.rect($g, 1, 1, width - 2, height - 2); - var s = 20; + s = 20; $g.point.rgba = [0, 150, 0, 153]; $g.shape.rect($g, 2, 2, s, s); $g.shape.rect($g, width - s - 2, 2, s, s); @@ -104,7 +102,7 @@ check(2, 2, [38, 72, 165, 178]); - var s = 20; + s = 20; $g.point.rgba = [10, 10, 210, 250]; $g.shape.line($g, s, s, width - s, height - s); $g.shape.line($g, width - s, s, s, height - s); @@ -185,4 +183,4 @@ }); -})('tgen'); \ No newline at end of file +})(SeamlessTextureGenerator); \ No newline at end of file diff --git a/test/test.js b/test/test.js new file mode 100644 index 0000000..6d0a027 --- /dev/null +++ b/test/test.js @@ -0,0 +1,250 @@ +var assert = require('assert'); +var tgen = require('./../dist/tgen'); +var fs = require('fs'); +var PNG = require('pngjs').PNG; + +var size = 64; // DON'T TOUCH +var PNGOptions = { + filterType: 0, + width: size, + height: size, + colorType: 6, + inputColorType: 6, + bitDepth: 8, +}; + +describe('tgen', function () { + + describe('init', function () { + + it('version ok', function () { + assert.notEqual(tgen.version, null); + }); + + it('generator ok', function () { + + var generator = tgen.init(); + + assert.notEqual(generator, null); + assert.notEqual(generator.shape.rect, null); + assert.notEqual(generator.shape.circle, null); + assert.notEqual(generator.shape.line, null); + assert.notEqual(generator.shape.colorLine, null); + assert.notEqual(generator.shape.sphere, null); + assert.notEqual(generator.shape.pyramid, null); + + }); + + }); + + describe('textures', function () { + + it('waves', function () { + + var generator = tgen.init(size, size, 'pingpong'); + var texture = generator.do('waves', { + blend: 'screen', + rgba: [255, 128, 64, 1], + level: 50, + xsines: 4, + ysines: 4 + }); + + var params = texture.params(); + + assert.equal(params.width, size); + assert.equal(params.height, size); + assert.equal(params.normalize, 'pingpong'); + assert.equal(params.items[0][1], 'waves'); + assert.equal(params.items[0][2].blend, 'screen'); + assert.equal(params.items[0][2].level, 50); + assert.equal(params.items[0][2].xsines, 4); + assert.equal(params.items[0][2].ysines, 4); + + assert.equal(texture.texture.data[0], 191); + assert.equal(texture.texture.data[1], 127.5); + assert.equal(texture.texture.data[2], 95.5); + assert.equal(texture.texture.data[3], 255); + + assert.equal(texture.texture.data[4], 203.1501922607422); + assert.equal(texture.texture.data[5], 139.6501922607422); + assert.equal(texture.texture.data[6], 107.65019989013672); + assert.equal(texture.texture.data[7], 255); + + var file = new PNG(PNGOptions); + file.data = texture.texture.data; + file.pack().pipe(fs.createWriteStream('./test/waves.png')); + + }); + + it('clouds', function () { + + var generator = tgen.init(size, size, 'pingpong'); + var texture = generator.do('clouds', { + blend: 'screen', + rgba: [32, 64, 128, 1], + roughness: 2, + seed: 777 + }); + + var params = texture.params(); + + assert.equal(params.width, size); + assert.equal(params.height, size); + assert.equal(params.normalize, 'pingpong'); + assert.equal(params.items[0][1], 'clouds'); + assert.equal(params.items[0][2].blend, 'screen'); + assert.equal(params.items[0][2].roughness, 2); + assert.equal(params.items[0][2].seed, 777); + + assert.equal(texture.texture.data[0], 16); + assert.equal(texture.texture.data[1], 32); + assert.equal(texture.texture.data[2], 64); + assert.equal(texture.texture.data[3], 255); + + assert.equal(texture.texture.data[4], 29.5); + assert.equal(texture.texture.data[5], 45.5); + assert.equal(texture.texture.data[6], 77.5); + assert.equal(texture.texture.data[7], 255); + + var file = new PNG(PNGOptions); + file.data = texture.texture.data; + file.pack().pipe(fs.createWriteStream('./test/clouds.png')); + + }); + + it('spheres', function () { + + var generator = tgen.init(size, size, 'limitless'); + var texture = generator.do('spheres', { + blend: 'lighten', + rgba: [32, 64, 128, 1], + dynamic: false, + count: 7, + size: [ + 42, + 77 + ], + seed: 777 + }); + + var params = texture.params(); + + assert.equal(params.width, size); + assert.equal(params.height, size); + assert.equal(params.normalize, 'limitless'); + assert.equal(params.items[0][1], 'spheres'); + assert.equal(params.items[0][2].blend, 'lighten'); + assert.equal(params.items[0][2].dynamic, false); + assert.equal(params.items[0][2].count, 7); + assert.equal(params.items[0][2].size[0], 42); + assert.equal(params.items[0][2].size[1], 77); + assert.equal(params.items[0][2].seed, 777); + + assert.equal(texture.texture.data[0], 17.248729705810547); + assert.equal(texture.texture.data[1], 34.497459411621094); + assert.equal(texture.texture.data[2], 68.99491882324219); + assert.equal(texture.texture.data[3], 255); + + assert.equal(texture.texture.data[4], 18.42354965209961); + assert.equal(texture.texture.data[5], 36.84709930419922); + assert.equal(texture.texture.data[6], 73.69419860839844); + assert.equal(texture.texture.data[7], 255); + + var file = new PNG(PNGOptions); + file.data = texture.texture.data; + file.pack().pipe(fs.createWriteStream('./test/spheres.png')); + + }); + + it('pyramids', function () { + + var generator = tgen.init(size, size, 'limitless'); + var texture = generator.do('pyramids', { + blend: 'difference', + rgba: [32, 255, 128, 1], + dynamic: false, + count: 7, + size: [ + 42, + 77 + ], + seed: 777 + }); + + var params = texture.params(); + + assert.equal(params.width, size); + assert.equal(params.height, size); + assert.equal(params.normalize, 'limitless'); + assert.equal(params.items[0][1], 'pyramids'); + assert.equal(params.items[0][2].blend, 'difference'); + assert.equal(params.items[0][2].dynamic, false); + assert.equal(params.items[0][2].count, 7); + assert.equal(params.items[0][2].size[0], 42); + assert.equal(params.items[0][2].size[1], 77); + assert.equal(params.items[0][2].seed, 777); + + assert.equal(texture.texture.data[0], 5.599999904632568); + assert.equal(texture.texture.data[1], 44.625); + assert.equal(texture.texture.data[2], 22.399999618530273); + assert.equal(texture.texture.data[3], 255); + + assert.equal(texture.texture.data[4], 5.915151596069336); + assert.equal(texture.texture.data[5], 47.1363639831543); + assert.equal(texture.texture.data[6], 23.660606384277344); + assert.equal(texture.texture.data[7], 255); + + var file = new PNG(PNGOptions); + file.data = texture.texture.data; + file.pack().pipe(fs.createWriteStream('./test/pyramids.png')); + + }); + + + it('checkerboard', function () { + + var generator = tgen.init(size, size, 'limitless'); + var texture = generator.do('checkerboard', { + blend: 'lighten', + rgba: [32, 255, 128, 1], + even: true, + seed: 777, + size: [ + 32, + 32 + ], + }); + + var params = texture.params(); + + assert.equal(params.width, size); + assert.equal(params.height, size); + assert.equal(params.normalize, 'limitless'); + assert.equal(params.items[0][1], 'checkerboard'); + assert.equal(params.items[0][2].blend, 'lighten'); + assert.equal(params.items[0][2].size[0], 32); + assert.equal(params.items[0][2].size[1], 32); + assert.equal(params.items[0][2].seed, 777); + + var pixel0 = texture.texture.get(0, 0); + var pixel2 = texture.texture.get(0, 2); + + assert.equal(pixel0[0], 32); + assert.equal(pixel0[1], 255); + assert.equal(pixel0[2], 128); + assert.equal(pixel0[3], 255); + + assert.equal(pixel2[0], 0); + assert.equal(pixel2[1], 0); + assert.equal(pixel2[2], 0); + assert.equal(pixel2[3], 255); + + var file = new PNG(PNGOptions); + file.data = texture.texture.data; + file.pack().pipe(fs.createWriteStream('./test/checkerboard.png')); + + }); + + }); +}); \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 4e2a6d8..028a4f8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,6 +12,11 @@ abbrev@1: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== +ansi-colors@3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" + integrity sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw== + ansi-colors@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-1.1.0.tgz#6374b4dd5d4718ff3ce27a671a3b1cad077132a9" @@ -36,11 +41,23 @@ ansi-regex@^3.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= +ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== + ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + ansi-wrap@0.1.0, ansi-wrap@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" @@ -84,6 +101,13 @@ are-we-there-yet@~1.1.2: delegates "^1.0.0" readable-stream "^2.0.6" +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + arr-diff@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" @@ -271,6 +295,11 @@ braces@^2.3.1, braces@^2.3.2: split-string "^3.0.2" to-regex "^3.0.1" +browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + buffer-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/buffer-equal/-/buffer-equal-1.0.0.tgz#59616b498304d556abd466966b22eeda3eca5fbe" @@ -332,6 +361,11 @@ camelcase@^3.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" integrity sha1-MvxLn82vhF/N9+c7uXysImHwqwo= +camelcase@^5.0.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + chalk@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" @@ -343,6 +377,15 @@ chalk@^1.1.1: strip-ansi "^3.0.0" supports-color "^2.0.0" +chalk@^2.0.1: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + chokidar@^2.0.0: version "2.1.6" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.6.tgz#b6cad653a929e244ce8a834244164d241fa954c5" @@ -377,6 +420,14 @@ class-utils@^0.3.5: isobject "^3.0.0" static-extend "^0.1.1" +cli@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cli/-/cli-1.0.1.tgz#22817534f24bfa4950c34d532d48ecbc621b8c14" + integrity sha1-IoF1NPJL+klQw01TLUjsvGIbjBQ= + dependencies: + exit "0.1.2" + glob "^7.1.1" + cliui@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" @@ -386,6 +437,15 @@ cliui@^3.2.0: strip-ansi "^3.0.1" wrap-ansi "^2.0.0" +cliui@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" + integrity sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ== + dependencies: + string-width "^2.1.1" + strip-ansi "^4.0.0" + wrap-ansi "^2.0.0" + clone-buffer@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58" @@ -432,6 +492,18 @@ collection-visit@^1.0.0: map-visit "^1.0.0" object-visit "^1.0.0" +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + color-support@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" @@ -469,6 +541,13 @@ concat-with-sourcemaps@^1.0.0, concat-with-sourcemaps@^1.1.0: dependencies: source-map "^0.6.1" +console-browserify@1.1.x: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" + integrity sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA= + dependencies: + date-now "^0.1.4" + console-control-strings@^1.0.0, console-control-strings@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" @@ -499,6 +578,17 @@ core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= +cross-spawn@^6.0.0: + version "6.0.5" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== + dependencies: + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" + shebang-command "^1.2.0" + which "^1.2.9" + currently-unhandled@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" @@ -514,6 +604,11 @@ d@1: es5-ext "^0.10.50" type "^1.0.1" +date-now@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" + integrity sha1-6vQ5/U1ISK105cx9vvIAZyueNFs= + dateformat@^1.0.11: version "1.0.12" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-1.0.12.tgz#9f124b67594c937ff706932e4a642cca8dbbfee9" @@ -522,6 +617,13 @@ dateformat@^1.0.11: get-stdin "^4.0.1" meow "^3.3.0" +debug@3.2.6, debug@^3.2.6: + version "3.2.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== + dependencies: + ms "^2.1.1" + debug@^2.2.0, debug@^2.3.3: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -529,14 +631,7 @@ debug@^2.2.0, debug@^2.3.3: dependencies: ms "2.0.0" -debug@^3.2.6: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== - dependencies: - ms "^2.1.1" - -decamelize@^1.1.1, decamelize@^1.1.2: +decamelize@^1.1.1, decamelize@^1.1.2, decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= @@ -607,6 +702,39 @@ detect-libc@^1.0.2: resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= +diff@3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== + +dom-serializer@0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.1.tgz#1ec4059e284babed36eec2941d4a970a189ce7c0" + integrity sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA== + dependencies: + domelementtype "^1.3.0" + entities "^1.1.1" + +domelementtype@1, domelementtype@^1.3.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" + integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== + +domhandler@2.3: + version "2.3.0" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.3.0.tgz#2de59a0822d5027fabff6f032c2b25a2a8abe738" + integrity sha1-LeWaCCLVAn+r/28DLCsloqir5zg= + dependencies: + domelementtype "1" + +domutils@1.5: + version "1.5.1" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" + integrity sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8= + dependencies: + dom-serializer "0" + domelementtype "1" + duplexify@^3.6.0: version "3.7.1" resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" @@ -630,6 +758,11 @@ editions@^1.3.3: resolved "https://registry.yarnpkg.com/editions/-/editions-1.3.4.tgz#3662cb592347c3168eb8e498a0ff73271d67f50b" integrity sha512-gzao+mxnYDzIysXKMQi/+M1mjy/rjestjg6OPoYTtI+3Izp23oiGZitsl9lPDPiTGXbcSIk1iJWhliSaglxnUg== +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + end-of-stream@^1.0.0, end-of-stream@^1.1.0: version "1.4.1" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" @@ -637,6 +770,16 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0: dependencies: once "^1.4.0" +entities@1.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.0.0.tgz#b2987aa3821347fcde642b24fdfc9e4fb712bf26" + integrity sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY= + +entities@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" + integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== + error-ex@^1.2.0: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" @@ -644,6 +787,27 @@ error-ex@^1.2.0: dependencies: is-arrayish "^0.2.1" +es-abstract@^1.5.1: + version "1.13.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.13.0.tgz#ac86145fdd5099d8dd49558ccba2eaf9b88e24e9" + integrity sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg== + dependencies: + es-to-primitive "^1.2.0" + function-bind "^1.1.1" + has "^1.0.3" + is-callable "^1.1.4" + is-regex "^1.0.4" + object-keys "^1.0.12" + +es-to-primitive@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.0.tgz#edf72478033456e8dda8ef09e00ad9650707f377" + integrity sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@~0.10.14: version "0.10.50" resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.50.tgz#6d0e23a0abdb27018e5ac4fd09b412bc5517a778" @@ -680,11 +844,34 @@ es6-weak-map@^2.0.1: es6-iterator "^2.0.3" es6-symbol "^3.1.1" -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.3: +escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.3, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= +esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +execa@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" + integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== + dependencies: + cross-spawn "^6.0.0" + get-stream "^4.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +exit@0.1.2, exit@0.1.x: + version "0.1.2" + resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" + integrity sha1-BjJjj42HfMghB9MKD/8aF8uhzQw= + expand-brackets@^2.1.4: version "2.1.4" resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" @@ -759,6 +946,13 @@ fill-range@^4.0.0: repeat-string "^1.6.1" to-regex-range "^2.1.0" +find-up@3.0.0, find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" + find-up@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" @@ -803,6 +997,13 @@ flagged-respawn@^1.0.0: resolved "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-1.0.1.tgz#e7de6f1279ddd9ca9aac8a5971d618606b3aab41" integrity sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q== +flat@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.0.tgz#090bec8b05e39cba309747f1d588f04dbaf98db2" + integrity sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw== + dependencies: + is-buffer "~2.0.3" + flush-write-stream@^1.0.2: version "1.1.1" resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8" @@ -882,11 +1083,23 @@ get-caller-file@^1.0.1: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== +get-caller-file@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + get-stdin@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4= +get-stream@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" + integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== + dependencies: + pump "^3.0.0" + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -928,6 +1141,18 @@ glob-watcher@^5.0.3: just-debounce "^1.0.0" object.defaults "^1.1.0" +glob@7.1.3: + version "7.1.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" + integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + glob@^7.1.1, glob@^7.1.3: version "7.1.4" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" @@ -972,6 +1197,11 @@ graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.0.tgz#8d8fdc73977cb04104721cb53666c1ca64cd328b" integrity sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg== +growl@1.10.5: + version "1.10.5" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" + integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== + gulp-batch@1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/gulp-batch/-/gulp-batch-1.0.5.tgz#c40fc9b2303674897b1216d82e1518b73217da59" @@ -991,10 +1221,10 @@ gulp-bump@3.1.3: semver "^5.3.0" through2 "^2.0.1" -gulp-changed@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/gulp-changed/-/gulp-changed-4.0.0.tgz#6317372ecc99dbd1637ae855b985ba379e8c8a62" - integrity sha512-BiPKI25QMP48dMChfqPjKpv1a7BCT1ATg6ob2oKzS8iFE/gepVwwz3PgK4vvIOiUrPmhb/tDnXptZNHQ5kpB3g== +gulp-changed@4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/gulp-changed/-/gulp-changed-4.0.1.tgz#ca63e51651a649433a49372d271b8b26054a9acc" + integrity sha512-VIy/woGGKBvUzj+KuL4C7ZZckT1pvy6pjIVNe8DaCrNvy7Nmh9UW/fZR73iQlOPA2U2/Sr3xLUX2RsSKwcnl/g== dependencies: make-dir "^3.0.0" plugin-error "^1.0.1" @@ -1129,6 +1359,11 @@ has-ansi@^2.0.0: dependencies: ansi-regex "^2.0.0" +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + has-gulplog@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/has-gulplog/-/has-gulplog-0.1.0.tgz#6414c82913697da51590397dafb12f22967811ce" @@ -1177,6 +1412,18 @@ has-values@^1.0.0: is-number "^3.0.0" kind-of "^4.0.0" +has@^1.0.1, has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +he@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + homedir-polyfill@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" @@ -1189,6 +1436,17 @@ hosted-git-info@^2.1.4: resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" integrity sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w== +htmlparser2@3.8.x: + version "3.8.3" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.8.3.tgz#996c28b191516a8be86501a7d79757e5c70c1068" + integrity sha1-mWwosZFRaovoZQGn15dX5ccMEGg= + dependencies: + domelementtype "1" + domhandler "2.3" + domutils "1.5" + entities "1.0" + readable-stream "1.1" + iconv-lite@^0.4.4: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -1238,6 +1496,11 @@ invert-kv@^1.0.0: resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= +invert-kv@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" + integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA== + is-absolute@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-1.0.0.tgz#395e1ae84b11f26ad1795e73c17378e48a301576" @@ -1277,6 +1540,16 @@ is-buffer@^1.1.5: resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== +is-buffer@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.3.tgz#4ecf3fcf749cbd1e472689e109ac66261a25e725" + integrity sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw== + +is-callable@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" + integrity sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA== + is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -1291,6 +1564,11 @@ is-data-descriptor@^1.0.0: dependencies: kind-of "^6.0.0" +is-date-object@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" + integrity sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY= + is-descriptor@^0.1.0: version "0.1.6" resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" @@ -1383,6 +1661,13 @@ is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" +is-regex@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" + integrity sha1-VRdIm1RwkbCTDglWVM7SXul+lJE= + dependencies: + has "^1.0.1" + is-relative@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-1.0.0.tgz#a1bb6935ce8c5dba1e8b9754b9b2dcc020e2260d" @@ -1390,6 +1675,18 @@ is-relative@^1.0.0: dependencies: is-unc-path "^1.0.0" +is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= + +is-symbol@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.2.tgz#a055f6ae57192caee329e7a860118b497a950f38" + integrity sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw== + dependencies: + has-symbols "^1.0.0" + is-unc-path@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-unc-path/-/is-unc-path-1.0.0.tgz#d731e8898ed090a12c352ad2eaed5095ad322c9d" @@ -1412,6 +1709,11 @@ is-windows@^1.0.1, is-windows@^1.0.2: resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= + isarray@1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -1443,6 +1745,28 @@ istextorbinary@2.2.1: editions "^1.3.3" textextensions "2" +js-yaml@3.13.1: + version "3.13.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" + integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +jshint@^2.10.2: + version "2.10.2" + resolved "https://registry.yarnpkg.com/jshint/-/jshint-2.10.2.tgz#ed6626c4f8223c98e94aaea62767435427a49a3d" + integrity sha512-e7KZgCSXMJxznE/4WULzybCMNXNAd/bf5TSrvVEq78Q/K8ZwFpmBqQeDtNiHc3l49nV4E/+YeHU/JZjSUIrLAA== + dependencies: + cli "~1.0.0" + console-browserify "1.1.x" + exit "0.1.x" + htmlparser2 "3.8.x" + lodash "~4.17.11" + minimatch "~3.0.2" + shelljs "0.3.x" + strip-json-comments "1.0.x" + json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" @@ -1499,6 +1823,13 @@ lcid@^1.0.0: dependencies: invert-kv "^1.0.0" +lcid@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" + integrity sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA== + dependencies: + invert-kv "^2.0.0" + lead@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lead/-/lead-1.0.0.tgz#6f14f99a37be3a9dd784f5495690e5903466ee42" @@ -1531,6 +1862,14 @@ load-json-file@^1.0.0: pinkie-promise "^2.0.0" strip-bom "^2.0.0" +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + lodash._reinterpolate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" @@ -1551,6 +1890,18 @@ lodash.templatesettings@^4.0.0: dependencies: lodash._reinterpolate "^3.0.0" +lodash@^4.17.11, lodash@~4.17.11: + version "4.17.14" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.14.tgz#9ce487ae66c96254fe20b599f21b6816028078ba" + integrity sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw== + +log-symbols@2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" + integrity sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg== + dependencies: + chalk "^2.0.1" + loud-rejection@^1.0.0: version "1.6.0" resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" @@ -1585,6 +1936,13 @@ make-iterator@^1.0.0: dependencies: kind-of "^6.0.2" +map-age-cleaner@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" + integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== + dependencies: + p-defer "^1.0.0" + map-cache@^0.2.0, map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" @@ -1617,6 +1975,15 @@ matchdep@^2.0.0: resolve "^1.4.0" stack-trace "0.0.10" +mem@^4.0.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178" + integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w== + dependencies: + map-age-cleaner "^0.1.1" + mimic-fn "^2.0.0" + p-is-promise "^2.0.0" + meow@^3.3.0: version "3.7.0" resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" @@ -1652,7 +2019,12 @@ micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4: snapdragon "^0.8.1" to-regex "^3.0.2" -minimatch@^3.0.4, minimatch@~3.0.4: +mimic-fn@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +minimatch@3.0.4, minimatch@^3.0.4, minimatch@~3.0.2, minimatch@~3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== @@ -1692,18 +2064,52 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@^0.5.0, mkdirp@^0.5.1: +mkdirp@0.5.1, mkdirp@^0.5.0, mkdirp@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= dependencies: minimist "0.0.8" +mocha@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-6.2.0.tgz#f896b642843445d1bb8bca60eabd9206b8916e56" + integrity sha512-qwfFgY+7EKAAUAdv7VYMZQknI7YJSGesxHyhn6qD52DV8UcSZs5XwCifcZGMVIE4a5fbmhvbotxC0DLQ0oKohQ== + dependencies: + ansi-colors "3.2.3" + browser-stdout "1.3.1" + debug "3.2.6" + diff "3.5.0" + escape-string-regexp "1.0.5" + find-up "3.0.0" + glob "7.1.3" + growl "1.10.5" + he "1.2.0" + js-yaml "3.13.1" + log-symbols "2.2.0" + minimatch "3.0.4" + mkdirp "0.5.1" + ms "2.1.1" + node-environment-flags "1.0.5" + object.assign "4.1.0" + strip-json-comments "2.0.1" + supports-color "6.0.0" + which "1.3.1" + wide-align "1.1.3" + yargs "13.2.2" + yargs-parser "13.0.0" + yargs-unparser "1.5.0" + ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= +ms@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== + ms@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" @@ -1761,6 +2167,19 @@ next-tick@^1.0.0: resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" integrity sha1-yobR/ogoFpsBICCOPchCS524NCw= +nice-try@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" + integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== + +node-environment-flags@1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.5.tgz#fa930275f5bf5dae188d6192b24b4c8bbac3d76a" + integrity sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ== + dependencies: + object.getownpropertydescriptors "^2.0.3" + semver "^5.7.0" + node-pre-gyp@^0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz#39ba4bb1439da030295f899e3b520b7785766149" @@ -1834,6 +2253,13 @@ npm-packlist@^1.1.6: ignore-walk "^3.0.1" npm-bundled "^1.0.1" +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= + dependencies: + path-key "^2.0.0" + npmlog@^4.0.2: version "4.1.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" @@ -1875,7 +2301,7 @@ object-visit@^1.0.0: dependencies: isobject "^3.0.0" -object.assign@^4.0.4: +object.assign@4.1.0, object.assign@^4.0.4: version "4.1.0" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== @@ -1895,6 +2321,14 @@ object.defaults@^1.0.0, object.defaults@^1.1.0: for-own "^1.0.0" isobject "^3.0.0" +object.getownpropertydescriptors@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16" + integrity sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY= + dependencies: + define-properties "^1.1.2" + es-abstract "^1.5.1" + object.map@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/object.map/-/object.map-1.0.1.tgz#cf83e59dc8fcc0ad5f4250e1f78b3b81bd801d37" @@ -1944,6 +2378,15 @@ os-locale@^1.4.0: dependencies: lcid "^1.0.0" +os-locale@^3.0.0, os-locale@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" + integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== + dependencies: + execa "^1.0.0" + lcid "^2.0.0" + mem "^4.0.0" + os-tmpdir@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" @@ -1957,6 +2400,40 @@ osenv@^0.1.4: os-homedir "^1.0.0" os-tmpdir "^1.0.0" +p-defer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" + integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww= + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= + +p-is-promise@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" + integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== + +p-limit@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.0.tgz#417c9941e6027a9abcba5092dd2904e255b5fbc2" + integrity sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ== + dependencies: + p-try "^2.0.0" + +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + parse-filepath@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-1.0.2.tgz#a632127f53aaf3d15876f5872f3ffac763d6c891" @@ -2000,11 +2477,21 @@ path-exists@^2.0.0: dependencies: pinkie-promise "^2.0.0" +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= +path-key@^2.0.0, path-key@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= + path-parse@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" @@ -2066,6 +2553,11 @@ plugin-log@^0.1.0: chalk "^1.1.1" dateformat "^1.0.11" +pngjs@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-3.4.0.tgz#99ca7d725965fb655814eaf65f38f12bbdbf555f" + integrity sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w== + posix-character-classes@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" @@ -2094,6 +2586,14 @@ pump@^2.0.0: end-of-stream "^1.1.0" once "^1.3.1" +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + pumpify@^1.3.5: version "1.5.1" resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" @@ -2130,6 +2630,16 @@ read-pkg@^1.0.0: normalize-package-data "^2.3.2" path-type "^1.0.0" +readable-stream@1.1: + version "1.1.13" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.13.tgz#f6eef764f514c89e2b9e23146a75ba106756d23e" + integrity sha1-9u73ZPUUyJ4rniMUanW6EGdW0j4= + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + "readable-stream@2 || 3", readable-stream@^3.0.6: version "3.4.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.4.0.tgz#a51c26754658e0a3c21dbf59163bd45ba6f447fc" @@ -2269,6 +2779,11 @@ require-main-filename@^1.0.1: resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + resolve-dir@^1.0.0, resolve-dir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43" @@ -2342,7 +2857,7 @@ semver-greatest-satisfied-range@^1.1.0: dependencies: sver-compat "^1.5.0" -"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.3.0: +"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.3.0, semver@^5.5.0, semver@^5.7.0: version "5.7.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== @@ -2367,6 +2882,23 @@ set-value@^2.0.0, set-value@^2.0.1: is-plain-object "^2.0.3" split-string "^3.0.1" +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= + +shelljs@0.3.x: + version "0.3.0" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.3.0.tgz#3596e6307a781544f591f37da618360f31db57b1" + integrity sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E= + signal-exit@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" @@ -2466,6 +2998,11 @@ split-string@^3.0.1, split-string@^3.0.2: dependencies: extend-shallow "^3.0.0" +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + stable@~0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf" @@ -2524,7 +3061,7 @@ string-width@^1.0.1, string-width@^1.0.2: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -"string-width@^1.0.2 || 2": +"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== @@ -2532,6 +3069,15 @@ string-width@^1.0.1, string-width@^1.0.2: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" +string-width@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + string_decoder@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.2.0.tgz#fe86e738b19544afe70469243b2a1ee9240eae8d" @@ -2565,6 +3111,13 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" +strip-ansi@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" + strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" @@ -2572,6 +3125,11 @@ strip-bom@^2.0.0: dependencies: is-utf8 "^0.2.0" +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= + strip-indent@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" @@ -2579,16 +3137,35 @@ strip-indent@^1.0.1: dependencies: get-stdin "^4.0.1" -strip-json-comments@~2.0.1: +strip-json-comments@1.0.x: + version "1.0.4" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" + integrity sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E= + +strip-json-comments@2.0.1, strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= +supports-color@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.0.0.tgz#76cfe742cf1f41bb9b1c29ad03068c05b4c0e40a" + integrity sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg== + dependencies: + has-flag "^3.0.0" + supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + sver-compat@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/sver-compat/-/sver-compat-1.5.0.tgz#3cf87dfeb4d07b4a3f14827bc186b3fd0c645cd8" @@ -2869,14 +3446,19 @@ which-module@^1.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" integrity sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8= -which@^1.2.14: +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= + +which@1.3.1, which@^1.2.14, which@^1.2.9: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== dependencies: isexe "^2.0.0" -wide-align@^1.1.0: +wide-align@1.1.3, wide-align@^1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== @@ -2906,11 +3488,40 @@ y18n@^3.2.1: resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= +"y18n@^3.2.1 || ^4.0.0", y18n@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" + integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== + yallist@^3.0.0, yallist@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A== +yargs-parser@13.0.0: + version "13.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.0.0.tgz#3fc44f3e76a8bdb1cc3602e860108602e5ccde8b" + integrity sha512-w2LXjoL8oRdRQN+hOyppuXs+V/fVAYtpcrRxZuF7Kt/Oc+Jr2uAcVntaUTNT6w5ihoWfFDpNY8CPx1QskxZ/pw== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs-parser@^11.1.1: + version "11.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-11.1.1.tgz#879a0865973bca9f6bab5cbdf3b1c67ec7d3bcf4" + integrity sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs-parser@^13.0.0: + version "13.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.1.tgz#d26058532aa06d365fe091f6a1fc06b2f7e5eca0" + integrity sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + yargs-parser@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" @@ -2918,6 +3529,50 @@ yargs-parser@^5.0.0: dependencies: camelcase "^3.0.0" +yargs-unparser@1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.5.0.tgz#f2bb2a7e83cbc87bb95c8e572828a06c9add6e0d" + integrity sha512-HK25qidFTCVuj/D1VfNiEndpLIeJN78aqgR23nL3y4N0U/91cOAzqfHlF8n2BvoNDcZmJKin3ddNSvOxSr8flw== + dependencies: + flat "^4.1.0" + lodash "^4.17.11" + yargs "^12.0.5" + +yargs@13.2.2: + version "13.2.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.2.2.tgz#0c101f580ae95cea7f39d927e7770e3fdc97f993" + integrity sha512-WyEoxgyTD3w5XRpAQNYUB9ycVH/PQrToaTXdYXRdOXvEy1l19br+VJsc0vcO8PTGg5ro/l/GY7F/JMEBmI0BxA== + dependencies: + cliui "^4.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + os-locale "^3.1.0" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.0.0" + +yargs@^12.0.5: + version "12.0.5" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13" + integrity sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw== + dependencies: + cliui "^4.0.0" + decamelize "^1.2.0" + find-up "^3.0.0" + get-caller-file "^1.0.1" + os-locale "^3.0.0" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^2.0.0" + which-module "^2.0.0" + y18n "^3.2.1 || ^4.0.0" + yargs-parser "^11.1.1" + yargs@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8" From c6b408cde05939c5aeb8329d99fd4a56d7005b64 Mon Sep 17 00:00:00 2001 From: Tamas Schalk Date: Sun, 8 Sep 2019 21:51:16 +0200 Subject: [PATCH 2/2] Version update --- dist/tgen.js | 2 +- dist/tgen.min.js | 4 ++-- dist/tgen.min.js.gz | Bin 10522 -> 10596 bytes package.json | 2 +- src/tgen-base.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dist/tgen.js b/dist/tgen.js index 4b7da49..6ee8706 100644 --- a/dist/tgen.js +++ b/dist/tgen.js @@ -11,7 +11,7 @@ var SeamlessTextureGenerator = (function () { return { - version: '1.1.15', + version: '1.1.16', defaults: {}, effects: {}, filters: [], diff --git a/dist/tgen.min.js b/dist/tgen.min.js index 2fd348e..4aa4bd6 100644 --- a/dist/tgen.min.js +++ b/dist/tgen.min.js @@ -1,8 +1,8 @@ /** * seamless-texture-generator - Seamless texture generator * - * @version v1.1.15 + * @version v1.1.16 * @link https://github.com/schalkt/tgen/ * @license MIT */ -var SeamlessTextureGenerator={version:"1.1.15",defaults:{},effects:{},filters:[],functions:[],blends:{},shapes:{},colormaps:{},events:{beforeEffect:{},afterEffect:{},beforeRender:{},afterRender:{}},config:{historyLast:15,historyName:"history",historyList:[]},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},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(l,o,e){function s(){null==l&&(l=256),l<1&&(l=256),o<1&&(o=256),2048=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.canvas=function(e){for(var t=this.size(),r=e.getContext("2d").getImageData(0,0,this.width,this.height).data;t--;)u.texture.data[t]=r[t]},null===this.data&&this.clear()},u.texture=new u.buffer,u.layerCopy=function(e){for(var t=[],r=(e=this.layers[e]).length;r--;)t[r]=e[r];return t},u.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]},u.minMaxNormalize=function(e,t){return{min:Math.min(e,t),max:Math.max(e,t)}},u.randInt=function(e,t,r){var n=u.minMaxNormalize(e,t);return e=n.min,t=n.max,!0===r?(e=Math.round(e/2),t=Math.round(t/2),mul=2):mul=1,mul*(Math.floor(Math.random()*(t-e+1))+e)},u.randIntSeed=function(e,t,r){var n=u.minMaxNormalize(e,t);return e=n.min,t=n.max,!0===r?(e=Math.round(e/2),t=Math.round(t/2),mul=2):mul=1,mul*(Math.floor(u.calc.randomseed()*(t-e+1))+e)},u.randReal=function(e,t){var r=u.minMaxNormalize(e,t);return e=r.min,t=r.max,Math.random()*(t-e)+e},u.randRealSeed=function(e,t){var r=u.minMaxNormalize(e,t);return e=r.min,t=r.max,u.calc.randomseed()*(t-e)+e},u.randByArray=function(e,t){return"object"==typeof e&&(e=null!=t?u.randReal(e[0],e[1]):u.randInt(e[0],e[1])),e},u.randByArraySeed=function(e,t,r){return"object"==typeof e&&(e=null!=t?u.randRealSeed(e[0],e[1]):u.randIntSeed(e[0],e[1],r)),e},u.randItem=function(e){var t=e.length;return e[u.randIntSeed(0,t-1)]};var f=function(e){var t,r=0;for(var n in e)u.randRealSeed(0,1)<1/++r&&(t=n);return t};function h(e,t,r){if(void 0!==r&&(t=r(t)),t.count&&"object"==typeof t.count&&(t.count=u.randIntSeed(t.count[0],t.count[1])),t.level&&"object"==typeof t.level&&(t.level=u.randIntSeed(t.level[0],t.level[1])),t.opacity&&"object"==typeof t.opacity&&(t.opacity=u.randIntSeed(t.opacity[0],t.opacity[1])),"random"===t.blend&&(t.blend=f(d.blends)),"object"==typeof t.blend){var n=t.blend.length;t.blend=t.blend[u.randIntSeed(0,n-1)]}return void 0!==t.blend?u.point.blend=t.blend:u.point.blend="",t.rgba&&(t.rgba=u.rgba(t.rgba),u.point.rgba=[t.rgba[0],t.rgba[1],t.rgba[2],t.rgba[3]]),t.rgb&&(t.rgb=u.rgba(t.rgb),u.point.rgba=[t.rgb[0],t.rgb[1],t.rgb[2],255]),t}return u.rgba=function(e,t){return"random"===e?i(t):"randomalpha"===e?i(!0):("object"==typeof e[0]&&(e[0]=u.randIntSeed(e[0][0],e[0][1])),"object"==typeof e[1]&&(e[1]=u.randIntSeed(e[1][0],e[1][1])),"object"==typeof e[2]&&(e[2]=u.randIntSeed(e[2][0],e[2][1])),"object"==typeof e[3]&&(e[3]=u.randIntSeed(e[3][0],e[3][1])),e[3]%1!=0&&(e[3]=Math.round(255*e[3])),1==e[3]&&(e[3]=255),e)},u.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},u.calc={pi:3.1415927,luminance:function(e){return.21*e[0]+.72*e[1]+.07*e[2]},randomseed:function(e){null==this.seed&&(this.seed=u.randInt(1,16777216)),void 0!==e&&(this.seed=e);var t=1e4*Math.sin(this.seed++);return t-Math.floor(t)},normalize1:function(e){return u.calc.normalize(e,0,1)},normalize:function(e,t,r){return r=d.config.historyLast&&d.config.historyList.shift(),d.config.historyList.push(t),window.localStorage.setItem(d.config.historyName,JSON.stringify(d.config.historyList))}}},u.params=function(e){if(null==e){var t=new Date;e=t.getHours()+":"+t.getMinutes()+":"+t.getSeconds()+" l"+u.layers.length+" i"+n.length}return{name:e,version:d.version,width:l,height:o,normalize:u.normalize,items:n}},u.render=function(e,t){this.debug=!0===e.debug,u.event("beforeRender",e);var r=0;for(var n in null!=e.width&&(l=e.width),null!=e.height&&(o=e.height),null!=e.normalize?u.normalize=e.normalize:u.normalize="limitless",s(),u.texture=new u.buffer(e.background),1!=t&&u.clear(),e.items){c=e.items[n][0];var a=e.items[n][1],i=e.items[n][2];"random"==a&&(a=f(u.defaults)),"object"==typeof a&&(a=u.randItem(a)),r!=c&&(null!=u.layers[c]?u.texture.data=u.layers[c]:u.texture.clear(),r=c),null!=u[a]?u[a](i):null!=d.effects[a]?u.do(a,i):console.warn("undefined effect: "+a),u.layers[c]=u.texture.export()}return u.event("afterRender",u.params()),u.history.add(),this},u.event=function(e,t){for(var r in d.events[e]){var n=d.events[e][r];"function"==typeof n&&n(u,t)}},u.do=function(e,t){var r=t;return void 0===t?t=a({},d.defaults[e]):"object"==typeof t&&(t=a(d.defaults[e],t)),t.seed=t&&void 0!==t.seed&&null!==t.seed?t.seed:[1,16777216],t.seed=u.randByArray(t.seed),t=h(0,t),u.calc.randomseed(t.seed),u.event("beforeEffect",{layer:c,name:e,params:t}),"function"==typeof d.effects[e]?t=d.effects[e](u,t):console.warn("effect not callable: "+e),void 0===t&&(t=r),u.event("afterEffect",{layer:c,name:e,params:t}),!1!==t.store&&function(e,t){n.push([c,e,t])}(e,t),u},u}};"undefined"!=typeof module&&void 0!==module.exports?module.exports=SeamlessTextureGenerator:"function"==typeof define&&define.amd?define([],function(){return SeamlessTextureGenerator}):window.tgen=SeamlessTextureGenerator,function(e){e.blend("opacity",function(e,t,r){return r}),e.blend("multiply",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("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("difference",function(e,t,r){return r[0]=Math.abs(r[0]-t[0]),r[1]=Math.abs(r[1]-t[1]),r[2]=Math.abs(r[2]-t[2]),r}),e.blend("difference-invert",function(e,t,r){return r[0]=255-Math.abs(r[0]-t[0]),r[1]=255-Math.abs(r[1]-t[1]),r[2]=255-Math.abs(r[2]-t[2]),r}),e.blend("screen",function(e,t,r){return r[0]=255-(255-t[0])*(255-r[0])/255,r[1]=255-(255-t[1])*(255-r[1])/255,r[2]=255-(255-t[2])*(255-r[2])/255,r}),e.blend("overlay",function(e,t,r){return r[0]=128t[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]=128t.skip&&(e.point.rgba=[v%a*s,v%i*c,v%o*l,e.point.rgba[3]],e.point.set(m,b))}}return t})}(SeamlessTextureGenerator),function(e){var n,a;e.event("beforeEffect","save start time",function(e,t){n=(new Date).getTime()}),e.event("afterEffect","log",function(e,t){var r=(new Date).getTime()-n;e.log(t.layer,r,t.name,t.params)}),e.event("beforeRender","log",function(e,t){a=(new Date).getTime()}),e.event("afterRender","log",function(e,t){var r=(new Date).getTime()-a;e.log(r,t)})}(SeamlessTextureGenerator),function(e){e.filter("opacity",{adjust:128},function(e,t){return e.walk(function(e){return e[3]=t.adjust,e}),t}),e.filter("vibrance",{adjust:128},function(e,t){var a=-1*t.adjust;return e.walk(function(e){var t=(e[0]+e[1]+e[2])/3,r=Math.max(e[0],e[1],e[2]),n=2*Math.abs(r-t)/255*a/100;return e[0]!==r&&(e[0]+=(r-e[0])*n),e[1]!==r&&(e[1]+=(r-e[1])*n),e[2]!==r&&(e[2]+=(r-e[2])*n),[e[0],e[1],e[2],e[3]]}),t}),e.filter("brightness",{adjust:50,legacy:!0},function(e,t){return!0===t.legacy?e.walk(function(e){return[Math.min(e[0]+t.adjust,255),Math.min(e[1]+t.adjust,255),Math.min(e[2]+t.adjust,255),e[3]]}):e.walk(function(e){return[e[0]=Math.min(255/e[0]*(t.adjust/255),255),e[1]=Math.min(255/e[1]*(t.adjust/255),255),e[2]=Math.min(255/e[2]*(t.adjust/255),255),e[3]]}),t}),e.filter("contrast",{adjust:50},function(e,t){var r=(100+t.adjust)/100;return e.walk(function(e){return e[0]=255*((e[0]/255-.5)*r+.5),e[1]=255*((e[1]/255-.5)*r+.5),e[2]=255*((e[2]/255-.5)*r+.5),[Math.max(Math.min(e[0],255),0),Math.max(Math.min(e[1],255),0),Math.max(Math.min(e[2],255),0),e[3]]}),t}),e.filter("threshold",{adjust:[64,128]},function(e,r){return r.adjust=e.randByArray(r.adjust),e.walk(function(e){var t=.2126*e[0]+.7152*e[1]+.0722*e[2]<=r.adjust?0:255;return[t,t,t,e[3]]}),r}),e.filter("gamma",{adjust:.5},function(e,t){return e.walk(function(e){return e[0]=255*Math.pow(e[0]/255,1/t.adjust),e[1]=255*Math.pow(e[1]/255,1/t.adjust),e[2]=255*Math.pow(e[2]/255,1/t.adjust),[e[0],e[1],e[2],e[3]]}),t}),e.filter("grayscale",{method:["ligthness","average","luminosity"]},function(r,e){switch("string"==typeof e&&(e={method:e}),"object"==typeof e.method&&(e.method=r.randItem(e.method)),e.method){case"ligthness":r.walk(function(e){var t=Math.max(e[0],e[1],e[2])+Math.min(e[0],e[1],e[2]);return[t,t,t,e[3]]});break;case"average":r.walk(function(e){var t=(e[0]+e[1]+e[2])/3;return[t,t,t,e[3]]});break;case"luminosity":r.walk(function(e){var t=r.calc.luminance(e);return[t,t,t,e[3]]})}return e}),e.filter("colorize",{level:50,rgba:"random",colormap:null},function(n,a){return n.colormap.init(a.colormap,255,function(e){a.colormap=e}),n.walk(function(e){if(n.colormap.data){var t=(e[0]+e[1]+e[2])/3,r=n.colormap.get(t,a.rgba);return r[3]=e[3],r}return n.point.colorize(e,a.rgba,a.level)}),a}),e.filter("invert",{channels:[1,1,1]},function(e,t){return e.walk(function(e){return[t.channels[0]?255-e[0]:e[0],t.channels[1]?255-e[1]:e[1],t.channels[2]?255-e[2]:e[2],e[3]]}),t}),e.filter("channel",{channels:[[.2,.8],[.4,1],[.8,1.2]]},function(e,t){return t.channels[0]=e.randByArray(t.channels[0],!0),t.channels[1]=e.randByArray(t.channels[1],!0),t.channels[2]=e.randByArray(t.channels[2],!0),e.walk(function(e){return[e[0]*t.channels[0],e[1]*t.channels[1],e[2]*t.channels[2],e[3]]}),t}),e.filter("backlight",{channels:[1,1,1]},function(e,t){return e.walk(function(e){return[t.channels[0]?255/e[0]*(255/e[0]):e[0],t.channels[1]?255/e[1]*(255/e[1]):e[1],t.channels[2]?255/e[2]*(255/e[2]):e[2],e[3]]}),t}),e.filter("sobel",{type:3},function(e,t){return e.do("convolute",{store:!1,transparent:!1,weights:"sobel"+t.type}),t}),e.filter("emboss",{type:2},function(e,t){return e.do("convolute",{store:!1,transparent:!1,weights:"emboss"+t.type}),t}),e.filter("edgedetect",{type:1},function(e,t){return e.do("convolute",{store:!1,transparent:!1,weights:"edgedetect"+t.type}),t}),e.filter("sharpen",{type:2},function(e,t){return e.do("convolute",{store:!1,transparent:!1,weights:"sharpen"+t.type}),t}),e.filter("blur",{},function(e,t){return e.do("convolute",{store:!1,transparent:!1,weights:[1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9]}),t}),e.filter("sinecolor",{sines:[1,7],channel:[0,2]},function(r,n){return n.sines=r.randByArray(n.sines),n.channel=r.randByArray(n.channel),r.walk(function(e){var t=parseInt(255*Math.sin(e[n.channel]*(r.calc.pi/180)*(255/360)*n.sines));return e[n.channel]=Math.abs(t),e}),n}),e.filter("convolute",{blend:"opacity",transparent:!1,weights:"default1"},function(e,t){if("object"!=typeof t.weights&&"string"!=typeof t.weights||null==t.weights)return t;if("string"==typeof t.weights[0]&&(t.weights=e.randByArray(t.weights)),"string"==typeof t.weights)if("random"===t.weights){var r=-32;t.weights=[e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32)],e.log(t.weights.join(", "))}else{var n={edgedetect1:[-1,-1,-1,-1,8,-1,-1,-1,-1],edgedetect2:[0,1,0,1,-4,1,0,1,0],edgedetect3:[1,0,-1,0,0,0,-1,0,1],sharpen1:[0,-1,0,-1,5,-1,0,-1,0],sharpen2:[-1,-1,-1,-1,9,-1,-1,-1,-1],emboss1:[1,1,1,1,.7,-1,-1,-1,-1],emboss2:[-2,-1,0,-1,1,1,0,1,2],emboss3:[10,3,-2,-8,-5,7,-3,-12,11],emboss4:[-6,11,-9,-9,0,-4,12,8,-2],sobel1:[-1,-2,-1,0,0,0,1,2,1],sobel2:[-1,0,1,-2,0,2,-1,0,1],sobel3:[-5,-8,12,-4,-8,-12,9,6,9],default1:[1,-11,-7,5,2,4,4,9,-2],default2:[-5,-21,25,22,31,-16,-2,-21,-10],default3:[1,1,1,1,1,1,1,1,1]};if(null==n[t.weights])return t;t.weights=n[t.weights]}var a=new e.buffer;a.clear();for(var i=Math.round(Math.sqrt(t.weights.length)),o=Math.floor(i/2),s=t.transparent?1:0,c=0;c>16));else f=s+d*t.xamount*n/(n*n);if(a%16==0)var h=e.wrapy(c+(u*t.yamount*a>>16));else h=c+u*t.yamount*a/(a*a);var p=e.point.get(f,h);r.data[l]=p[0],r.data[l+1]=p[1],r.data[l+2]=p[2],r.data[l+3]=p[3]}for(var g=e.texture.size();g--;)e.texture.data[g]=r.data[g];return t})}(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;o=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.canvas=function(e){for(var t=this.size(),r=e.getContext("2d").getImageData(0,0,this.width,this.height).data;t--;)u.texture.data[t]=r[t]},null===this.data&&this.clear()},u.texture=new u.buffer,u.layerCopy=function(e){for(var t=[],r=(e=this.layers[e]).length;r--;)t[r]=e[r];return t},u.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]},u.minMaxNormalize=function(e,t){return{min:Math.min(e,t),max:Math.max(e,t)}},u.randInt=function(e,t,r){var n=u.minMaxNormalize(e,t);return e=n.min,t=n.max,!0===r?(e=Math.round(e/2),t=Math.round(t/2),mul=2):mul=1,mul*(Math.floor(Math.random()*(t-e+1))+e)},u.randIntSeed=function(e,t,r){var n=u.minMaxNormalize(e,t);return e=n.min,t=n.max,!0===r?(e=Math.round(e/2),t=Math.round(t/2),mul=2):mul=1,mul*(Math.floor(u.calc.randomseed()*(t-e+1))+e)},u.randReal=function(e,t){var r=u.minMaxNormalize(e,t);return e=r.min,t=r.max,Math.random()*(t-e)+e},u.randRealSeed=function(e,t){var r=u.minMaxNormalize(e,t);return e=r.min,t=r.max,u.calc.randomseed()*(t-e)+e},u.randByArray=function(e,t){return"object"==typeof e&&(e=null!=t?u.randReal(e[0],e[1]):u.randInt(e[0],e[1])),e},u.randByArraySeed=function(e,t,r){return"object"==typeof e&&(e=null!=t?u.randRealSeed(e[0],e[1]):u.randIntSeed(e[0],e[1],r)),e},u.randItem=function(e){var t=e.length;return e[u.randIntSeed(0,t-1)]};var f=function(e){var t,r=0;for(var n in e)u.randRealSeed(0,1)<1/++r&&(t=n);return t};function h(e,t,r){if(void 0!==r&&(t=r(t)),t.count&&"object"==typeof t.count&&(t.count=u.randIntSeed(t.count[0],t.count[1])),t.level&&"object"==typeof t.level&&(t.level=u.randIntSeed(t.level[0],t.level[1])),t.opacity&&"object"==typeof t.opacity&&(t.opacity=u.randIntSeed(t.opacity[0],t.opacity[1])),"random"===t.blend&&(t.blend=f(d.blends)),"object"==typeof t.blend){var n=t.blend.length;t.blend=t.blend[u.randIntSeed(0,n-1)]}return void 0!==t.blend?u.point.blend=t.blend:u.point.blend="",t.rgba&&(t.rgba=u.rgba(t.rgba),u.point.rgba=[t.rgba[0],t.rgba[1],t.rgba[2],t.rgba[3]]),t.rgb&&(t.rgb=u.rgba(t.rgb),u.point.rgba=[t.rgb[0],t.rgb[1],t.rgb[2],255]),t}return u.rgba=function(e,t){return"random"===e?i(t):"randomalpha"===e?i(!0):("object"==typeof e[0]&&(e[0]=u.randIntSeed(e[0][0],e[0][1])),"object"==typeof e[1]&&(e[1]=u.randIntSeed(e[1][0],e[1][1])),"object"==typeof e[2]&&(e[2]=u.randIntSeed(e[2][0],e[2][1])),"object"==typeof e[3]&&(e[3]=u.randIntSeed(e[3][0],e[3][1])),e[3]%1!=0&&(e[3]=Math.round(255*e[3])),1==e[3]&&(e[3]=255),e)},u.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},u.calc={pi:3.1415927,luminance:function(e){return.21*e[0]+.72*e[1]+.07*e[2]},randomseed:function(e){null==this.seed&&(this.seed=u.randInt(1,16777216)),void 0!==e&&(this.seed=e);var t=1e4*Math.sin(this.seed++);return t-Math.floor(t)},normalize1:function(e){return u.calc.normalize(e,0,1)},normalize:function(e,t,r){return r=d.config.historyLast&&d.config.historyList.shift(),d.config.historyList.push(t),window.localStorage.setItem(d.config.historyName,JSON.stringify(d.config.historyList))}}},u.params=function(e){if(null==e){var t=new Date;e=t.getHours()+":"+t.getMinutes()+":"+t.getSeconds()+" l"+u.layers.length+" i"+n.length}return{name:e,version:d.version,width:l,height:o,normalize:u.normalize,items:n}},u.render=function(e,t){this.debug=!0===e.debug,u.event("beforeRender",e);var r=0;for(var n in null!=e.width&&(l=e.width),null!=e.height&&(o=e.height),null!=e.normalize?u.normalize=e.normalize:u.normalize="limitless",s(),u.texture=new u.buffer(e.background),1!=t&&u.clear(),e.items){c=e.items[n][0];var a=e.items[n][1],i=e.items[n][2];"random"==a&&(a=f(u.defaults)),"object"==typeof a&&(a=u.randItem(a)),r!=c&&(null!=u.layers[c]?u.texture.data=u.layers[c]:u.texture.clear(),r=c),null!=u[a]?u[a](i):null!=d.effects[a]?u.do(a,i):console.warn("undefined effect: "+a),u.layers[c]=u.texture.export()}return u.event("afterRender",u.params()),u.history.add(),this},u.event=function(e,t){for(var r in d.events[e]){var n=d.events[e][r];"function"==typeof n&&n(u,t)}},u.do=function(e,t){var r=t;return void 0===t?t=a({},d.defaults[e]):"object"==typeof t&&(t=a(d.defaults[e],t)),t.seed=t&&void 0!==t.seed&&null!==t.seed?t.seed:[1,16777216],t.seed=u.randByArray(t.seed),t=h(0,t),u.calc.randomseed(t.seed),u.event("beforeEffect",{layer:c,name:e,params:t}),"function"==typeof d.effects[e]?t=d.effects[e](u,t):console.warn("effect not callable: "+e),void 0===t&&(t=r),u.event("afterEffect",{layer:c,name:e,params:t}),!1!==t.store&&function(e,t){n.push([c,e,t])}(e,t),u},u}};"undefined"!=typeof module&&void 0!==module.exports?module.exports=SeamlessTextureGenerator:"function"==typeof define&&define.amd?define([],function(){return SeamlessTextureGenerator}):window.tgen=SeamlessTextureGenerator,function(e){e.blend("opacity",function(e,t,r){return r}),e.blend("multiply",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("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("difference",function(e,t,r){return r[0]=Math.abs(r[0]-t[0]),r[1]=Math.abs(r[1]-t[1]),r[2]=Math.abs(r[2]-t[2]),r}),e.blend("difference-invert",function(e,t,r){return r[0]=255-Math.abs(r[0]-t[0]),r[1]=255-Math.abs(r[1]-t[1]),r[2]=255-Math.abs(r[2]-t[2]),r}),e.blend("screen",function(e,t,r){return r[0]=255-(255-t[0])*(255-r[0])/255,r[1]=255-(255-t[1])*(255-r[1])/255,r[2]=255-(255-t[2])*(255-r[2])/255,r}),e.blend("overlay",function(e,t,r){return r[0]=128t[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]=128t.skip&&(e.point.rgba=[v%a*s,v%i*c,v%o*l,e.point.rgba[3]],e.point.set(y,b))}}return t})}(SeamlessTextureGenerator),function(e){var n,a;e.event("beforeEffect","save start time",function(e,t){n=(new Date).getTime()}),e.event("afterEffect","log",function(e,t){var r=(new Date).getTime()-n;e.log(t.layer,r,t.name,t.params)}),e.event("beforeRender","log",function(e,t){a=(new Date).getTime()}),e.event("afterRender","log",function(e,t){var r=(new Date).getTime()-a;e.log(r,t)})}(SeamlessTextureGenerator),function(e){e.filter("opacity",{adjust:128},function(e,t){return e.walk(function(e){return e[3]=t.adjust,e}),t}),e.filter("vibrance",{adjust:128},function(e,t){var a=-1*t.adjust;return e.walk(function(e){var t=(e[0]+e[1]+e[2])/3,r=Math.max(e[0],e[1],e[2]),n=2*Math.abs(r-t)/255*a/100;return e[0]!==r&&(e[0]+=(r-e[0])*n),e[1]!==r&&(e[1]+=(r-e[1])*n),e[2]!==r&&(e[2]+=(r-e[2])*n),[e[0],e[1],e[2],e[3]]}),t}),e.filter("brightness",{adjust:50,legacy:!0},function(e,t){return!0===t.legacy?e.walk(function(e){return[Math.min(e[0]+t.adjust,255),Math.min(e[1]+t.adjust,255),Math.min(e[2]+t.adjust,255),e[3]]}):e.walk(function(e){return[e[0]=Math.min(255/e[0]*(t.adjust/255),255),e[1]=Math.min(255/e[1]*(t.adjust/255),255),e[2]=Math.min(255/e[2]*(t.adjust/255),255),e[3]]}),t}),e.filter("contrast",{adjust:50},function(e,t){var r=(100+t.adjust)/100;return e.walk(function(e){return e[0]=255*((e[0]/255-.5)*r+.5),e[1]=255*((e[1]/255-.5)*r+.5),e[2]=255*((e[2]/255-.5)*r+.5),[Math.max(Math.min(e[0],255),0),Math.max(Math.min(e[1],255),0),Math.max(Math.min(e[2],255),0),e[3]]}),t}),e.filter("threshold",{adjust:[64,128]},function(e,r){return r.adjust=e.randByArray(r.adjust),e.walk(function(e){var t=.2126*e[0]+.7152*e[1]+.0722*e[2]<=r.adjust?0:255;return[t,t,t,e[3]]}),r}),e.filter("gamma",{adjust:.5},function(e,t){return e.walk(function(e){return e[0]=255*Math.pow(e[0]/255,1/t.adjust),e[1]=255*Math.pow(e[1]/255,1/t.adjust),e[2]=255*Math.pow(e[2]/255,1/t.adjust),[e[0],e[1],e[2],e[3]]}),t}),e.filter("grayscale",{method:["ligthness","average","luminosity"]},function(r,e){switch("string"==typeof e&&(e={method:e}),"object"==typeof e.method&&(e.method=r.randItem(e.method)),e.method){case"ligthness":r.walk(function(e){var t=Math.max(e[0],e[1],e[2])+Math.min(e[0],e[1],e[2]);return[t,t,t,e[3]]});break;case"average":r.walk(function(e){var t=(e[0]+e[1]+e[2])/3;return[t,t,t,e[3]]});break;case"luminosity":r.walk(function(e){var t=r.calc.luminance(e);return[t,t,t,e[3]]})}return e}),e.filter("colorize",{level:50,rgba:"random",colormap:null},function(n,a){return n.colormap.init(a.colormap,255,function(e){a.colormap=e}),n.walk(function(e){if(n.colormap.data){var t=(e[0]+e[1]+e[2])/3,r=n.colormap.get(t,a.rgba);return r[3]=e[3],r}return n.point.colorize(e,a.rgba,a.level)}),a}),e.filter("invert",{channels:[1,1,1]},function(e,t){return e.walk(function(e){return[t.channels[0]?255-e[0]:e[0],t.channels[1]?255-e[1]:e[1],t.channels[2]?255-e[2]:e[2],e[3]]}),t}),e.filter("channel",{channels:[[.2,.8],[.4,1],[.8,1.2]]},function(e,t){return t.channels[0]=e.randByArray(t.channels[0],!0),t.channels[1]=e.randByArray(t.channels[1],!0),t.channels[2]=e.randByArray(t.channels[2],!0),e.walk(function(e){return[e[0]*t.channels[0],e[1]*t.channels[1],e[2]*t.channels[2],e[3]]}),t}),e.filter("backlight",{channels:[1,1,1]},function(e,t){return e.walk(function(e){return[t.channels[0]?255/e[0]*(255/e[0]):e[0],t.channels[1]?255/e[1]*(255/e[1]):e[1],t.channels[2]?255/e[2]*(255/e[2]):e[2],e[3]]}),t}),e.filter("sobel",{type:3},function(e,t){return e.do("convolute",{store:!1,transparent:!1,weights:"sobel"+t.type}),t}),e.filter("emboss",{type:2},function(e,t){return e.do("convolute",{store:!1,transparent:!1,weights:"emboss"+t.type}),t}),e.filter("edgedetect",{type:1},function(e,t){return e.do("convolute",{store:!1,transparent:!1,weights:"edgedetect"+t.type}),t}),e.filter("sharpen",{type:2},function(e,t){return e.do("convolute",{store:!1,transparent:!1,weights:"sharpen"+t.type}),t}),e.filter("blur",{},function(e,t){return e.do("convolute",{store:!1,transparent:!1,weights:[1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9]}),t}),e.filter("sinecolor",{sines:[1,7],channel:[0,2]},function(r,n){return n.sines=r.randByArray(n.sines),n.channel=r.randByArray(n.channel),r.walk(function(e){var t=parseInt(255*Math.sin(e[n.channel]*(r.calc.pi/180)*(255/360)*n.sines));return e[n.channel]=Math.abs(t),e}),n}),e.filter("convolute",{blend:"opacity",transparent:!1,weights:"default1"},function(e,t){if("object"!=typeof t.weights&&"string"!=typeof t.weights||null==t.weights)return t;if("string"==typeof t.weights[0]&&(t.weights=e.randByArray(t.weights)),"string"==typeof t.weights)if("random"===t.weights){var r=-32;t.weights=[e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32),e.randIntSeed(r,32)],e.log(t.weights.join(", "))}else{var n={edgedetect1:[-1,-1,-1,-1,8,-1,-1,-1,-1],edgedetect2:[0,1,0,1,-4,1,0,1,0],edgedetect3:[1,0,-1,0,0,0,-1,0,1],sharpen1:[0,-1,0,-1,5,-1,0,-1,0],sharpen2:[-1,-1,-1,-1,9,-1,-1,-1,-1],emboss1:[1,1,1,1,.7,-1,-1,-1,-1],emboss2:[-2,-1,0,-1,1,1,0,1,2],emboss3:[10,3,-2,-8,-5,7,-3,-12,11],emboss4:[-6,11,-9,-9,0,-4,12,8,-2],sobel1:[-1,-2,-1,0,0,0,1,2,1],sobel2:[-1,0,1,-2,0,2,-1,0,1],sobel3:[-5,-8,12,-4,-8,-12,9,6,9],default1:[1,-11,-7,5,2,4,4,9,-2],default2:[-5,-21,25,22,31,-16,-2,-21,-10],default3:[1,1,1,1,1,1,1,1,1]};if(null==n[t.weights])return t;t.weights=n[t.weights]}var a=new e.buffer;a.clear();for(var i=Math.round(Math.sqrt(t.weights.length)),o=Math.floor(i/2),s=t.transparent?1:0,c=0;c>16));else f=s+d*t.xamount*n/(n*n);if(a%16==0)var h=e.wrapy(c+(u*t.yamount*a>>16));else h=c+u*t.yamount*a/(a*a);var p=e.point.get(f,h);r.data[l]=p[0],r.data[l+1]=p[1],r.data[l+2]=p[2],r.data[l+3]=p[3]}for(var g=e.texture.size();g--;)e.texture.data[g]=r.data[g];return t})}(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;oh9e=EDl*^QG5i0!C){L3{sXd9QijPk)B@(cisBxvuojqR#)Jstn&{ zUDKYZtH;)S6CIPXn7*GG-)#6w1UGR~Le}YG$u`GyRYDnhc}aM>rX0mCI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9t#lT4l=!fW0ig;t z0Zio$c4q;6x?}!>fgn@O^=M6?ux<}-nfMcY8sjZr599lO_~H&Px!diwSo3|2{+{+V z%TCpuWc{?x0!e5Ov90^sI(xE^cXT5G)mMVq zA(uJ1c(PHzqEUdKc?hO0qWnAJ*WIjDH-LWyexa<9j$fDU%OgyqqNg6_SowG+reI5u zak>icJ|Hq$O$4?9fm3$pw@AdPf#!mTPxL?S0XnnK4E}?PpBVn{2lrUF3D+mM0sKJC zHssMAka~xBeFBOtUd}$T2f%iJM|CB)!-7Jp=3Civ2sH>GA~ z__tkef}TZU1rq89D1Q$f?Z>gXYpo~u%sXlXjT%b#_0|}5V==R6 zt)2=L*A->8NTXBJoUDe9uI?bhlgjQ0#GIPkc3511nf1dUWGo54Uw6n{;}b;O{y>oW z3@8(BIl3qkflE(B;dv`-nXEo(BTLtBUC>uMo-PK^yd2QJHuEwl^1CbgW7zsbEZJ&d cICD*l5W*RK4A#9YfO_$N0X&SuiMEvh0Q;>@0ssI2 diff --git a/package.json b/package.json index 5ec3fc4..ef02304 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "seamless-texture-generator", - "version": "1.1.15", + "version": "1.1.16", "description": "Seamless texture generator", "homepage": "https://github.com/schalkt/tgen/", "scripts": { diff --git a/src/tgen-base.js b/src/tgen-base.js index 1a25918..19b6d8d 100644 --- a/src/tgen-base.js +++ b/src/tgen-base.js @@ -11,7 +11,7 @@ var SeamlessTextureGenerator = (function () { return { - version: '1.1.15', + version: '1.1.16', defaults: {}, effects: {}, filters: [],