Last active
January 10, 2020 02:39
-
-
Save choco0908/375bbe909a40d8515d715f0db6f73513 to your computer and use it in GitHub Desktop.
gear.js webcam test html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='utf-8'> | |
<meta http-equiv='X-UA-Compatible' content='IE=edge'> | |
<title>GeoAR.js TEST Project</title> | |
<script src='https://aframe.io/releases/0.9.2/aframe.min.js'></script> | |
<script src='https://raw.githack.com/jeromeetienne/AR.js/master/aframe/build/aframe-ar.min.js'></script> | |
<script src='https://rawgit.com/donmccurdy/aframe-extras/master/dist/aframe-extras.loaders.min.js'></script> | |
<script> | |
function getLocation() { | |
if (navigator.geolocation) { // GPS를 지원하면 | |
navigator.geolocation.getCurrentPosition(function(position) { | |
alert(position.coords.latitude + ' ' + position.coords.longitude); | |
}, function(error) { | |
console.error(error); | |
}); | |
} else { | |
alert('GPS를 지원하지 않습니다'); | |
} | |
} | |
getLocation(); | |
</script> | |
</head> | |
<body style='margin: 0; overflow: hidden;'> | |
<a-scene | |
debug | |
cursor='rayOrigin: mouse; fuse: true; fuseTimeout: 0;' | |
raycaster="objects: [gps-entity-place];" | |
vr-mode-ui="enabled: false" | |
embedded | |
arjs='sourceType: webcam; sourceWidth:1080; sourceHeight:764; displayWidth: 1080; displayHeight: 764; debugUIEnabled: false;'> | |
</a-scene> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment