-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
132 lines (124 loc) · 4.7 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- para permitir exibição em IOS de acordo com documentação do a-frame-->
<meta name="apple-mobile-web-app-capable" content="yes" />
<!-- Bibliotecas que precisam ser importadas para usar Mindar com A-frame -->
<script src="https://cdn.jsdelivr.net/gh/hiukim/[email protected]/dist/mindar-image.prod.js"></script>
<script src="https://aframe.io/releases/1.2.0/aframe.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/hiukim/[email protected]/dist/mindar-image-aframe.prod.js"></script>
<script defer src="./assets/scripts/index.js"></script>
<title>My Business Card - Jane Doe</title>
<link rel="stylesheet" href="assets/styles/index.css" />
</head>
<body>
<!-- Scanner Customizado -->
<div id="example-scanning-overlay" class="hidden">
<div class="inner">
<img src="./assets/target/businessCard.png" />
<div class="scanline"></div>
</div>
</div>
<!-- Construir a cena -->
<a-scene
mindar-image="imageTargetSrc: ./assets/target/target.mind; filterMinCF:0.001; filterBeta: 0.09; uiScanning: #example-scanning-overlay"
color-space="sRGB"
renderer="colorManagement: true, physicallyCorrectLights"
vr-mode-ui="enabled: false"
device-orientation-permission-ui="enabled: false"
>
<!-- Carregamos os assets que serão usados na experiencia -->
<a-assets>
<img id="perfil" src="./assets/images/profile/perfil.png" />
<img id="businessCard" src="./assets/target/businessCard.png" />
<img id="icon_github" src="./assets/images/icons/icon_github.png" />
<img id="icon_linkedin" src="./assets/images/icons/icon_linkedin.png" />
<img id="icon_twitter" src="./assets/images/icons/icon_twitter.png" />
<img id="icon_web" src="./assets/images/icons/icon_web.png" />
<img id="icon_email" src="./assets/images/icons/icon_email.png" />
</a-assets>
<a-camera
position="0 0 0"
look-controls="enabled: false"
cursor="fuse: false; rayOrigin: mouse;"
raycaster=" far: 10000; objects: .clickable;"
></a-camera>
<a-entity mindar-image-target="targetIndex: 0">
<!-- Imagens do cartão e da pessoa -->
<a-entity>
<a-image
id="card"
position="-0.0 0.00427 -0.07243"
height="0.552"
width="1"
src="#businessCard"
></a-image>
<a-image
id="foto-perfil"
position="0.850 0.0 -0.04426"
height="0.15"
width="0.15"
src="#perfil"
scale="4.2 4.2 4.2"
></a-image>
</a-entity>
<!-- Botões -->
<a-entity position="0.065 -0.002 -0.004">
<a-image
id="github-button"
class="clickable"
position="-0.52361 -0.4575 -0.04426"
height="0.15"
width="0.15"
src="#icon_github"
animation="property: scale; to: 1.1 1.1 1.1; easing: easeInOutQuad; loop: true; dir: alternate"
>
</a-image>
<a-image
id="linkedin-button"
class="clickable"
position="-0.30772 -0.4575 -0.04426"
height="0.15"
width="0.15"
src="#icon_linkedin"
animation="property: scale; to: 1.1 1.1 1.1; easing: easeInOutQuad; loop: true; dir: alternate"
>
</a-image>
<a-image
id="twitter-button"
class="clickable"
position="-0.07819 -0.4575 -0.04426"
height="0.15"
width="0.15"
src="#icon_twitter"
animation="property: scale; to: 1.1 1.1 1.1; easing: easeInOutQuad; loop: true; dir: alternate"
>
</a-image>
<a-image
id="email-button"
class="clickable"
position="0.16583 -0.4575 -0.04426"
height="0.15"
width="0.15"
src="#icon_email"
animation="property: scale; to: 1.1 1.1 1.1; easing: easeInOutQuad; loop: true; dir: alternate"
>
</a-image>
<a-image
id="web-button"
class="clickable"
position="0.40564 -0.4575 -0.04426"
height="0.15"
width="0.15"
src="#icon_web"
animation="property: scale; to: 1.1 1.1 1.1; easing: easeInOutQuad; loop: true; dir: alternate"
>
</a-image>
</a-entity>
</a-entity>
</a-scene>
</body>
</html>