Skip to content

Instantly share code, notes, and snippets.

@vneverz
Last active February 21, 2020 09:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vneverz/19f4d183d504197cd009aff558727c9e to your computer and use it in GitHub Desktop.
Save vneverz/19f4d183d504197cd009aff558727c9e to your computer and use it in GitHub Desktop.
AR for Cake
<!--index.html-->
<!doctype HTML>
<html>
<script src="https://aframe.io/releases/0.9.2/aframe.min.js"></script>
<script src="https://cdn.rawgit.com/jeromeetienne/AR.js/1.7.7/aframe/build/aframe-ar.js"></script>
<body style='margin : 0px; overflow: hidden;'>
<a-scene embedded arjs='sourceType: webcam; debugUIEnabled: false;'>
<a-marker preset='custom' type='pattern' url='res/pattern-qr-code.patt'>
<a-entity text="width: 5; value:Happy Birthday To You" position='1.4 1.8 0'></a-entity> <!--加上文字-->
<a-entity id='gltf' gltf-model="url(res/scene.gltf)" position='0 0.5 0' scale='0.2 0.2 0.2'></a-entity> <!--加上3D模型-->
</a-marker>
<a-entity camera></a-entity>
</a-scene>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment