Working portal basis

master
Fabien Benetou 2 years ago
parent 6c599de5a1
commit 04066d32a5
  1. 13
      index.html
  2. 36
      portail.html

@ -601,6 +601,13 @@ AFRAME.registerComponent('displaymodels', {
}) })
} }
}) })
AFRAME.registerComponent('forcestats', {
init: function () {
var forcestats = AFRAME.utils.getUrlParameter('forcestats');
console.log(forcestats)
if (forcestats == "true") this.el.setAttribute("stats", true)
}
})
function resetAnimations(){ function resetAnimations(){
Array.from( document.querySelectorAll("[animation]") ) Array.from( document.querySelectorAll("[animation]") )
@ -627,7 +634,7 @@ function playSound(){
} }
</script> </script>
<button style="z-index: 1; position: absolute;" onclick="playSound()">Play sound</button> <button style="z-index: 1; position: absolute;" onclick="playSound()">Play sound</button>
<a-scene NOcourbes displaymodels stats> <a-scene NOcourbes displaymodels forcestats>
<a-entity id="hotspots" hotspots ></a-entity> <a-entity id="hotspots" hotspots ></a-entity>
<!-- Quest available only during event, otherwise cardboard --> <!-- Quest available only during event, otherwise cardboard -->
<a-entity id="leftHand" hand-tracking-controls="hand: left;"></a-entity> <a-entity id="leftHand" hand-tracking-controls="hand: left;"></a-entity>
@ -694,8 +701,8 @@ Visuals/EXPORTS/EXPORTS_gltf/AA_Quaidelaruelle.glb
<!-- offset on test data for easier vr testing --> <!-- offset on test data for easier vr testing -->
<a-gltf-model class="models_ruelle" visible="" position="-140.71021 0.73 -28.54369" scale="1.2 1.2 1.2" rotation="0 -111.8545396388247 0" gltf-model="Visuals/EXPORTS/EXPORTS_gltf/AA_Quaidelaruelle.glb" listosmways=""></a-gltf-model> <a-gltf-model class="models_ruelle" visible="" position="-140.71021 0.73 -28.54369" scale="1.2 1.2 1.2" rotation="0 -111.8545396388247 0" gltf-model="Visuals/EXPORTS/EXPORTS_gltf/AA_Quaidelaruelle.glb" listosmways=""></a-gltf-model>
<a-gltf-model class="models_baquets" visible="" position="95.71286 -1.33294 -307.27021" scale="1.2 1.2 1.2" rotation="0 179.42402537639782 0" gltf-model="Visuals/EXPORTS/EXPORTS_gltf/AA_Citedesbaquets.glb" listosmways=""></a-gltf-model> <a-gltf-model class="models_baquets" visible="" position="95.71286 -1.33294 -307.27021" scale="1.2 1.2 1.2" rotation="0 179.42402537639782 0" gltf-model="Visuals/EXPORTS/EXPORTS_gltf/AA_Citedesbaquets.glb" listosmways=""></a-gltf-model>
<a-plane id="landscape" position="0 -20 0" scale="10 10 10" rotation="-90 0 -90" width="100" height="100" geometry="segmentsheight: 128; segmentswidth: 128" <a-plane id="landscape" position="0 -20 0" scale="10 10 10" rotation="-90 0 -90" width="100" height="100" geometry="segmentsHeight: 128; segmentsWidth: 128"
material="src: https://wxs.ign.fr/ortho/geoportail/r/wms?LAYERS=ORTHOIMAGERY.ORTHOPHOTOS.BDORTHO&EXCEPTIONS=text/xml&FORMAT=image/jpeg&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&STYLES=&CRS=CRS:84&BBOX=0.470286,49.338484,0.556117,49.381417&WIDTH=4096&HEIGHT=4096; displacementscale: 20; displacementmap: https://wxs.ign.fr/altimetrie/geoportail/r/wms?LAYERS=ELEVATION.ELEVATIONGRIDCOVERAGE.HIGHRES&EXCEPTIONS=text/xml&FORMAT=image/jpeg&SERVICE=WMS&VERSION=1.3.0&REQUEST=GETMAP&STYLES=&CRS=CRS:84&BBOX=0.470286,49.338484,0.556117,49.381417&WIDTH=1024&HEIGHT=1024;" ></a-plane> material="src: https://wxs.ign.fr/ortho/geoportail/r/wms?LAYERS=ORTHOIMAGERY.ORTHOPHOTOS.BDORTHO&EXCEPTIONS=text/xml&FORMAT=image/jpeg&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&STYLES=&CRS=CRS:84&BBOX=0.470286,49.338484,0.556117,49.381417&WIDTH=4096&HEIGHT=4096; displacementScale: 20; displacementMap: https://wxs.ign.fr/altimetrie/geoportail/r/wms?LAYERS=ELEVATION.ELEVATIONGRIDCOVERAGE.HIGHRES&EXCEPTIONS=text/xml&FORMAT=image/jpeg&SERVICE=WMS&VERSION=1.3.0&REQUEST=GETMAP&STYLES=&CRS=CRS:84&BBOX=0.470286,49.338484,0.556117,49.381417&WIDTH=1024&HEIGHT=1024;" ></a-plane>
<!-- somehow the displacement map does not seem to work anymore despite being accessible. Might have to rollback from git history. --> <!-- somehow the displacement map does not seem to work anymore despite being accessible. Might have to rollback from git history. -->
<a-plane id="watersim" cerema="" position="0 -50.25 0" rotation="-90 90 0" src="b1rwater0002.jpg" <a-plane id="watersim" cerema="" position="0 -50.25 0" rotation="-90 90 0" src="b1rwater0002.jpg"

@ -0,0 +1,36 @@
<html>
<h2>Experience par lieu</h2>
<ul>
<li><a target="_blank" class="experiencelinks" href="https://fabien.benetou.fr/pub/home/CEREMA/?">Quai de la Ruelle</a></li>
<li><a target="_blank" class="experiencelinks" href="https://fabien.benetou.fr/pub/home/CEREMA/?position=1">Les Baquets</a></li>
</ul>
<h2>Options</h2>
<ul>
<li>Forcer l'affichage des performances
<ul>
<li onclick="forceStats(this)">true</li>
<li onclick="forceStats(this)">false</li>
</ul>
</li>
<li>Hauteur des batiments :
<ul>
<li onclick="adjustHeight(this)">10</li>
<li onclick="adjustHeight(this)">15</li>
<li onclick="adjustHeight(this)">20</li>
</ul>
</li>
</ul>
<h2>Documentation</h2>
Utiliser <a href="https://hmd.link">hmd.link</a> dans le navigateur Web du casque pour partager le lien genere ou <a href="https://fabien.benetou.fr/pub/home/CEREMA/portail.html">ce portail</a>.
<script>
var links = Array.from(document.querySelectorAll(".experiencelinks"))
function adjustHeight(param){
links.map( e => e.href += "&height="+param.textContent)
}
function forceStats(param){
links.map( e => e.href += "&forcestats="+param.textContent)
}
</script>
<html>
Loading…
Cancel
Save