-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
165 lines (152 loc) · 3.24 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="./drawings.js"></script>
<title>dithered pixel bonanza</title>
<style>
* {
background-color: #AAAAAA;
}
canvas {
border: 1px solid black;
float: left;
display: block;
margin-right: 2vh;
margin-left: 2vh;
}
</style>
</head>
<body>
<h1>dither pattern maker</h1>
<p>a fun lil dithering toy, <a href="https://github.com/simulacroix/dithering">code here</a></p>
<canvas
id="graphdisplayer"
width="800"
height="800"
></canvas>
<h2>Display settings</h2>
<span>Size</span>
<input
type="range"
min="2"
max="100"
value="25"
class="weight"
id="baseResolution"
/><span id="baseResolutionDisp">
25
</span>
<br/>
<h2>Image Generation</h2>
<span>Random Noise</span>
<input
type="range"
min="0"
max="100"
value="25"
class="weight"
id="imageNoise"
/>
<span id="imageNoiseDisp"></span>
<br/>
<span>Diagonal Gradient</span>
<input
type="range"
min="0"
max="100"
value="75"
class="weight"
id="imageGradient"
/>
<span id="imageGradientDisp"></span>
<br/>
<span>Solid White</span>
<input
type="range"
min="0"
max="100"
value="0"
class="weight"
id="imageSolidWhite"
/>
<span id="imageSolidWhiteDisp"></span>
<br/>
<span>Solid Black</span>
<input
type="range"
min="0"
max="100"
value="0"
class="weight"
id="imageSolidBlack"
/>
<span id="imageSolidBlackDisp"></span>
<br/>
<h2>Dithering Blend</h2>
<span>Input Image:</span>
<input
type="range"
min="0"
max="100"
value="100"
class="weight"
id="ditherImage"
/>
<span id="ditherImageDisp"></span>
<br/>
<span>Random Noise:</span>
<input
type="range"
min="0"
max="100"
value="25"
class="weight"
id="ditherNoise"
/>
<span id="ditherNoiseDisp"></span>
<br/>
<span>Mazing:</span>
<input
type="range"
min="0"
max="100"
value="50"
class="weight"
id="ditherMaze"
/>
<span id="ditherMazeDisp"></span>
<br/>
<span>Floyd-Steinberg:</span>
<input
type="range"
min="0"
max="100"
value="0"
class="weight"
id="ditherFloydSteinberg"
/>
<span id="ditherFloydSteinbergDisp"></span>
<br/>
<span>Checkerboard:</span>
<input
type="range"
min="0"
max="100"
value="0"
class="weight"
id="ditherCheckerboard"
/>
<span id="ditherCheckerboardDisp"></span>
<br/>
<span>Re-generate random noise:</span>
<input
type="button"
class="button"
id="reRandomize"
value="Re-Randomize"
/><br/>
</body>
</html>