-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
123 lines (123 loc) · 5.84 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Create & Transform Braille Art</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/style_smol.css">
<link rel="stylesheet" media="screen and (min-width: 900px) and (min-height: 769px)" href="css/style.css">
</head>
<body>
<h1> Create Braille Pictures from Twitch Emotes and Images </h1>
<div id="content">
<textarea id="input" cols="70" rows="30" placeholder="Paste in your braille art string to transform it, or select an input method on the right."></textarea>
<div id="controls">
<div class="control" id="input">
<label for="inputSelection"><b>Input from:</b> </label>
<select id="inputSelection">
<option value="twitch">Twitch Emote</option>
<option value="upload">Upload</option>
<option value="link">Link</option>
</select>
<table id="twitchInput">
<tr>
<td>Channel: </td>
<td><input id="channel" type="text"></td>
</tr>
<tr>
<td>Emote: </td>
<td><input id="emote" type="text"></td>
</tr>
</table>
<input id="fileinput" type="file" accept=".png, .jpeg, .jpg" style="display: none">
<input id="linkinput" type="text" style="display: none">
<div id="status" style="display: none">Could not be found.</div>
<div id="loader" style="display: none">
<div id="bar"></div>
</div>
</div>
<div class="control" id="dotOption">
<table>
<tr>
<td><input type="checkbox" id="dotForBlank" value="True" checked></td>
<td><label for="dotForBlank">Replace blank characters</label></td>
</tr>
<tr>
<td><input type="checkbox" id="transparency" value="True" checked></td>
<td><label for="transparency">Fill transparency</label></td>
</tr>
<tr>
<td><input type="checkbox" id="dithering" value="False"></td>
<td>
<label for="dithering">Use dithering: </label>
<select id="ditheringSelection">
<option value="od">Ordered dithering</option>
<option value="fs">Floyd-Steinberg</option>
</select>
</td>
</tr>
</table>
</div>
<div class="control">
<table>
<tr>
<td>Treshold: </td>
<td><input type="range" id="brightness" oninput="slider_drag()" min="0" max="255" value="105"></td>
</tr>
<tr>
<td>Height:</td>
<td><input type="number" id="height" value="60" step="10"></td>
</tr>
<tr>
<td>Width:</td>
<td><input type="number" id="width" value="60" step="10"></td>
</tr>
</table>
<button id="genButton"><b>Generate</b></button>
</div>
<div class="control" id="transform">
<button onclick="invert_click()">Invert</button>
<button onclick="rotate_click()">Rotate</button>
<button onclick="mirror_click()">Mirror</button>
</div>
<button id="background" onclick="toggle_background()">Toggle Background</button>
</div>
</div>
<footer>
<div id="author">
<p><b> By VJ-Duardo </b></p>
<p> Github: <a href="https://github.com/VJ-Duardo/Braille-Art" target="_blank">VJ-Duardo/Braille-Art</a></p>
</div>
<div id="apis">
<table>
<tr>
<td><b>API's used</b></td>
</tr>
<tr>
<td>Twitch Emotes: </td>
<td><a href="https://twitchemotes.com/apidocs">https://twitchemotes.com/apidocs</a></td>
</tr>
<tr>
<td>BetterTTV: </td>
<td><a href="https://betterttv.com/">https://betterttv.com/</a></td>
</tr>
<tr>
<td>FrankerFaceZ: </td>
<td><a href="https://www.frankerfacez.com/developers">https://frankerfacez.com/developers</a></td>
</tr>
<tr>
<td>CORS Anywhere: </td>
<td><a href="https://github.com/Rob--W/cors-anywhere">https://github.com/Rob--W/cors-anywhere</a></td>
</tr>
</table>
</div>
</footer>
<script src="js/braille_data.js"></script>
<script src="js/transform.js"></script>
<script src="js/Pixel.js"></script>
<script src="js/dithering.js"></script>
<script src="js/generate.js"></script>
<script src="js/urlfetcher.js"></script>
<script src="js/index.js"></script>
</body>
</html>