-
Notifications
You must be signed in to change notification settings - Fork 19
/
index.html
96 lines (94 loc) · 3.64 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>img2string</title>
<link rel="stylesheet" href="master.css">
<link href="https://fonts.googleapis.com/css?family=Permanent+Marker" rel="stylesheet">
</head>
<body>
<div id="settings">
<h2>Settings</h2>
<table id="settingsTable">
<tr>
<td>image:</td>
<td><input type="file" id="fileItem" onchange="onFileSelected(event)"></td>
</tr>
<tr>
<td title="load a json file which has been saved using this program that stores all the instructions that have been calculated.">load external .json file</td>
<td><input type="file" onchange="onJSONselected(event, loadJSON)" id="filepicker" style="display: none"><button type="button" onclick="document.getElementById('filepicker').click()">load .json</button><button type="button" onclick="saveJSON()">save .json</button></td>
</tr>
<tr>
<td>number of nails:</td>
<td><input type="number" id="nails" value="160"></td>
</tr>
<tr>
<td>radius:</td>
<td><input type="range" id="radius" value="1" min="0" max="1" step="0.1" onchange="document.getElementById('radiusIndicator').innerHTML = this.value"><span id="radiusIndicator">1</span></td>
</tr>
<tr>
<td>string transparency</td>
<td><input type="number" id="transparency" value="0.3"></td>
</tr>
<tr>
<td>string color</td>
<td>
<input type="color" id="stringColor" value="#000000">
</td>
</tr>
<tr>
<td>starting nail</td>
<td><input type="number" id="startingNail" value="0"></td>
</tr>
<tr>
<td>string limit <input type="checkbox" id="useLimit" checked></td>
<td><input type="number" id="stringNumber" value="2200"></td>
</tr>
<tr>
<td>string number counter:</td>
<td><input type="checkbox" id="showStringNumber" checked></td>
</tr>
<tr>
<td><button type="button" onclick="generate();loop();">generate</button></td>
<td><button type="button" onclick="stopOrResume();" id="resumeButton">paused</button></td>
</tr>
</table>
</div>
<div id="credit">
<h2>Credits</h2>
<p>Inspired by: <a href="https://youtu.be/-S_l8GGxOhU">GoldPlatedGoof</a>
<br>
and his video:<br><iframe src="https://www.youtube.com/embed/-S_l8GGxOhU" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
<br>
<br>
Programmed by: <span class="programmer">Luca Leon Happel</span> in <span class="date">(2017)</span>
<br>
Thanks to: <span class="tester">Stefan Schulz</span> <span class="tester">Aleyna Yaşar Yıldız</span></p>
</div>
<div id="output">
<h2>Output</h2>
<div class="overview">
<table id="instructions">
</table>
</div>
</div>
<div id="processing">
<h2>Processing</h2>
<div id="instructions">
<ol>
<li>click: "pick file", right to "image:"</li>
<li>click: "generate"</li>
<li>click: "paused"</li>
<li>wait... the first strings can take a few minutes</li>
<li>after around 10 strings the process will be much quicker</li>
</ol>
</div>
<span class="progressStuff">progress: <progress id="progressBar"value="0" max="1"></progress> <span id="progress">0/0</span></span><br>
<canvas id="original_canvas" width="300" height="300"></canvas>
<canvas id="processing_canvas" width="300" height="300"></canvas>
<canvas id="finish_canvas" width="300" height="300"></canvas>
</div>
<script src="main.js" charset="utf-8"></script>
<a href="https://github.com/Quoteme/img2string"><img style="position: absolute; top: 0; left: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_left_red_aa0000.png" alt="Fork me on GitHub"></a>
</body>
</html>