Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Tamas Schalk committed Sep 8, 2019
2 parents a966eb0 + c2b7dc5 commit 42f5aad
Show file tree
Hide file tree
Showing 16 changed files with 311 additions and 166 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Seamless texture generator in Javascript

## Try the online generator [here](https://texture-generator.com/generator/)

![examples](https://texture-generator.com/generator/demo/images/examples.jpg#20180809)
![examples](https://texture-generator.com/generator/demo/images/examples.jpg#20190908)

## Requirements

Expand Down Expand Up @@ -160,19 +160,19 @@ Seamless texture generator in Javascript

### Available blends [demo here](https://texture-generator.com/generator/demo/blends.html)

![blends](https://texture-generator.com/generator/demo/images/blends.jpg#20180809)
![blends](https://texture-generator.com/generator/demo/images/blends.jpg#20190908)

### Available effects [demo here](https://texture-generator.com/generator/demo/effects.html)

![effects](https://texture-generator.com/generator/demo/images/effects.jpg#20180809)
![effects](https://texture-generator.com/generator/demo/images/effects.jpg#20190908)

### Available filters [demo here](https://texture-generator.com/generator/demo/filters.html)

![filters](https://texture-generator.com/generator/demo/images/filters.jpg#20180809)
![filters](https://texture-generator.com/generator/demo/images/filters.jpg#20190908)

### Available color normalize [demo here](https://texture-generator.com/generator/demo/normalize.html)

![normalize](https://texture-generator.com/generator/demo/images/normalize.jpg#20180809)
![normalize](https://texture-generator.com/generator/demo/images/normalize.jpg#20190908)

### Available other options

Expand Down
2 changes: 1 addition & 1 deletion demo/blends.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h2>Blends</h2>
<a target="_blank" href="https://github.com/schalkt/tgen">github</a> |
<a target="_blank" href="https://texture-generator.com/generator/">demo website</a>
<br/>
&copy; 2015-2018
&copy; 2015-2019
</span>
</div>
<div id="blends" class="images"></div>
Expand Down
3 changes: 2 additions & 1 deletion demo/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ a {
width: 100%;
height: auto;
cursor: pointer;
background-color: #000000;
box-shadow: 0px 0px 5px 0px #000000;
}

Expand Down Expand Up @@ -252,7 +253,7 @@ a {
}

.spinner {
display: inline-block;
display: block;
width: 7px;
height: 7px;
background-color: #ffffff;
Expand Down
2 changes: 1 addition & 1 deletion demo/effects.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h2>Effects</h2>
<a target="_blank" href="https://github.com/schalkt/tgen">github</a> |
<a target="_blank" href="https://texture-generator.com/generator/">demo website</a>
<br/>
&copy; 2015-2018
&copy; 2015-2019
</span>
</div>
<div id="effects" class="images">
Expand Down
2 changes: 1 addition & 1 deletion demo/examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h2>Examples</h2>
<a target="_blank" href="https://github.com/schalkt/tgen">github</a> |
<a target="_blank" href="https://texture-generator.com/generator/">demo website</a>
<br/>
&copy; 2015-2018
&copy; 2015-2019
</span>
</div>
<div id="examples" class="images">
Expand Down
2 changes: 1 addition & 1 deletion demo/filters.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h2>Filters</h2>
<a target="_blank" href="https://github.com/schalkt/tgen">github</a> |
<a target="_blank" href="https://texture-generator.com/generator/">demo website</a>
<br/>
&copy; 2015-2018
&copy; 2015-2019
</span>
</div>
<div id="filters" class="images"></div>
Expand Down
Binary file modified demo/images/effects.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ <h1>Seamless texture generator</h1>
<img alt="" style="border: none;" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1"
height="1">
</form>
<br/>&copy; 2015-2018<br/><a target="_blank" href="https://github.com/schalkt/">tamas.schalk</a>
<br/>&copy; 2015-2019<br/><a target="_blank" href="https://github.com/schalkt/">tamas.schalk</a>
</div>

<div class="phases"></div>
Expand Down
228 changes: 205 additions & 23 deletions demo/js/effects.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,224 @@ $(document).ready(function () {
"items": [
[0, "fill"],
[1, "noise"],
[2, "spheres"],
[3, "pyramids"],
[4, "squares"],
[5, "circles"],
[6, "lines"],
[7, "lines2"],
[8, "subplasma"],
[9, "waves"],
[10, "crosshatch"],
[11, "clouds"],
[12, "colorbar"],
[13, "checkerboard"],
[14, "dots"],
[15, "mandelbrot"]
[2, "spheres", {
"blend": "lighten",
"origin": "random",
"dynamic": false,
"count": 21,
"size": [
21,
42
],
}],
[3, "pyramids", {
"blend": "difference-invert",
"rgba": [
242,
198,
13,
183
],
"origin": "random",
"dynamic": true,
"count": 17,
"size": [
6.13875885419558,
65.06580611909934
],
"seed": 698883
}],
[4, "squares", {
"blend": "lighten",
"rgba": [
215,
177,
225,
187
],
"origin": "random",
"count": 77,
"size": [
1.960330601878923,
20.631680655331365
],
"seed": 13618783
}],
[5, "circles", {
"blend": "lighten",
"rgba": [
59,
82,
184,
147
],
"origin": "random",
"count": 15,
"size": [
19.960330601878923,
5.631680655331365
],
"seed": 9805408
}],
[6, "lines", {
"blend": "opacity",
"rgba": [
57,
161,
112,
77
],
"size": 201,
"count": 210,
}],
[7, "lines2", {
"blend": "screen",
"rgba": [
175,
199,
23,
153
],
"type": "vertical",
"size": [
0.1,
21
],
"count": 18,
"seed": 6005181
}],
[8, "subplasma", {
"seed": 4771973,
"size": 4,
"rgba": [
126,
131,
133,
238
]
}],
[9, "waves", {
"blend": "lineardodge",
"rgba": [
6,
48,
52,
230
],
"level": 68,
"xsines": 13,
"ysines": 4,
"seed": 5090682
}],
[10, "crosshatch", {
"blend": "screen",
"rgba": [
52,
92,
86,
230
],
"level": 39,
"xadjust": 74.62633158935496,
"yadjust": 45.021245801724405,
"seed": 4889645
}],
[11, "clouds", {
"blend": "lighten",
"rgba": [
55,
125,
255,
255
],
"seed": 11904915,
"roughness": 5,
"colormap": null
}],
[12, "colorbar", {
"type": "vertical",
"colormap": "fire",
"mirror": true,
"seed": 10080281
}],
[13, "checkerboard", {
"rgba": [
14,
121,
197,
177
],
"even": false,
"size": 16,
"seed": 6079974
}],
[14, "dots", {
"blend": "lighten",
"gridX": 11,
"gridY": 10,
"size": [
200,
400
],
"seed": 3205906,
"rgba": [
29,
137,
198,
226
],
"shape": "sphere",
"dynamic": true,
"xsines": 9,
"ysines": 5
}],
[15, "xor", {
"rgba": [
115,
45,
39,
213
],
"level": 43,
"zoom": 2,
"seed": 15009948
}]
]
};

var addImage = function (key, canvas, selector) {
var img = '<img src="' + canvas.toDataURL("image/png") + '" />';
var images = $('<div class="img"><small>' + key + '</small>' + img + '</div>');
$(selector).append(images);
}

var texture = generator.render(params);
};
var i;

for (var i = 0; i < params.items.length; i++) {
params['items'][i][2] = {
"rgba": [
for (i = 0; i < params.items.length; i++) {

if (params.items[i][2] === undefined) {
params.items[i][2] = {};
}
if (params.items[i][2].rgba === undefined) {
params.items[i][2].rgba = [
[128, 255],
[128, 255],
[128, 255], 255
]
};
addImage(params['items'][i][1], texture.toCanvas(texture.layers[i]), '#effects');
];
}
if (params.items[i][2].seed === undefined) {
params.items[i][2].seed = 7771;
}

}

var texture = generator.render(params);

for (i = 0; i < params.items.length; i++) {
addImage(params.items[i][1], texture.toCanvas(texture.layers[i]), '#effects');
}


$('.hideme').html('');

});
2 changes: 1 addition & 1 deletion demo/normalize.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h2>Normalize</h2>
<a target="_blank" href="https://github.com/schalkt/tgen">github</a> |
<a target="_blank" href="https://texture-generator.com/generator/">demo website</a>
<br/>
&copy; 2015-2018
&copy; 2015-2019
</span>
</div>
<div id="normalize" class="images"></div>
Expand Down
Loading

0 comments on commit 42f5aad

Please sign in to comment.