-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
217 lines (183 loc) · 6.12 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
<!doctype html>
<html class="max-space" lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="height=device-height, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<!-- THREEJS -->
<script src="https://cdn.rawgit.com/mrdoob/three.js/master/build/three.min.js"></script>
<script src="https://cdn.rawgit.com/mrdoob/three.js/dev/examples/js/controls/TrackballControls.js"></script>
<script src="https://cdn.rawgit.com/mrdoob/three.js/dev/examples/js/controls/OrbitControls.js"></script>
<!-- D3 Library -->
<script type="text/javascript" src="https://unpkg.com/[email protected]"></script>
<!-- SOM LIBRARY -->
<script type="text/javascript" src="./node_modules/isom-layout/dist/som.js"></script>
<!-- MY SOM LIBRARY (SHAPE)-->
<script type="text/javascript" src="./node_modules/isom-layout-3d/dist/som.js"></script>
<!-- MY SOM LIBRARY (SPHERE)-->
<script type="text/javascript" src="./node_modules/isom-layout-sphere/dist/som.js"></script>
<!-- My Database -->
<script type="text/javascript" src="./db.js"></script>
<script type="text/javascript" src="./db2.js"></script>
<script type="text/javascript" src="./db3.js"></script>
<style type="text/css">
html, body {
padding: 0;
margin: 0;
}
.max-space {
position: relative;
min-width: 100vw;
width: 100vw;
max-width: 100vw;
min-height: 100vh;
height: 100vh;
max-height: 100vh;
overflow: hidden;
}
.small-space {
background-color: white;
min-width: 100%;
width: 100%;
max-width: 100%;
min-height: 100vh;
height: 100%;
max-height: 100%;
overflow: hidden;
}
.split-grid {
background-color: black;
--gap-space: 6px;
height: calc(100% - 60px);
max-height: calc(100% - 60px);
display: grid;
grid-template-columns: calc(33% - (var(--gap-space) / 3)) calc(34% - (var(--gap-space) / 3)) calc(33% - (var(--gap-space) / 3));
grid-template-rows: 100%;
grid-column-gap: var(--gap-space);
}
.canvas-title {
position: absolute;
top: 10px;
font-size: 20px;
font-weight: 900;
-webkit-transform: translate(-50%, 0);
-moz-transform: translate(-50%, 0);
-ms-transform: translate(-50%, 0);
-o-transform: translate(-50%, 0);
transform: translate(-50%, 0);
height: 24px;
max-height: 24px;
padding: 0 10px;
display: flex;
align-items: center;
justify-content: center;
cursor: default;
}
.canvas-title.left {
left: 25%;
}
.canvas-title.right {
left: 75%;
}
.canvas-title.dark {
background-color: #4d4d4d77;
color: white;
}
.canvas-title.light {
background-color: #d4d4d477;
color: #2d2d2d;
}
#c {
position: absolute;
left: 0;
width: 100%;
height: calc(100% - 60px);
}
.list-item {
position: relative;
}
.canvas-title-2 {
position: absolute;
top: 10px;
left: 50%;
-webkit-transform: translate(-50%, 0);
-moz-transform: translate(-50%, 0);
-ms-transform: translate(-50%, 0);
-o-transform: translate(-50%, 0);
transform: translate(-50%, 0);
font-size: 20px;
font-weight: 900;
height: 24px;
max-height: 24px;
padding: 0 10px;
display: flex;
align-items: center;
justify-content: center;
background-color: #4d4d4d77;
color: white;
}
.list-item .scene {
width: 100%;
height: calc(100% - 60px);
}
.legend {
position: absolute;
left: 0;
bottom: 0;
z-index: 1000;
height: 60px;
max-height: 60px;
width: 100%;
max-width: 100%;
border-top: 6px solid black;
background-color: white;
padding: 10px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-around;
}
.subject {
background-color: rgb(255, 255, 0);
}
.document {
background-color: rgb(0, 0, 255);
}
.checkbox {
display: flex;
align-items: center;
justify-content: flex-start;
}
</style>
</head>
<body class="max-space split-grid" id="content">
<canvas id="c"></canvas>
<div class="legend">
<select name="options" id="select-db" disabled>
<option value="0" selected>Les Misérables</option>
<option value="1">Super Small</option>
<option value="2">Some Files</option>
</select>
<div class="checkbox">
<input type="checkbox" id="checkbox" checked disabled> Faster
</div>
<div class="normal">Scroll: Zoom</div>
<div class="normal">Left-Click: Rotate</div>
<div class="normal">Right-Click: Move</div>
<div class=""></div>
<div class=""></div>
<div class=""></div>
<div class="subject" id="subject-legend">SUBJECT</div>
<div class="document" id="document-legend">DOCUMENT</div>
</div>
<script id="template" type="notjs">
<div class="scene"></div>
<div class="canvas-title-2">$</div>
</script>
<script type="text/javascript" src="./main-three.js"></script>
</body>
</html>