forked from ZiCog/madgwick.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
116 lines (111 loc) · 3.5 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
<html>
<head>
<title>madgwick.js</title>
<style>
* {
border-width: 0px;
margin: 0px;
padding: 0px;
font-size: 20px;
overflow: hidden;
}
#header {
color: white;
width: 100%;
height: 100px;
background-color: orange;
-webkit-app-region: drag; }
#canvas {
width: 100%;
height: 100%;
background-color: red;
}
#divstack {
width: 100%;
height: calc(100% - 200px);
position: relative;
}
#layer1 {
width: 100%;
height: 100%;
position: absolute;
z-index: 1;
}
#layer2 {
width: 100%;
height: 100%;
position: absolute;
z-index: 2;
}
#footer {
width: 100%;
height: 100px;
color: white;
background-color: orange;
}
#hud {
color: white;
opacity: 0.7;
position: static;
}
/* For a div going fullscreen in a chrome app, maximize height and width */
div:-webkit-full-screen {
width: 100% !important;
height: 100% !important;
}
div:-moz-full-screen {
width: 100% !important;
height: 100% !important;
}
div:-ms-fullscreen {
width: 100% !important;
height: 100% !important;
}
div:fullscreen {
width: 100% !important;
height: 100% !important;
}
/* While in fullscreen, hide any children with class 'tohide' */
:-webkit-full-screen .tohide {
display: none;
}
:-moz-full-screen .tohide {
display: none;
}
:-ms-fullscreen .tohide {
display: none;
}
:fullscreen .tohide {
display: none;
}
</style>
</head>
<body>
<div id="header">
Madgwick AHRS.
</div>
<div id="divstack">
<div id="layer1">
<canvas id="canvas">
</canvas>
</div>
<div id="layer2">
<div id="hud">
<pre>Algortithm: Madgwick AHRS<p>
Sample rate: 100Hz<p>
Beta: 1.0<p>
Serial port: /dev/ttyACM0</pre>
</div>
</div>
</div>
<div id="footer">
Status.<p>
OK
</div>
<script src="three.min.js"></script>
<script src="MadgwickAHRS.js"></script>
<script src="MahonyAHRS.js"></script>
<script src="serial.js"></script>
<script src="scene.js"></script>
</body>
</html>