Newer
Older
AegisforEcosystem / next / AR.js-3.4.0 / aframe / examples / marker-based / minimal_ES6.html
@KAOKA Daisuke KAOKA Daisuke on 31 May 2022 857 bytes into AR.js
<!DOCTYPE html>
<html>
    <script src="https://aframe.io/releases/1.0.0/aframe.min.js"></script>
    <!-- we import arjs version without NFT but with marker + location based support -->
    <script src="../../build/aframe-ar.js"></script>
    <link rel="import" href="../assets/index.css">

    <body>
        <a-scene embedded arjs='sourceWidth: window.innerWidth > window.innerHeight ? 640 : 480; sourceHeight: window.innerWidth > window.innerHeight ? 480 : 640'>
        <a-marker preset="hiro">
            <a-box position='0 0.5 0' material='opacity: 0.5; side: double;color:blue;'>
				<a-torus-knot radius='0.26' radius-tubular='0.05'
				animation="property: rotation; to:360 0 0; dur: 5000; easing: linear; loop: true">
				</a-torus-knot>
			</a-box>
        </a-marker>
        <a-entity camera></a-entity>
        </a-scene>
    </body>
</html>