-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
89 lines (59 loc) · 3.11 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="theme-color" content="#FFFFFF">
<meta name="description" content="Immersive VR Technology for Book Reading and Storytelling">
<meta name="keywords" content="VR Pages, Book Reading, Story Telling, Immersive VR Technology for Book Reading and Storytelling">
<title>Immersive VR Technology for Book Reading</title>
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon">
<link rel="apple-touch-icon" href="./apple-touch-icon.png">
<link rel="manifest" href="./site.webmanifest">
<script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/donmccurdy/[email protected]/dist/aframe-extras.min.js"></script>
<!-- <script>function arrayToObject(a){let r={};return r.x=a[0],r.y=a[1],r.z=a[2],r}var camera=document.querySelector("#superView");let array=[];array.push(camera.object3D.rotation.x),array.push(camera.object3D.rotation.y),array.push(camera.object3D.rotation.z),arrayToObject(array);</script> -->
</head>
<body>
<a-scene>
<a-entity position="0 0 10" rotation="0 55 0" movement-controls="fly: true">
<a-entity id="superView" camera look-controls wasd-controls rotation-reader>
<a-entity position="0 0 -3" geometry="primitive: ring; radiusInner: 0.02; radiusOuter: 0.03;"
material="color: cyan; shader: flat" cursor="maxDistance: 30; fuse: true">
<a-animation begin="click" easing="ease-in" attribute="scale" fill="forwards" from="0.2 0.2 0.2"
to="1 1 1" dur="150"></a-animation>
<a-animation begin="fusing" easing="ease-in" attribute="scale" fill="backwards" from="1 1 1"
to="0.2 0.2 0.2" dur="750"></a-animation>
</a-entity>
</a-entity>
</a-entity>
<a-assets>
<img alt="3D Image" id="sky" src="assets/images/sky.jpg">
<img alt="3D Image" id="logo" src="assets/images/logo.png">
<img alt="3D Image" id="main" src="assets/images/main.png">
<img alt="3D Image" id="read" src="assets/images/read.png">
<img alt="3D Image" id="experience" src="assets/images/experience.png">
</a-assets>
<a-entity light="type:point; castShadow:true;" position="0 1 0"></a-entity>
<a-image src="#logo" position="0 6 -5" width="3" height="3" rotation="0 0 0"></a-image>
<a-image src="#main" position="0 1.7 0" width="6" scale="2 2 2"></a-image>
<a-image id="readBook" src="#read" position="0 -0.4 0" width="3.5" rotation="0 0 0" scale="2 2 2"></a-image>
<a-image id="experienceBook" src="#experience" position="0 -2.8 0" width="5" rotation="0 0 0" scale="2 2 2"></a-image>
<a-sky src="#sky"></a-sky>
<script>
document.querySelector("#readBook").addEventListener("click", () => {
window.location.href = "read"
})
document.querySelector("#experienceBook").addEventListener("click", () => {
window.location.href = "tamil"
})
</script>
<script>
if('serviceWorker' in navigator) {
navigator.serviceWorker.register('./sw.js')
}
</script>
</a-scene>
</body>
</html>