forked from mrdoob/three.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
162 lines (113 loc) · 2.91 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>three.js - documentation</title>
<style>
@font-face {
font-family: 'inconsolata';
src: url('files/inconsolata.woff') format('woff');
font-weight: normal;
font-style: normal;
}
html {
height: 100%;
}
body {
margin: 0;
padding: 0;
height: 100%;
color: #555;
font-family: 'inconsolata';
font-size: 15px;
line-height: 18px;
overflow: hidden;
}
a {
color: #2194CE;
}
#panel {
position: fixed;
width: 260px;
height: 100%;
overflow: auto;
}
#panel h1 {
margin-top: 20px;
margin-left: 20px;
font-size: 25px;
font-weight: normal;
}
#panel h1 a {
color: #444;
text-decoration: none;
}
#panel h2 {
color: #454545;
font-size: 18px;
font-weight: normal;
margin-top: 20px;
margin-left: 20px;
}
#panel h3 {
color: #666;
font-size: 16px;
font-weight: normal;
margin-top: 20px;
margin-left: 20px;
}
#panel ul {
list-style-type: none;
padding: 0px;
margin-left: 20px;
}
#viewer {
border: 0px;
margin-left: 260px;
width: -webkit-calc(100% - 260px);
width: -moz-calc(100% - 260px);
width: calc(100% - 260px);
height: 100%;
overflow: auto;
}
</style>
</head>
<body>
<div id="panel"></div>
<iframe id="viewer"></iframe>
<script src="list.js"></script>
<script>
var REVISION = '52';
var panel = document.getElementById( 'panel' );
var viewer = document.getElementById( 'viewer' );
var html = '<h1><a href="http://threejs.org">three.js</a><span style="font-size: 50%; vertical-align: super;"> r' + REVISION + '</span></h1>';
for ( var section in list ) {
html += '<h2>' + section + '</h2>';
html += '<ul>';
for ( var category in list[ section ] ) {
html += '<h3>' + category + '</h3>';
html += '<ul>';
for ( var i = 0; i < list[ section ][ category ].length; i ++ ) {
var page = list[ section ][ category ][ i ];
html += '<li><a href="javascript:goTo(\'' + section + '\', \'' + category + '\', \'' + page[ 0 ] + '\')">' + page[ 0 ] + '</a></li>';
}
html += '</ul>';
}
html += '</ul>';
}
panel.innerHTML += html;
// Page loading
function goTo( section, category, name ) {
window.document.title = 'three.js - documentation - ' + section + ' - ' + name;
window.location.hash = section + '/' + category + '/' + name.replace(/\ /g, '-');
viewer.src = pages[ section ][ category ][ name ] + '.html';
}
function goToHash() {
var hash = window.location.hash.substring( 1 ).split('/');
goTo( hash[0], hash[1], hash[2].replace(/\-/g, ' ') );
}
window.addEventListener( 'hashchange', goToHash, false );
if ( window.location.hash.length > 0 ) goToHash();
</script>
</body>
</html>