Skip to content

Commit

Permalink
Improve target cursors
Browse files Browse the repository at this point in the history
  • Loading branch information
Trygve Wastvedt committed Feb 24, 2018
1 parent f2569e5 commit cbfcaaa
Show file tree
Hide file tree
Showing 15 changed files with 4,153 additions and 4,796 deletions.
58 changes: 37 additions & 21 deletions docs/hemisphere.scene.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@

<a-mixin id="checkpoint" constant-scale="0.006 0.006 0.006" material="shader: flatUnexposed; color: #800000"></a-mixin>

<a-mixin id="checkpoint-target" visible="false" checkpoint="offset: 0 0.6 0" scale="4 4 4"></a-mixin>
<a-mixin id="checkpoint-target" visible="false" material="shader: flatUnexposed; transparent: true; opacity: 0.1; color: #00FF00" checkpoint="offset: 0 0.6 0" scale="4 4 4"></a-mixin>

<a-mixin id="checkpoint-near" visible="false" scale="30 30 30"></a-mixin>
<a-mixin id="checkpoint-near" visible="false" material="shader: flatUnexposed; transparent: true; opacity: 0.1; color: #0000FF" scale="30 30 30"></a-mixin>

</a-assets>

Expand Down Expand Up @@ -92,16 +92,13 @@

<!-- HDD POINTER -->
<a-circle id="pointer-hdd" visible="false" locked-pointer="-0.9" scale="0.015 0.015 0.015" rotation="-90 0 0" material="color:gray; shader: flatUnexposed; opacity: 0.2; transparent: true">
<a-circle scale="0.001 0.001 0.001" position="0 0 -0.1" material="color:gray; shader: flatUnexposed"
raycaster="objects: .hdd-target; far: 100000; direction: 0 0 -1;" cursor="fuse: true; fuseTimeout: 1000"
animation__fuse="property: scale; startEvents: mouseenter; pauseEvents: mouseleave; easing: easeOutCubic; dur: 1000; to: 1.01 1.01 1.01"
animation__click="property: scale; startEvents: click; easing: easeInCubic; dur: 100; to: 0.001 0.001 0.001"
animation__clear="property: scale; startEvents: mouseleave; easing: easeInCubic; dur: 100; to: 0.001 0.001 0.001">
<a-circle id="pointer-hdd-fuse" scale="0.001 0.001 0.001" position="0 0 -0.1" material="color:gray; shader: flatUnexposed"
raycaster="objects: .hdd-target; far: 100000; direction: 0 0 -1;" cursor="fuse: true; fuseTimeout: 1000">
</a-circle>
</a-circle>

<!-- CAMERA -->
<a-entity id="camera" camera="fov: 80; zoom: 1;" position="73.2 -3.337 13.164" rotation="0 90 0" universal-controls="movementControls: checkpoint, gamepad, keyboard, touch, hmd" checkpoint-controls>
<a-entity id="camera" camera="fov: 80; zoom: 1;" position="73.59 -7.18 -7.26" rotation="0 90 0" universal-controls="movementControls: checkpoint, gamepad, keyboard, touch, hmd" checkpoint-controls>

<!-- HUD -->
<!-- <a-entity id="hud-bottom" position="0 0 0" rotation="-30 0 0">
Expand All @@ -113,20 +110,25 @@
</a-entity> -->

<!-- checkpoint POINTER -->
<a-entity id="pointer-checkpoint" position="0 0 -3" moving-pointer constant-scale="0.015 0.015 0.015">
<a-entity id="pointer-checkpoint" moving-pointer position="0 0 -3">

<a-circle id="pointer-checkpoint-near" material="color:gray; shader: flatUnexposed; opacity: 0; transparent: true"
raycaster="objects: .target-near; far: 100000; direction: 0 0 -1;" cursor="fuse: false;"
animation__near="property: opacity; startEvents: mouseenter; pauseEvents: mouseleave; easing: easeOutCubic; dur: 1000; to: 0.5"
animation__clear="property: opacity; startEvents: mouseleave; easing: easeInCubic; dur: 1000; to: 0.0">
</a-circle>
<a-entity id="pointer-raycaster-near"
raycaster="objects: .target-near; far: 100000; direction: 0 0 -1; showLine: true;" line="color: purple;" cursor="fuse: false;">
</a-entity>

<a-entity id="pointer-raycaster-fuse"
raycaster="objects: .target; far: 100000; direction: 0 0 -1; showLine: true;" line="color: orange;" cursor="fuse: true; fuseTimeout: 1000">
</a-entity>

<a-circle id="pointer-checkpoint-fuse" scale="0.001 0.001 0.001" position="0 0 -0.1" material="color:gray; shader: flatUnexposed"
raycaster="objects: .target; far: 100000" cursor="fuse: true; fuseTimeout: 1000"
animation__fuse="property: scale; startEvents: mouseenter; pauseEvents: mouseleave; easing: easeOutCubic; dur: 1000; to: 1.01 1.01 1.01"
animation__click="property: scale; startEvents: click; easing: easeInCubic; dur: 0; to: 0.001 0.001 0.001"
animation__clear="property: scale; startEvents: mouseleave; easing: easeInCubic; dur: 100; to: 0.001 0.001 0.001">
</a-circle>
<a-entity id="pointer-cursor" constant-scale="0.015 0.015 0.015" position="0 0 0">
<a-circle id="pointer-circle-near"
material="color:gray; shader: flatUnexposed; transparent: true; opacity: 0">
</a-circle>

<a-circle id="pointer-circle-fuse" scale="0.001 0.001 0.001" position="0 0 -0.1"
material="color: gray; shader: flatUnexposed">
</a-circle>
</a-entity>

</a-entity>

Expand All @@ -135,16 +137,30 @@


<!-- CHECKPOINTS -->

<!-- stair bottom landing -->
<a-sphere mixin="checkpoint" position="-33 -54 -33">
<a-sphere mixin="checkpoint-target" class="target"></a-sphere>
<a-sphere mixin="checkpoint-near" class="target-near"></a-sphere>
</a-sphere>

<a-sphere mixin="checkpoint" position="73.2 -3.937 13.164">
<!-- stair near top -->
<a-sphere visible="false" mixin="checkpoint" position="73.59 -7.78 -7.26">
<a-sphere mixin="checkpoint-target" class="target"></a-sphere>
<a-sphere mixin="checkpoint-near" class="target-near"></a-sphere>
</a-sphere>

<!-- stair halfway up -->
<a-sphere mixin="checkpoint" position="-8.28 -25.58 69.00">
<a-sphere mixin="checkpoint-target" class="target"></a-sphere>
<a-sphere mixin="checkpoint-near" class="target-near"></a-sphere>
</a-sphere>

<!-- terrace -->
<a-sphere mixin="checkpoint" position="5.18 -58.70 -37.32">
<a-sphere mixin="checkpoint-target" class="target"></a-sphere>
<a-sphere mixin="checkpoint-near" class="target-near"></a-sphere>
</a-sphere>

<a-gltf-model id="outside" src="#outside-model" material="shader: flatUnexposed; color: #000000"></a-gltf-model>
<a-gltf-model id="roof" src="#roof-model" material="shader: flatUnexposed; color: #000000"></a-gltf-model>
Expand Down
Loading

0 comments on commit cbfcaaa

Please sign in to comment.