Created
September 12, 2019 08:31
-
-
Save Beelzenef/23bee1a4fb68984ee8db51ca29cea337 to your computer and use it in GitHub Desktop.
AR.js in action!
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> | |
<script src="https://aframe.io/releases/0.9.2/aframe.min.js"></script> | |
<script src="https://raw.githack.com/jeromeetienne/AR.js/1.7.5/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> |
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
<a-marker preset='hiro'> | |
<a-entity gltf-model="obj: url(path/to/model.gltf)"> | |
</a-entity> | |
</a-marker> |
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
<a-marker preset='hiro'> | |
<a-entity obj-model="obj: url(idiWork_spaceship.obj); | |
mtl: url(idiWork_spaceship.mtl)"> | |
</a-entity> | |
</a-marker> |
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
<a-marker preset='custom' type='pattern' url='path/to/marker.patt'> | |
<a-entity obj-model="obj: url(model.obj); | |
mtl: url(model.mtl)"> | |
</a-entity> | |
</a-marker> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment