-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
127 lines (117 loc) · 3.61 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Three.js Multi-Format Model Viewer</title>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"
/>
<link
rel="icon"
href="https://discoverthreejs.com/favicon.ico"
type="image/x-icon"
/>
<link type="text/css" rel="stylesheet" href="main.css" />
<script type="module" src="./dist/main.js"></script>
</head>
<body>
<canvas></canvas>
<div id="loading-overlay" class="fill">
<div id="file-upload-form">
<p>
Multi-Format Viewer for FBX, glTF and Collada files and associated textures in jpg,
png, gif, bmp or dds format using loaders from three.js r127.
</p>
<input
id="file-upload-input"
type="file"
name="files[]"
multiple=""
class="hide"
/>
<input
type="submit"
value="Upload or Drop Files Here"
id="file-upload-button"
/>
<p>Or load the <a id="example-duck" href="#">Example Duck</a></p>
</div>
<div id="loading-bar" class="hide">
<span id="bar">
<span id="progress"></span>
</span>
</div>
</div>
<div class="controls">
<div class="controls-section-blank"></div>
<div class="controls-section-lighting">
<input
id="lighting-slider"
type="range"
min="0"
max="8"
step="0.1"
value="0"
/>
<span id="light-symbol">Lighting</span>
</div>
<div class="controls-section-animation hide" id="animation-controls">
<select id="animation-clips">
<option value="static">Static Pose</option>
</select>
<button href="#" id="playback-control">
<span id="play-button" class="hide" aria-hidden="true">Play</span>
<span id="pause-button" class="" aria-hidden="true">Pause</span>
</button>
<input id="animation-slider" type="range" min="0" max="100" value="0" />
<button
id="export-anims"
href="#"
id="playback-control"
title="Save take as JSON"
>
Save Clip
</button>
</div>
<div class="controls-section-misc">
<div class="model-info hide">
<p>
Bounding box - L: <span id="bb-depth">0</span> W:
<span id="bb-width">0</span> H: <span id="bb-height">0</span>
</p>
<p>
Faces: <span id="faces"></span> Vertices:
<span id="vertices"></span>
</p>
</div>
<button href="#" id="toggle-grid" title="Toggle Grid">
Show Grid
</button>
<button href="#" id="toggle-info" title="Model info">
Show Info
</button>
<button
href="#"
id="toggle-environment"
title="Change Environment Map"
>
Switch Environment
</button>
<button href="#" id="toggle-background" title="Toggle background">
Toggle Background
</button>
<button href="#" id="fullscreen-button" title="Go fullscreen">
Fullscreen
</button>
<button href="#" id="screenshot-button" title="Take a screenshot">
Take Screenshot
</button>
<button href="#" id="export-gltf" title="Export to GLTF">
Export glTF
</button>
<button href="#" id="reset" title="Reset">Reset</button>
</div>
</div>
</body>
</html>