You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`shapeFuzz`| Variance factor of grid points (0-1) |
85
+
|`colorFuzz.hue`| Variance factor of triangle color hue (0-1) |
86
+
|`colorFuzz.saturation`| Variance factor of triangle color saturation (0-1) |
87
+
|`colorFuzz.lightness`| Variance factor of triangle color lightness (0-1) |
88
+
|`colorFuzz.alpha`| Variance factor of triangle color alpha (0-1) |
89
+
|`diagonals`| Either `'nw-se'`, `'ne-sw'`, `'alternating'`, or `'random'`|
89
90
90
91
Variance options control how the triangles can deviate from their original shape and coloring.
91
92
92
93
The option `shapeFuzz` controls how far the grid points may venture from their original location.
93
94
94
95
Parameters that belong the object `colorFuzz` control how much the triangle colors may deviate from their original color. This can be controlled along all four axes of the HSLA color representation.
95
96
97
+
The option `diagonals` controls which diagonals of the squares of the grid are used:
98
+
-`'nw-se'` draws the diagonals from the top left corners to the bottom right corners (North-West - South-East)
99
+
-`'ne-sw'` draws the diagonals from the top right corners to the bottom left corners (North-East - South-West)
100
+
-`'alternating'` draws diagonals alternating, so that no two neighboring squares have the same diagonal
101
+
-`'random'` draws diagonals randomly
96
102
97
103
For example:
98
104
@@ -106,6 +112,7 @@ const options = {
106
112
lightness:0.1,
107
113
alpha:0
108
114
},
115
+
diagonals:'nw-se',
109
116
...
110
117
}
111
118
```
@@ -264,6 +271,7 @@ let options = {
264
271
lightness:0.1,
265
272
alpha:0
266
273
},
274
+
diagonals:'nw-se',
267
275
coloring: {
268
276
mode:'linearGradient',
269
277
start: {
@@ -326,4 +334,4 @@ console.log(myNewSvgCode)
326
334
327
335
Triangle Mosaic is [licensed under MIT](./LICENSE).
328
336
329
-
Whatever you create with the library or web-based tool is yours and you may license it in any way you see fit.
337
+
The images you create with the library or web-based tool are yours and you may license them in any way you see fit.
0 commit comments