Skip to content

Commit

Permalink
Updated package files
Browse files Browse the repository at this point in the history
Updated version
Fixed some bugs (by sonarcloud)
  • Loading branch information
TS committed Dec 26, 2023
1 parent aef4a0d commit c754451
Show file tree
Hide file tree
Showing 13 changed files with 539 additions and 521 deletions.
2 changes: 1 addition & 1 deletion dist/tgen-with-presets.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/tgen-with-presets.min.js.LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* https://texture-generator.com/
*
* @copyright 2015-2022 Tamas Schalk
* @version 1.4.21
* @version 1.4.22
* @license MIT
*
*/
Binary file modified dist/tgen-with-presets.min.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/tgen.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/tgen.min.js.LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* https://texture-generator.com/
*
* @copyright 2015-2022 Tamas Schalk
* @version 1.4.21
* @version 1.4.22
* @license MIT
*
*/
Binary file modified dist/tgen.min.js.gz
Binary file not shown.
1,029 changes: 523 additions & 506 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "seamless-texture-generator",
"version": "1.4.21",
"version": "1.4.22",
"description": "Seamless texture generator",
"homepage": "https://github.com/schalkt/tgen/",
"scripts": {
Expand Down Expand Up @@ -34,7 +34,7 @@
"devDependencies": {
"compression-webpack-plugin": "^10.0.0",
"cross-env": "^7.0.3",
"eslint": "^8.52.0",
"eslint": "^8.56.0",
"i": "^0.3.7",
"laravel-mix": "^6.0.49",
"lodash": "^4.17.21",
Expand Down
4 changes: 2 additions & 2 deletions src/tgen-base-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
* https://texture-generator.com/
*
* @copyright 2015-2022 Tamas Schalk
* @version 1.4.21
* @version 1.4.22
* @license MIT
*
*/

const SeamlessTextureGenerator = {
version : "1.4.21",
version : "1.4.22",
defaults: {},
effects: {},
prepare: {},
Expand Down
2 changes: 1 addition & 1 deletion src/tgen-base-with-presets.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* https://texture-generator.com/
*
* @copyright 2015-2022 Tamas Schalk
* @version 1.4.21
* @version 1.4.22
* @license MIT
*
*/
Expand Down
2 changes: 1 addition & 1 deletion src/tgen-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* https://texture-generator.com/
*
* @copyright 2015-2022 Tamas Schalk
* @version 1.4.21
* @version 1.4.22
* @license MIT
*
*/
Expand Down
5 changes: 3 additions & 2 deletions src/tgen-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ module.exports = function (tgen) {
};

// generator.clone = function (destination, source) {
// return Object.assign(destination, source);
// return {...destination, ...source};
// };

generator.minMaxNormalize = function (min, max) {
Expand Down Expand Up @@ -1478,7 +1478,8 @@ module.exports = function (tgen) {
};

generator.do = function (name, params, layerId) {
params = Object.assign({}, self.defaults[name], params);

params = {...self.defaults[name], ...params};

// setup random seed if undefined
if (params.seed !== undefined) {
Expand Down
6 changes: 3 additions & 3 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ const PNGOptions = {

const savePNG = function (generator, name, width, height) {

const options = Object.assign({}, PNGOptions);
const options = {...PNGOptions};

options.width = width ? width : PNGOptions.width;
options.height = height ? height : PNGOptions.height;
options.width = width || PNGOptions.width;
options.height = height || PNGOptions.height;

const file = new PNG(options);
file.data = generator.texture.data;
Expand Down

0 comments on commit c754451

Please sign in to comment.