-
Notifications
You must be signed in to change notification settings - Fork 0
/
index_mio.html
73 lines (63 loc) · 3.04 KB
/
index_mio.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
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>SMILE</title>
<script src="https://aframe.io/releases/0.9.2/aframe.min.js"></script>
<script src="https://unpkg.com/[email protected]/dist/aframe-look-at-component.min.js"></script>
<script src="https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar-nft.js"></script>
<script src="https://raw.githack.com/donmccurdy/aframe-extras/master/dist/aframe-extras.loaders.min.js"></script>
<script>
THREEx.ArToolkitContext.baseURL = 'https://raw.githack.com/jeromeetienne/ar.js/master/three.js/'
</script>
<script>
AFRAME.registerComponent('rotation-reader', {
tick: function () {
// `this.el` is the element.
// `object3D` is the three.js object.
// `rotation` is a three.js Euler using radians. `quaternion` also available.
console.log(this.el.object3D.rotation);
// `position` is a three.js Vector3.
console.log(this.el.object3D.position);
}
});
</script>
</head>
<body style="margin: 0; overflow: hidden;">
<a-scene
gps-camera-debug
vr-mode-ui="enabled: false"
renderer="logarithmicDepthBuffer: true;"
embedded
arjs="sourceType: webcam; debugUIEnabled: false;"
> <!-- sourceWidth:1280; sourceHeight:960; displayWidth: 1280; displayHeight: 960; -->
<a-assets>
<!-- ### GLTF MODEL ### src="https://cdn.glitch.com/ba98713b-beda-40ef-a0b2-49e4184b5129%2FFemaleHead_ggg.gltf?v=1603210970286" -->
<a-asset-item id="tree11" src="https://raw.githubusercontent.com/PedroNan/Modelos3D/main/SMILE_3.gltf"></a-asset-item>
</a-assets>
<a-entity
look-at="[gps-camera]"
animation-mixer
id="animated-marker"
gltf-model="#tree11"
scale="0.05 0.05 0.05"
gps-entity-place="latitude: -41.103272 longitude: -71.197353;"
></a-entity>
<!--
look-at="[gps-camera]"
<a-entity light="type: ambient; color: #FFF intensity: 1"></a-entity>
gps-entity-place="latitude: -41.134793; longitude: -71.307499;"
loading-screen="enabled: false;"
--> <a-text
value="This content will always face you."
look-at="[gps-camera]"
scale="50 50 50"
gps-entity-place="latitude: -41.10328852 longitude: -71.19736008;"
></a-text>
<a-entity light="type: directional; color: #FFF; intensity: 1" position="-1 0.5 0"></a-entity>
<a-entity light="type: directional; color: #FFF; intensity: 1" position="1 0.5 0"></a-entity>
<a-entity light="type: directional; color: #FFF; intensity: 1" position="0 0 1"></a-entity>
<a-camera gps-camera rotation-reader alert="true"> </a-camera>
</a-scene>
</body>
</html>