Skip to content

Instantly share code, notes, and snippets.

@Beelzenef
Created September 12, 2019 08:31
Show Gist options
  • Save Beelzenef/23bee1a4fb68984ee8db51ca29cea337 to your computer and use it in GitHub Desktop.
Save Beelzenef/23bee1a4fb68984ee8db51ca29cea337 to your computer and use it in GitHub Desktop.
AR.js in action!
<!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>
<a-marker preset='hiro'>
<a-entity gltf-model="obj: url(path/to/model.gltf)">
</a-entity>
</a-marker>
<a-marker preset='hiro'>
<a-entity obj-model="obj: url(idiWork_spaceship.obj);
mtl: url(idiWork_spaceship.mtl)">
</a-entity>
</a-marker>
<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