Skip to content

Commit

Permalink
fix(cell size)
Browse files Browse the repository at this point in the history
make sure cell size is an integer value
  • Loading branch information
Marcel Michau committed May 17, 2020
1 parent cec840e commit 5406479
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Decimal value between 0 and 1 (inclusive), defaults to `Math.random()`. Specify

### --cellSize

Integer, defaults to `Math.random() * 200 + 40`. Specify the size of the mesh used to generate triangles. Larger values will result in coarser patterns, smaller values will result in finer patterns. Note that very small values may dramatically increase the runtime of Trianglify.
Integer, defaults to `Math.floor(Math.random() * 200 + 40)`. Specify the size of the mesh used to generate triangles. Larger values will result in coarser patterns, smaller values will result in finer patterns. Note that very small values may dramatically increase the runtime of Trianglify.

### --seed

Expand Down
2 changes: 1 addition & 1 deletion cli.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import fs from 'fs';
const screenWidth = parsedArgs.width ?? 3840;
const screenHeight = parsedArgs.height ?? 2160;
const variance = parsedArgs.variance ?? Math.random();
const cellSize = parsedArgs.cellSize ?? Math.random() * 200 + 40;
const cellSize = parsedArgs.cellSize ?? Math.floor(Math.random() * 200 + 40);
const seed = parsedArgs.seed ?? null;
const colors = parsedArgs?.colors.split(',') ?? 'random';

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wallangle",
"version": "1.1.0",
"version": "1.1.1",
"description": "A CLI utility to set algorithmically generated triangle art as your desktop wallpaper/background.",
"repository": "https://github.com/MarcelMichau/wallangle",
"author": {
Expand Down

0 comments on commit 5406479

Please sign in to comment.