emptyview
Fabien Benetou 1 year ago
parent 81a2a3a796
commit ae52fabd61
  1. 37
      index.html

@ -3187,29 +3187,11 @@ AFRAME.registerComponent('startfunctions', {
<a-entity id="player" networked="template:#avatar-template;attachTemplateToLocal:false;" collect-to-inventory
hud camera look-controls wasd-controls waistattach="target: .movebypinch" position="0 1.6 0">
<a-entity position="0 -1.2 0" rotation="-25 0 0" collision-check raycaster="far:.2; interval: 100; objects: .cubes; showLine:true;" ></a-entity>
<a-box visible="false" id="playerwithbody"></a-box>
<a-cone id="sword"
collision-check-target raycaster="far:.6; interval: 100; objects: .target; showLine:true; direction:0 1 0"
color="gray" radius-bottom=".1" radius-top="0.01" position="0.5 -0.2 -1" height="1" rotation="-90 0 0"></a-cone>
</a-entity>
<a-entity id="rightHand" pinchprimary hand-tracking-controls="hand: right;"></a-entity>
<a-entity id="leftHand" pinchsecondary wristattachsecondary="target: #box" hand-tracking-controls="hand: left;"></a-entity>
</a-entity>
<a-torus id="gate1" scale="1 2 1" position="0 -.2 -1" color="#43A367" arc="180" radius="2" radius-tubular="0.1">
<a-entity position="-2 1 0" gate-through raycaster="far:4; interval: 100; objects: #playerwithbody; showLine:true; direction:1 0 0"></a-entity>
</a-torus>
<a-torus id="gate2" scale="1 2 1" position="-2 -.2 -3" rotation="0 45 0" color="#43A367" arc="180" radius="2" radius-tubular="0.1">
<a-entity position="-2 1 0" gate-through raycaster="far:4; interval: 100; objects: #playerwithbody; showLine:true; direction:1 0 0"></a-entity>
</a-torus>
<a-torus id="gate3" scale="1 2 1" position="-4 -.2 -5" rotation="0 90 0" color="#43A367" arc="180" radius="2" radius-tubular="0.1">
<a-entity position="-2 1 0" gate-through raycaster="far:4; interval: 100; objects: #playerwithbody; showLine:true; direction:1 0 0"></a-entity>
</a-torus>
<a-cylinder rotation="90 0 0" position="0 2 -3" class="target" color="white" height=".1" radius="1"></a-cylinder>
<a-cylinder rotation="90 0 0" position="0 2 -2.9" class="target" color="red" height=".1" radius=".7"></a-cylinder>
<a-cylinder rotation="90 0 0" position="0 2 -2.8" class="target" color="white" height=".1" radius=".4"></a-cylinder>
<a-cylinder rotation="90 0 0" position="0 2 -2.7" class="target" color="red" height=".1" radius=".1"></a-cylinder>
<a-box pressable start-on-press id="box" scale="0.05 0.05 0.05" color="pink">
<!-- could attach functions here... BUT then they have to be activable with the other hand! -->
@ -3217,18 +3199,6 @@ AFRAME.registerComponent('startfunctions', {
</a-box>
<a-box collectible id="secretkey" color="red" position="-2 1 0" scale=".1 .1 .1"></a-box>
<a-box collectible="required: secretkey" id="othersecretkey" color="blue" position="2 1 0" scale=".1 .1 .1"></a-box>
<!-- ground to clone with raycaster -->
<a-box class="cubes" color="red" position="0 0 -2"></a-box>
<a-box class="cubes" color="red" position="1 0 -2"></a-box>
<a-box class="cubes" color="red" position="-1 0 -2"></a-box>
<a-box class="cubes" color="green" position="0 0 -1"></a-box>
<a-box class="cubes" color="green" position="1 0 -1"></a-box>
<a-box class="cubes" color="green" position="-1 0 -1"></a-box>
<a-box class="cubes" color="blue" position="0 0 0"></a-box>
<a-box class="cubes" color="blue" position="1 0 0"></a-box>
<a-box class="cubes" color="blue" position="-1 0 0"></a-box>
<a-entity light="type: ambient; color: #BBB; intensity: 0.6"></a-entity>
<a-entity light="type: directional; color: #FFF; intensity: 1.4" position="-0.5 1 1"></a-entity>
@ -3236,17 +3206,12 @@ AFRAME.registerComponent('startfunctions', {
<a-troika-text value="SpaSca : Spatial Scaffolding" anchor="left" outline-width="5%" font="../content/ChakraPetch-Regular.ttf" position="-5.26197 6.54224 -1.81284"
scale="4 4 5" rotation="90 0 0" troika-text="outlineWidth: 0.01; strokeColor: #ffffff" material="flatShading: true; blending: additive; emissive: #c061cb"></a-troika-text>
<a-sky hide-on-enter-ar color="white"></a-sky>
<a-entity hide-on-enter-ar="" id="environment" class="hidableenvironment" gltf-model="../content/SourceCityToolkit/AR_Market_optimized.glb" scale="1 1 1" position="17 -10 -4" rotation="0 0 0"></a-entity>
<a-entity hide-on-enter-ar="" id="environmentsky" class="hidableenvironment" gltf-model="../content/SourceCityToolkit/SKY_Market_day.glb" scale="1 1 1" position="17 -10 -4" rotation="0 0 0"></a-entity>
<a-entity target gltf-model="../content/from_nerf_optimized.glb" scale=".3 .3 .3" position="0 1 -.4" rotation="0 0 0"></a-entity>
<a-troika-text anchor=left target value="instructions : \n--right pinch to move\n--left pinch to execute" position="0 1.65 -0.2" scale="0.1 0.1 0.1"></a-troika-text>
<a-troika-text anchor=left target value="jxr emptyPinchToMove()" position="0 1.35 -0.1" scale="0.1 0.1 0.1"></a-troika-text>
<a-troika-text anchor=left target id="locationreload" value="jxr location.reload()" position="0 1.20 -0.1" scale="0.1 0.1 0.1"></a-troika-text>
<a-troika-text anchor=left target id="makeAnchorsVisibleOnTargets" value="jxr makeAnchorsVisibleOnTargets()" position="0 1.25 -0.1" scale="0.1 0.1 0.1"></a-troika-text>
<a-console position="0 1.1 -0.8" rotation="-45 0 0" font-size="34" height=0.5 skip-intro=true></a-console>
</a-scene>
</body>
</script>

Loading…
Cancel
Save