forked from wwwtyro/speck
-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
244 lines (209 loc) · 10.8 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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
<html>
<head>
<title>Speck</title>
<link rel="shortcut icon" href="static/favicon.png">
<script src="static/bundle.js"></script>
<link rel="stylesheet" type="text/css" href="static/index.css">
</head>
<body>
<div id="render-container">
<canvas id="renderer-canvas"></canvas>
</div>
<div id="controls-menu">
<button id="menu-button-structure">Structure</button>
<button id="menu-button-render">Render</button>
<button id="menu-button-share">Share</button>
<button id="menu-button-help">Help</button>
<button id="menu-button-about">About</button>
</div>
<div id="controls-container">
<div id="controls-structure">
<h2>Samples</h2>
<select id="controls-sample"></select>
<h2>Custom</h2>
Paste xyz file data:<br>
<textarea id="xyz-data" rows="4" columns="10"></textarea><br><br>
<button id="xyz-button">Load</button><br><br>
</div>
<div id="controls-render">
<table>
<tr>
<td align="right">Preset</td>
<td>
<select id="view-preset">
<option value="default">Default</option>
<option value="stickball">Ball & Stick</option>
<option value="toon">Toon</option>
<option value="licorice">Licorice</option>
</select>
</td>
</tr>
<tr><td colspan="10"><hr></td></tr>
<tr>
<td align="right">Atom radius</td>
<td><input id="atom-radius" type="range" min="1" max="100" value="50" class="control-width"></td>
<td id="atom-radius-text"></td>
<td class="control-help">a + scrollwheel</td>
</tr>
<tr>
<td align="right">Relative atom radius</td>
<td><input id="relative-atom-radius" type="range" min="0" max="100" value="100" class="control-width"></td>
<td id="relative-atom-radius-text"></td>
<td class="control-help">z + scrollwheel</td>
</tr>
<tr>
<td align="right">Atom shade</td>
<td><input id="atom-shade" type="range" min="0" max="100" value="0" class="control-width"></td>
<td id="atom-shade-text"></td>
<td class="control-help">w + scrollwheel</td>
</tr>
<tr><td colspan="10"><hr></td></tr>
<tr>
<td align="right">Bonds</td>
<td><input type="checkbox" id="bonds"></td>
</tr>
<tr>
<td align="right">Bond radius</td>
<td><input id="bond-radius" type="range" min="0" max="100" value="50" class="control-width"></td>
<td id="bond-radius-text"></td>
<td class="control-help">b + scrollwheel</td>
</tr>
<tr>
<td align="right">Bond threshold</td>
<td><input type="number" step="0.1" min="0.0" max="2.5" id="bond-threshold" value="1.2" class="control-width"></td>
</tr>
<tr>
<td align="right">Bond shade</td>
<td><input id="bond-shade" type="range" min="0" max="100" value="0" class="control-width"></td>
<td id="bond-shade-text"></td>
<td class="control-help">s + scrollwheel</td>
</tr>
<tr><td colspan="10"><hr></td></tr>
<tr>
<td align="right">Ambient occlusion</td>
<td><input id="ambient-occlusion" type="range" min="0" max="100" value="50" class="control-width"></td>
<td id="ambient-occlusion-text"></td>
<td class="control-help">o + scrollwheel</td>
</tr>
<tr>
<td align="right">Brightness</td>
<td><input id="brightness" type="range" min="0" max="100" value="50" class="control-width"></td>
<td id="brightness-text"></td>
<td class="control-help">l + scrollwheel</td>
</tr>
<tr>
<td align="right">AO Resolution</td>
<td>
<select id="ao-resolution">
<option value="16">16x16</option>
<option value="32">32x32</option>
<option value="64">64x64</option>
<option value="128">128x128</option>
<option value="256">256x256</option>
<option value="512">512x512</option>
<option value="1024">1024x1024</option>
<option value="2048">2048x2048</option>
</select>
</td>
</tr>
<tr>
<td align="right">Samples per frame</td>
<td>
<select id="samples-per-frame">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="4">4</option>
<option value="8">8</option>
<option value="16">16</option>
<option value="32">32</option>
<option value="64">64</option>
<option value="128">128</option>
<option value="256">256</option>
</select>
</td>
</tr>
<tr><td colspan="10"><hr></td></tr>
<tr>
<td align="right">Depth of field strength</td>
<td><input id="dof-strength" type="range" min="0" max="100" value="0" class="control-width"></td>
<td id="dof-strength-text"></td>
<td class="control-help">d + scrollwheel</td>
</tr>
<tr>
<td align="right">Depth of field position</td>
<td><input id="dof-position" type="range" min="0" max="100" value="0" class="control-width"></td>
<td id="dof-position-text"></td>
<td class="control-help">p + scrollwheel</td>
</tr>
<tr><td colspan="10"><hr></td></tr>
<tr>
<td align="right">Outline strength</td>
<td><input id="outline-strength" type="range" min="0" max="100" value="50" class="control-width"></td>
<td id="outline-strength-text"></td>
<td class="control-help">q + scrollwheel</td>
</tr>
<tr>
<td align="right">Antialiasing passes</td>
<td><input type="number" step="1" min="0" max="32" id="fxaa" value="1" class="control-width"></td>
</tr>
<tr>
<td align="right">Resolution</td>
<td>
<select id="resolution">
<option value="256">256x256</option>
<option value="512">512x512</option>
<option value="768">768x768</option>
<option value="1024">1024x1024</option>
<option value="1536">1536x1536</option>
<option value="2048">2048x2048</option>
</select>
</td>
</tr>
</table>
<button id="center-button">Center</button>
</div>
<div id="controls-share">
<button id="share-url-button">Click this</button>then share the url below.<br><br>
<textarea id="share-url" cols="48" rows="8"></textarea><br><br>
<hr><br>
<a href='#' class=button id="download-image-button" download='render.png'>Download</a>as a
<select id="download-image-format-selector">
<option value="png">PNG</option>
<option value="jpg">JPEG</option>
<option value="bmp">BMP</option>
<option value="gif">GIF</option>
<option value="webp">WebP</option>
</select>
<br><br>
</div>
<div id="controls-help">
<p>
Speck has been tested against recent Firefox and Chrome browsers. Performance
appears to be significantly better on Chrome.<br><br>
To translate your system, use the shift key and click and drag on the rendering.
To rotate, click and drag. To zoom, use the scrollwheel.
</p>
</div>
<div id="controls-about">
<h2>Speck</h2>
High quality atomistic system rendering.<br><br>
Author: Rye Terrell | wwwtyro at gmail.com<br><br>
Github: <a href="https://github.com/wwwtyro/speck">https://github.com/wwwtyro/speck</a>
<h2>Copyright, license, etc.</h2>
<p>
Speck and the images it produces are completely public domain
and free to use. Do with it/them what you will. Attribution
is appreciated but not required.
</p>
</div>
</div>
<div id="ao-indicator"></div>
<div id="error">
<div id="error-text"></div>
<br>
<button id="close-error">Continue</button>
</div>
<a href="http://wwwtyro.github.io"><img src="http://wwwtyro.github.io/media/badge-br.png" style="position: fixed; right: 0px; bottom: 0px"></a>
</body>
</html>