-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
64 lines (53 loc) · 1.76 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
<!doctype html>
<html>
<head>
<title>8thWall Web: Simple Shaders</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<link rel="stylesheet" type="text/css" href="index.css">
<!-- XR Extras - provides utilities like load screen, almost there, and error handling.
See github.com/8thwall/web/xrextras -->
<script src="//cdn.8thwall.com/web/xrextras/xrextras.js"></script>
<!-- 8thWall Web - Replace the app key here with your own app key -->
<script async src="//apps.8thwall.com/xrweb?appKey=20LtIMuqIH4w4B6gOHzX3XAKMQKwaUCV7qgna05QmBPi3SuvdnrPLlp5kT5E5xEefNuvH1"></script>
<script type="text/javascript" src="js/patch.js"></script>
<!-- Client code -->
<script defer src="index.js"></script>
</head>
<body>
<canvas id="camerafeed"></canvas>
<canvas id="glcanvas" style="pointer-events:none;position:absolute;top:0px;z-index: 999;left:0;"></canvas>
<script>
function showError(e)
{
console.log(e);
}
function patchInitialized(e)
{
console.log('patchInitialized');
}
function patchFinishedLoading(e)
{
console.log('patchFinishedLoading');
}
document.addEventListener('DOMContentLoaded',
function(event)
{
console.log("Load patch...");
CABLES.patch = new CABLES.Patch(
{
patch: CABLES.exportedPatch,
prefixAssetPath: '',
glCanvasId: 'glcanvas',
glCanvasResizeToWindow: true,
onError: showError,
onPatchLoaded: patchInitialized,
onFinishedLoading: patchFinishedLoading,
canvas:
{
alpha:true
}
});
});
</script>
</body>
</html>