-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
131 lines (128 loc) · 5.44 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Generative SVG Grid Tool</title>
<link rel="stylesheet" href="src/styles.scss" />
</head>
<body>
<div class="window">
<div class="title-bar">
<div class="title-bar-text">Generative SVG Grid Tool</div>
</div>
<fieldset>
<p>
Generate SVG grids using perlin noise. All tiles are individual elements, also after you have
downloaded them. You can further edit these in your vector program of choice.
<br /><br />
Start with smaller values–this tool can easily push your browser to the limit!
</p>
<p>
Read more: <a href="https://moritzsalla.info/grid-tool">moritzsalla.info</a>
<br />
Code: <a href="https://github.com/moritzsalla/generative-grid-tool">Github Repo</a>
</p>
<hr />
<div class="item">
<h5>Background</h5>
<p>Not included in export</p>
<input type="color" id="bg" />
</div>
<hr />
<div class="item">
<h5>Dimensions</h5>
<field style="padding-right: 0.5rem">
<label>Width:</label>
<input type="number" min="1" step="1" id="width"
/></field>
<br />
<field>
<label>Height:</label>
<input type="number" min="1" step="1" id="height" />
</field>
</div>
<hr />
<div class="item">
<h5>Zoom</h5>
<input type="range" min="1" max="100" id="zoom" />
</div>
<div class="item">
<h5>Horizontal Resolution</h5>
<input type="range" min="1" max="100" id="xOffset" />
</div>
<div class="item">
<h5>Vertical Resolution</h5>
<input type="range" min="1" max="100" id="yOffset" />
</div>
<hr />
<div class="item">
<h5>Noise</h5>
<field style="padding-right: 0.5rem">
<label>Base color:</label>
<input type="color" id="fill" />
</field>
<br />
<br />
<field style="padding-right: 0.5rem">
<label>Seed:</label>
<input type="number" min="0" step="1" id="seed"
/></field>
<br />
<br />
<field style="padding-right: 0.5rem">
<label>Detail:</label>
<input type="range" min="0" max="10" step="0.01" id="detail"
/></field>
<br />
<br />
<field style="padding-right: 0.5rem">
<label>Falloff:</label>
<input type="range" min="0" max="1" step="0.01" id="falloff"
/></field>
<br />
<br />
<h5>Custom Function</h5>
<p>
Type a custom function to calculate fill. Available variables:
<ul>
<li><code>x | x tile coordinate</code></li>
<li><code>y | y tile coordinate</code></li>
<li><code>c | c base color</code></li>
<li><code>noise() | simplex (perlin) noise</code></li>
<li><code>floor() | floor</code></li>
<li><code>ceil() | ceil</code></li>
<li><code>round() | round</code></li>
</ul>
<br />
Examples:
<br />
<code>noise(x, y)</code>
<br />
<code>noise(x*c, sin(y))</code>
<br />
<code>noise(x+y, floor(sin(x+y)))</code>
<br />
<br />
More documentation <a href="https://github.com/moritzsalla/generative-grid-tool">here</a>.
</p>
<input type="text" id="fn" />
</div>
<hr />
<div class="item">
<h5>Stroke</h5>
<label>Color:</label>
<input type="color" id="strokeColor" />
<br />
<br />
<label>Width:</label><input type="range" min="0" max="5" step="0.25" id="strokeWidth" />
</div>
<hr />
<div>
<button id="download">Download SVG</button>
</div>
</fieldset>
</div>
<script src="src/index.ts" defer></script>
</body>
</html>