-
Notifications
You must be signed in to change notification settings - Fork 40
/
index.html
executable file
·76 lines (69 loc) · 2.52 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
<html>
<style>
#deviceActions {
position: absolute;
left: 1em;
top: 1em;
right: 1em;
font-family: sans-serif;
font-size: 1em;
z-index: 1;
}
#deviceActionsLog {
margin-top: 1em;
color: #ff22ee;
padding: 0.7em;
font-family: sans-serif;
font-size: 0.7em;
}
#webbluetoothNotSupported {
font-family: sans-serif;
display: none;
transition: opacity 0.5s;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 50%;
padding: 1em;
background: rgba(255, 255, 255, 0.7);
}
#webbluetoothNotSupported.show {
display: block;
}
</style>
<body style="padding:0;margin: 0; background: rgb(64,64,64)">
<div id="deviceActions">
<select id="deviceActionsOption">
<option disabled selected>Select a device action:</option>
<option value="pair">Pair with Gear VR controller</option>
<option value="calibrate">Calibrate controller</option>
<option value="sensor">Start controller data updates</option>
<option value="disconnect">Disconnect</option>
</select>
<button id="deviceActionsButton">Run</button>
<div id="deviceActionsLog">
Messages about the device appear here.
</div>
</div>
<div id="webbluetoothNotSupported">
Sorry, your browser cannot run this demo unless it supports the
<a href="https://www.chromestatus.com/feature/5264933985976320">Web Bluetooth API</a>.<br><br>
If you're running a recent version of Chrome that supports this API but has it disabled, you can
go to <code>chrome://flags/#enable-experimental-web-platform-features</code> and tick the
"Experimental Web Platform features" to enable it.
</div>
</body>
<!--<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>-->
<!--<script src="node_modules/three/build/three.min.js"></script>-->
<!--<script src="node_modules/three/examples/js/loaders/MTLLoader.js"></script>-->
<!--<script src="node_modules/three/examples/js/loaders/OBJLoader.js"></script>-->
<!--<script src="node_modules/ahrs/build/www-ahrs.js"></script>-->
<script src="dist/babel.min.js"></script>
<script src="dist/three.min.js"></script>
<script src="dist/MTLLoader.js"></script>
<script src="dist/OBJLoader.js"></script>
<script src="dist/www-ahrs.js"></script>
<script type="text/babel" src="ControllerBluetoothInterface.js"></script>
<script type="text/babel" src="ControllerDisplay.js"></script>
</html>