Newer
Older
renshu-2022 / V2kaken.html
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0,
maximum-scale=1.0, minimum-scale=1.0, user-scalable=no,
target-densityDpi=device-dpi" />
  <title>Sakata Virtual Sigthseeing</title>
  <style type="text/css">
    div.VRbutton {
        position: fixed; bottom: 1em; left: 1em; border: 1px solid navy;
        }
        div.notfound {display: none;}
  </style>
</head>
<body style="margin: 0px; overflow:hidden;">
  <!-- A-Frame ライブラリの読み込み -->
  <script src="https://aframe.io/releases/1.0.4/aframe.min.js"></script>
  <!-- AR.js ライブラリの読み込み -->
  <script src="https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar.js"></script>
  <script src="https://cdn.jsdelivr.net/gh/donmccurdy/aframe-extras@v6.1.1/dist/aframe-extras.min.js"></script>;
  <script src="js/aframe-text-geometry-component.min.js"></script>
  <script src="js/aframe-extras.js"></script>
  <script src="js/aframe.min.js"></script>
  <script src="js/aframe-ar.js"></script>
  <script type="text/javascript">
    var timer1; //タイマーを格納する変数(タイマーID)の宣言
    var timer_hun;
    var timer_byo;
    var timer_ok;
    function disp(){
    	
    	// 入力ダイアログを表示 + 入力内容を user に代入
    	timer_hun = window.prompt("分数を入力してください");
    	while(timer_hun == ""){
    		window.alert("トレーニング時間を入力してください!")
    		 timer_hun = window.prompt("分数を入力してください");
    	}
    
    	
    		timer_byo = window.prompt("秒数を設定してください!");
    	while(timer_byo == ""){
    		window.alert("トレーニング時間を入力してください!")
    		timer_byo = window.prompt("秒数を入力してください");
    		
    	}
    		timer_ok = window.confirm("カウントダウンを開始します。"+timer_hun+"分"+timer_byo+"秒");

    		document.timer.elements[0].value=timer_hun;
    		document.timer.elements[1].value=timer_byo;
    		
    		timer();
   
    }
    function timer(){
    
    //  timer_hun = document.timer.elements[0].value;
    //  timer_byou = document.timer.elements[1].value;
      timer1=setInterval("countDown()",1000);
    }
    function countDown()
    {
      var min=document.timer.elements[0].value;
      var sec=document.timer.elements[1].value;
    //  var min=timer_hun;
    //  var sec=timer_byo;
        if (min==""){
          min=0;
        }
        min=parseInt(min);
        if (sec==""){
          sec=0;
        }
        sec=parseInt(sec);
        
        tmWrite(min*60+sec-1);
    }
    function tmWrite(int)
    {
      int=parseInt(int);
      
      if (int<0)
      {
      //  reSet();
      //  alert("時間です!");
	// if(min=="0"&&sec=="0"){
    		location.href = "https://www.yatex.org/gitbucket/SakataKoryo2022/renshu-2022/pages/receive.html?m=" + timer_hun + "&s=" + timer_byo;
        // }
      }
      else
      {
        //残り分数はintを60で割って切り捨てる
        document.timer.elements[0].value=Math.floor(int/60);
        //残り秒数はintを60で割った余り
        document.timer.elements[1].value=int % 60;
      }
    }
    
    
  </script>
 <!-- A-Frame の VR空間に AR.js を紐づける(デバッグUIを非表示) -->
 <a-scene embedded arjs="debugUIEnabled:false;">
     
         <a-assets>
	       <a-asset-item id="tree" src="udetore1.glb"></a-asset-item>
        </a-assets>
 
  <!-- マーカーを登録(プリセットされている「hiro」マーカー) -->
  <a-marker preset="custom" type="pattern" url='pattern-udereberu1.patt'  id="miraini">
  	 <a-entity gltf-model="udetore1.glb" animation-mixer></a-entity>
  	
   <!-- マーカーの場所に箱を置く(見やすいようにワイヤーフレーム表示) -->
        <a-entity 
            scale="0.02 0.02 0.02"
            rotation="-90 0 0"
            gltf-model="#tree">
        </a-entity>
  
  </a-marker>
  
  <a-marker preset="custom" type="pattern" url='pattern-sakataeki.patt'  id="station">
   <!-- マーカーの場所に箱を置く(見やすいようにワイヤーフレーム表示) -->
        <a-entity 
            scale="0.02 0.02 0.02"
            rotation="-90 0 0"
            gltf-model="#tree">
        </a-entity>
  
  </a-marker>
  
    <a-marker preset="custom" type="pattern" url='pattern-Cityhall.patt'  id="siyakusyo">
   <!-- マーカーの場所に箱を置く(見やすいようにワイヤーフレーム表示) -->
        <a-entity 
            scale="0.02 0.02 0.02"
            rotation="-90 0 0"
            gltf-model="#tree">
        </a-entity>
  
  </a-marker>
  
    <a-marker preset="custom" type="pattern" url='pattern-koryo.patt'  id="koryo">
   <!-- マーカーの場所に箱を置く(見やすいようにワイヤーフレーム表示) -->
        <a-entity 
            scale="0.02 0.02 0.02"
            rotation="-90 0 0"
            gltf-model="#tree">
        </a-entity>
  
  </a-marker>
  
    <a-marker preset="custom" type="pattern" url='pattern-sankyo.patt'  id="sankyo">
   <!-- マーカーの場所に箱を置く(見やすいようにワイヤーフレーム表示) -->
        <a-entity 
            scale="0.02 0.02 0.02"
            rotation="-90 0 0"
            gltf-model="#tree">
        </a-entity>
  
  </a-marker>
  
  <!-- AR用のカメラを置く -->
  <a-entity camera></a-entity>
  
 </a-scene>
 
 <script type="text/javascript" src="event5.js" charset="utf-8">
 </script>
    <div id="vr-miraini" class="VRbutton notfound">

<table border="0px">
	<tr>
          <td>
            <button style="height : 50px;font-size:30px;" onclick="disp()">タイマー入力</button>
            
          </td>
          <td>
            <form name="timer">
              <input type="text" size="5" value="" disabled="disabled">分<br>
              <input type="text"  size="5" value="" disabled="disabled">秒
            </form>
          </td>
        </tr>
        </table>
    </div>
    
    <div id="vr-station" class="VRbutton notfound">
        <button style="width : 160px;height : 50px;font-size:30px;" onclick="location.href='https://www.jreast.co.jp/estation/stations/728.html'">Web</button>
        <button style="width : 160px;height : 50px;font-size:30px;" onclick="location.href='https://www.yatex.org/gitbucket/SakataKoryo2021/renshu/pages/ryohei/SAKATAstationView.html'">View</button>
    </div>
    
    <div id="vr-siyakusyo" class="VRbutton notfound">
        <button style="width : 160px;height : 50px;font-size:30px;" onclick="location.href='http://www.city.sakata.lg.jp/'">Web</button>
        <button style="width : 160px;height : 50px;font-size:30px;" onclick="location.href='https://www.yatex.org/gitbucket/SakataKoryo2021/renshu/pages/ryohei/CityhallView.html'">View</button>
    </div>
    
    <div id="vr-sankyo" class="VRbutton notfound">
        <button style="width : 160px;height : 50px;font-size:30px;" onclick="location.href='https://sakata-kankou.com/spot/30159'">Web</button>
        <button style="width : 160px;height : 50px;font-size:30px;" onclick="location.href='https://www.yatex.org/gitbucket/SakataKoryo2021/renshu/pages/ryohei/SANKYOView.html'">View</button>
    </div>
    
    <div id="vr-koryo" class="VRbutton notfound">
        <button style="width : 160px;height : 50px;font-size:30px;" onclick="location.href='https://www.sakatakoryo-h.ed.jp'">Web</button>
        <button style="width : 160px;height : 50px;font-size:30px;" onclick="location.href='https://www.yatex.org/gitbucket/SakataKoryo2021/renshu/pages/ryohei/SAKATAKORYOView.html'">View</button>
    </div>
 
</body>
</html>