-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
83 lines (74 loc) · 2.81 KB
/
index.html
File metadata and controls
83 lines (74 loc) · 2.81 KB
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
<!-- <!DOCTYPE html>
<html>
<head>
<title>Hello</title>
<meta name="description" content="Hello, WebVR! - A-Frame">
<script src="https://aframe.io/releases/0.9.1/aframe.min.js"></script>
<script src="https://jeromeetienne.github.io/AR.js/aframe/build/aframe-ar.js"> </script>
</head>
<body style="margin : 0px; overflow: hidden;">
<a-scene embedded arjs="sourceType: webcam;">
<a-marker preset="hiro">
<a-entity obj-model="obj: url(https://rishavjayswal.github.io/augmented-reality/resources/couch.obj);
mtl: url(https://rishavjayswal.github.io/augmented-reality/resources/couch.mtl)">
</a-entity>
</a-scene>
</body>
</html> -->
<!--
</html> -->
<!-- <!doctype HTML>
<html>
<script src="https://aframe.io/releases/0.9.1/aframe.min.js"></script>
<script src="https://raw.githack.com/jeromeetienne/AR.js/1.7.1/aframe/build/aframe-ar.js"></script>
<body style='margin : 0px; overflow: hidden;'>
<a-scene embedded arjs>
<a-marker preset="hiro">
<a-box position='0 0.5 0' material='color: yellow;'></a-box>
</a-marker>
<a-entity camera></a-entity>
</a-scene>
</body>
</html> -->
<html>
<head>
<title>Hello</title>
<meta name="description" content="Hello, WebVR! - A-Frame">
<script src="https://aframe.io/releases/0.9.1/aframe.min.js"></script>
<script src="https://jeromeetienne.github.io/AR.js/aframe/build/aframe-ar.js"> </script>
<link rel="stylesheet" href="styles.css">
<script>
function loadObject(url) {
var iFrame = document.getElementById("arFrame");
iFrame.contentWindow.postMessage(url, '*');
}
// document.querySelector('drum').addEventListener('click', changeMaterial);
// function changeMaterial(mtl) {
// var iFrame = document.getElementById("arFrame");
// iFrame.contentWindow.click(url, "*");
// }
</script>
</head>
<body bgcolor="yellow">
<div class="row">
<div class="col-sm-6 col-md-6 col-lg-9" style="height:600px;">
<iframe style="width: 100%;height:100%;" name="arFrame" id="arFrame" src="ar.html">
</iframe>
</div>
<div>
<!-- <div class="dynamicImgs">
<img class="image" onclick="loadObject('shirt_red')" src="download (1).jpg">
</div> -->
<button class="drum z" onclick="loadObject('shirt_red')">Red Shirt</button>
<button class="drum m" onclick="loadObject('shirt_green_obj')">Green Shirt</button>
<!--div class="dynamicImgs">
<img class="image" onclick="loadObject('resources/items/table/wooden-coffe-table')" src="resources/items/table/round-table.jpg">
</div-->
<!-- <div class="dynamicImgs">
<img class="image" onclick="loadObject('shirt_red')" src="download (1).jpg">
</div> -->
</div>
</div>
</body>
</html>
<!-- class="col-sm-6 col-md-6 col-lg-3" style="border: 1px solid;height: 600px;overflow:scroll;" -->