-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreciprocal.html
84 lines (82 loc) · 2.17 KB
/
reciprocal.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
<!doctype html>
<html lang="en">
<head>
<title>Reciprocal UglyMol</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no">
<meta name="theme-color" content="#333333">
<style>
body { font-family: sans-serif; }
canvas { display: block; }
#viewer {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
#hud {
font-size: 15px;
color: #ddd;
background-color: rgba(0,0,0,0.6);
text-align: center;
position: absolute;
top: 10px;
left: 50%;
transform: translateX(-50%);
padding: 2px 8px;
border-radius: 5px;
z-index: 9;
white-space: pre-line;
}
#hud u { padding: 0 8px; text-decoration: none;
border: solid; border-width: 1px 0; }
#hud s { padding: 0 8px; text-decoration: none; opacity: 0.5; }
#help {
display: none;
font-size: 16px;
color: #eee;
background-color: rgba(0,0,0,0.7);
position: absolute;
left: 20px;
top: 50%;
transform: translateY(-50%);
cursor: default;
padding: 5px;
border-radius: 5px;
z-index: 9;
white-space: pre-line;
}
#inset {
width: 200px;
height: 200px;
background-color: #888;
position: absolute;
right: 0;
bottom: 0;
z-index: 2;
display: none;
}
a { color: #59C; }
</style>
<script src="uglymol.js"></script>
</head>
<body style="background-color: black">
<div id="viewer"></div>
<header id="hud" onmousedown="event.stopPropagation();"
ondblclick="event.stopPropagation();"
>This is reciprocal UM. <a href="#"
onclick="V.toggle_help(); return false;"
>H shows help.</a></header>
<footer id="help"></footer>
<div id="inset"></div>
<script>
V = new UM.ReciprocalViewer({viewer: "viewer", hud: "hud", help: "help"});
var rlp = /[?&#]rlp(=([^&#]*)|&|#|$)/.exec(window.location.href);
if (rlp && rlp[2])
V.load_data(decodeURIComponent(rlp[2].replace(/\+/g, " ")));
else
V.hud('Drag your rlp.json and/or dials.rs_mapper map to this page.');
</script>
</body>
</html>