Skip to content

Instantly share code, notes, and snippets.

@yohannawaliya
Created November 13, 2021 02:32
Show Gist options
  • Save yohannawaliya/143687b9761bd4fe45157623dcf0479b to your computer and use it in GitHub Desktop.
Save yohannawaliya/143687b9761bd4fe45157623dcf0479b to your computer and use it in GitHub Desktop.
AR-demo-1
<script src="https://cdn.rawgit.com/jeromeetienne/AR.js/1.5.0/aframe/examples/vendor/aframe/build/aframe.min.js"></script>
<script src="https://cdn.rawgit.com/jeromeetienne/AR.js/1.5.0/aframe/build/aframe-ar.js"></script>
<body style='margin : 0px; overflow: hidden;'>
<!-- Define your 3d scene and enabled ar.js -->
<a-scene embedded arjs='trackingMethod: best;'>
<!-- Create a anchor to attach your augmented reality -->
<a-anchor hit-testing-enabled='true'>
<!-- Add your augmented reality here -->
<a-box position='0 0.5 0' material='opacity: 0.5; side:double; color:red;'>
<a-torus-knot radius='0.26' radius-tubular='0.05'>
<a-animation attribute="rotation" to="360 0 0" dur="5000" easing='linear' repeat="indefinite"></a-animation>
</a-torus-knot>
</a-box>
</a-anchor>
<!-- Define a static camera -->
<a-camera-static/>
</a-scene>
</body>
@yohannawaliya
Copy link
Author

Frank ThAnks for sharing. Please I need now to create marker&.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment