-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathindex.html
53 lines (44 loc) · 1.47 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="content-language" content="en-EN" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>WebAR.rocks.face 2D earrings demo</title>
<!-- INCLUDE WebAR.rocks.face MAIN SCRIPT -->
<script src="../../dist/WebARRocksFace.js"></script>
<!-- INCLUDE CANVAS2D HELPER -->
<script src="../../helpers/WebARRocksFaceCanvas2DHelper.js"></script>
<!-- INCLUDE RESIZER HELPER -->
<script src="../../helpers/WebARRocksResizer.js"></script>
<!-- INCLUDE LANDMARKS STABILIZER -->
<script src="../../helpers/landmarksStabilizers/WebARRocksLMStabilizer.js"></script>
<!-- INCLUDE DEMO SCRIPT -->
<script src="./main.js"></script>
<style type="text/css">
body {
margin: 0;
}
canvas {
transform: scaleX(-1); /* flip horizontally (mirror mode) */
position: absolute;
top: 0;
left: 0;
max-width: 100vw;
max-height: 100vh;
}
#overlayCanvas {
z-index: 10;
}
#WebARRocksFaceCanvas {
z-index: 1;
}
</style>
</head>
<body>
<!-- canvas where the earring will be displayed: -->
<canvas width="600" height="600" id='overlayCanvas'></canvas>
<!-- canvas where the video will be displayed: -->
<canvas width="600" height="600" id='WebARRocksFaceCanvas'></canvas>
</body>
</html>