Newer
Older
renshu-2021 / members / C1190245 / AR_loc.html
<html>
    <head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <title>AR-location_based</title>
    <!-- A-Frameと、AR.jsのA-FrameバージョンのJavaScriptを読み込みます。 -->
    <script src="https://aframe.io/releases/1.0.4/aframe.min.js"></script>
    <script src="https://unpkg.com/aframe-look-at-component@0.8.0/dist/aframe-look-at-component.min.js"></script>
    <script src="https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar-nft.js"></script>
    </head>
 
    <body style='margin: 0; overflow: hidden;'>
    <a-scene
        vr-mode-ui="enabled: false"
        embedded
        arjs="sourceType: webcam; debugUIEnabled: false;"
        >   
        
        <!-- look-at属性に[gps-camera]を指定することで、-->
        <!--ARコンテンツが常にカメラの方を向きます。-->
         <a-box
        matrial="color:red"
        gps-entity-place="latitude:38.900214; longitude: 139.818472;"
        scale="0.2 0.2 0.2"
        >
        </a-box> 
   
        <!-- GPS情報を利用するためa-cameraにgps-cameraを追加します。
        加えて、回転イベントを処理するためにrotation-readerも追加します。 -->
        <a-camera gps-camera="minDistance:0; maxDistance:10000" rotation-reader> </a-camera>
    </a-scene>
    </body>
</html>