hooking up loading, flow, audio

This commit is contained in:
Kevin Ngo
2018-07-21 10:21:30 +02:00
parent 2c19dfe50a
commit 3abd6ba9cf
17 changed files with 221 additions and 170 deletions

View File

@@ -1,4 +1,4 @@
<a-entity id="sky" cubemap="folder: /assets/img/env/space/"></a-entity>
<a-entity id="sky" cubemap="folder: assets/img/env/space/"></a-entity>
<a-entity id="skyFade"
bind__visible="menu.active"
@@ -20,3 +20,5 @@
<!-- Default lights -->
<a-entity light="type: ambient; color: #BBB"></a-entity>
<a-entity light="type: directional; color: #FFF; intensity: 0.6" position="-0.5 1 1"></a-entity>
<a-entity id="dustParticles" particle-system="maxAge: 100; positionSpread: 5 5 5; type: 2; rotationAxis: x; rotationAngle: 0.001; accelerationValue: 0.001 0.001 0.001; accelerationSpread: 0.001 0.001 0.001; velocityValue: 0.001 0.001 0.001; velocitySpread: 0.0125 0.0125 0.0125; color: #ffffff; size: 0.1; opacity: 0.85; direction: 0; particleCount: 150; texture: assets/img/smokeparticle.png"></a-entity>

View File

@@ -1,36 +1,30 @@
<a-entity id="gameInfo"
bind__visible="isChallengeScreen"
bind__visible="!menu.active && !!challenge.id && !challenge.isLoading"
position="0 0 -80"
scale="100 100 100">
<a-entity mixin="textFont"
text="align:right; width:1.25; value:SCORE; color:#d6d955; anchor:right; letterSpacing:-2"
position="-0.089 0.183 -1.01"
bind__visible="!challenge.isLoading"></a-entity>
text="align: right; width: 1.25; value: SCORE; color: #d6d955; anchor: right; letterSpacing: -2"
position="-0.089 0.183 -1.01"></a-entity>
<a-entity mixin="textFont"
text="width:0.9; value:STREAK; color:#f95895; letterSpacing:-2; anchor:left"
position="0.097 0.183 -1.01"
bind__visible="!challenge.isLoading"></a-entity>
text="width: 0.9; value: STREAK; color: #f95895; letterSpacing: -2; anchor: left"
position="0.097 0.183 -1.01"></a-entity>
<a-entity mixin="textFont"
text="width:0.7; value:MAX; color:#f95895; anchor:left; letterSpacing:-2"
position="0.101 0.1 -1.01"
bind__visible="!challenge.isLoading"></a-entity>
text="width: 0.7; value: MAX; color: #f95895; anchor: left; letterSpacing: -2"
position="0.101 0.1 -1.01"></a-entity>
<a-entity id="score"
bind__text="value: score"
bind__text="value: score.score"
mixin="textFont"
text="align:right; width:2; color:#feffc1; anchor:right; letterSpacing:-2"
position="-0.08 0.132 -1"
bind__visible="!challenge.isLoading"></a-entity>
text="align: right; width: 2; color: #feffc1; anchor: right; letterSpacing: -2"
position="-0.08 0.132 -1"></a-entity>
<a-entity id="streak"
bind__text="value: streak"
bind__text="value: score.streak"
mixin="textFont"
text="width:1.25; color:#ffbdd6; anchor:left; letterSpacing:-2"
position="0.098 0.144 -1"
bind__visible="!challenge.isLoading"></a-entity>
text="width: 1.25; color: #ffbdd6; anchor: left; letterSpacing: -2"
position="0.098 0.144 -1"></a-entity>
<a-entity id="maxStreak"
bind__text="value: maxStreak"
bind__text="value: score.maxStreak"
mixin="textFont"
text="width:0.8; color:#ffbdd6; anchor:left; letterSpacing:-2"
position="0.1 0.074 -1"
bind__visible="!challenge.isLoading"></a-entity>
text="width: 0.8; color: #ffbdd6; anchor: left; letterSpacing: -2"
position="0.1 0.074 -1"></a-entity>
</a-entity>

View File

@@ -12,7 +12,7 @@
geometry="primitive: plane; width: 0.8; height: 0.1"
material="shader: flat; color: #111"
position="0 -0.13 -0.01"
play-audio="event: mouseenter; audio: #hoverSound; volume: 0.03"
play-sound="event: mouseenter; sound: #hoverSound; volume: 0.03"
animation__mouseenter="property: material.color; from: #111; to: #666; startEvents: mouseenter; pauseEvents: mouseleave; dur: 150"
animation__mouseleave="property: material.color; from: #666; to: #111; startEvents: mouseleave; pauseEvents: mouseenter; dur: 150"
raycastable></a-entity>
@@ -50,7 +50,7 @@
geometry="primitive: plane; width: 0.3; height: 0.1"
material="shader: flat; color: #111"
position="-0.4 -0.005 0"
play-audio="event: mouseenter; audio: #hoverSound; volume: 0.03"
play-sound="event: mouseenter; sound: #hoverSound; volume: 0.03"
animation__mouseenter="property: material.color; from: #111; to: #666; startEvents: mouseenter; pauseEvents: mouseleave; dur: 150"
animation__mouseleave="property: material.color; from: #666; to: #111; startEvents: mouseleave; pauseEvents: mouseenter; dur: 150"
bind-toggle__raycastable="menu.active && !!menuSelectedChallenge.id"></a-entity>
@@ -75,10 +75,11 @@
<a-entity class="menuSelectedChallengeDownloads" mixin="textFont" text="align: center; color: #FFF; wrapCount: 45" position="0 -0.09 0" bind__text="value: menuSelectedChallenge.downloadsText"></a-entity>
</a-entity>
<a-plane id="play"
<a-plane id="playButton"
play-button
play-audio="event: mouseenter; audio: #hoverSound; volume: 0.03"
play-sound="event: mouseenter; sound: #hoverSound; volume: 0.03"
position="0 -0.25 0"
proxy-event="event: click; to: a-scene; as: playbuttonclick"
material="shader: flat; src: #playImg; transparent: true; color: #BBB"
width="0.256"
height="0.128"