-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathImageTracking.html
57 lines (51 loc) · 1.77 KB
/
ImageTracking.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
<!DOCTYPE html>
<html lang="en">
<script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>
<script>
// var vConsole = new window.VConsole();
</script>
<script src="./lib/aframe-master.min.js"></script>
<script src="./lib/aframe-ar-nft.js"></script>
<script src="./lib/gesture-detector.js"></script>
<script src="./lib/gesture-handler.js"></script>
<style>
.arjs-loader {
height: 100%;
width: 100%;
position: absolute;
top: 0;
left: 0;
background-color: rgba(0, 0, 0, 0.8);
z-index: 9999;
display: flex;
justify-content: center;
align-items: center;
}
.arjs-loader div {
text-align: center;
font-size: 1.25em;
color: white;
}
</style>
<body style="margin: 0px; overflow: hidden">
<div class="arjs-loader">
<div>Loading, please wait...</div>
</div>
<a-scene arjs="trackingMethod: best; sourceType: webcam; debugUIEnabled: false;" embedded
renderer="logarithmicDepthBuffer: true;" vr-mode-ui="enabled: false" gesture-detector id="scene">
<a-nft type="nft" url="https://deja-vuuu.github.io/webAR-demo/assets/nft/iset/join_popup" smooth="true"
smoothCount="10" smoothTolerance=".01" smoothThreshold="5" raycaster="objects: .clickable" emitevents="true"
cursor="fuse: false; rayOrigin: mouse;">
<a-entity gltf-model="./assets/model/kung_fu/scene.gltf" scale="5 5 5" position="50 150 0" class="clickable"
animation-mixer gesture-handler>
</a-nft>
<a-entity camera></a-entity>
</a-scene>
</body>
<script>
window.addEventListener("arjs-nft-loaded", (event) => {
// Hide loading overlay
console.log("arjs-nft-loaded")
});
</script>
</html>