-
Notifications
You must be signed in to change notification settings - Fork 921
/
index.html
30 lines (29 loc) · 1.13 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
<!DOCTYPE html>
<html>
<head>
<title>AR.js Click Places Example</title>
<script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
<script type='text/javascript' src='../../../../three.js/build/ar-threex-location-only.js'></script>
<script type='text/javascript' src='../../../build/aframe-ar-nft.js'></script>
<script>
AFRAME.registerComponent('clicker', {
init: function() {
this.el.addEventListener('click', e => {
alert('Box clicked!');
});
}
});
</script>
</head>
<body>
<a-scene
vr-mode-ui="enabled: false"
cursor='rayOrigin: mouse'
raycaster='near: 0; far: 50000'
arjs='sourceType: webcam; videoTexture: true; debugUIEnabled: false;'
renderer='antialias: true; alpha: true'>
<a-camera gps-new-camera='simulateLatitude: 51.049; simulateLongitude: -0.723'></a-camera>
<a-box gps-new-entity-place='latitude: 51.0596; longitude: -0.7170' color='red' scale='200 200 200' clicker></a-box>
</a-scene>
</body>
</html>