forked from adafruit/Adafruit_WebSerial_3DModelViewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
71 lines (69 loc) · 2.57 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Adafruit 3D Model Viewer</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script>
// Redirect to HTTPS if HTTP is requested.
if (window.location.protocol === 'http:') {
window.location.href = 'https:' + window.location.href.substring(5);
}
</script>
<script type="importmap">
{
"imports": {
"three": "https://threejs.org/build/three.module.js",
"objloader": "https://threejs.org/examples/jsm/loaders/OBJLoader.js"
}
}
</script>
<!-- import the webpage's stylesheet -->
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/light.css" id="light" class="alternate" disabled>
<link rel="stylesheet" href="css/dark.css" id="dark" class="alternate" disabled>
<!-- import the webpage's javascript file -->
<script type="module" src="js/script.js" defer></script>
</head>
<body>
<header class="header">
<h1>Adafruit 3D Model Viewer</h1>
</header>
<main class="main">
<div id="notSupported" class="notSupported">
Sorry, <b>Web Serial</b> is not supported on this device, make sure you're
running Chrome 78 or later and have enabled the
<code>#enable-experimental-web-platform-features</code> flag in
<code>chrome://flags</code>
</div>
<div id="webGLnotSupported" class="notSupported">
Sorry, <b>WebGL</b> is not supported on this device.
</div>
<div class="controls">
<button id="butConnect" type="button">Connect</button>
<select id="baudRate"></select>
<span>
<select id="angle_type">
<option value="quaternion">Quaternions</option>
<option value="euler">Euler Angles</option>
</select>
</span>
<input type="checkbox" id="darkmode"> Dark Mode
</div>
<div class="animation-container">
<canvas id="canvas"></canvas>
</div>
<div id="log-container" class="row">
<div id="log" class="log"></div>
<div id="calibration" class="calibration-container"></div>
</div>
<div class="controls">
<input type="checkbox" id="autoscroll"> Autoscroll
<input type="checkbox" id="showTimestamp"> Show Timestamp
<button id="butClear" type="button">Clear</button>
</div>
<!--<textarea id="log" readonly></textarea>-->
</main>
</body>
</html>