leaderboard

This commit is contained in:
Kevin Ngo
2018-11-18 02:01:47 -08:00
parent 200007dbfc
commit fdd625c4ab
10 changed files with 1001 additions and 28 deletions

View File

@@ -0,0 +1,62 @@
<a-entity
id="leaderboard"
class="overlay"
position="2.44 1.1 -1.24"
rotation="0 -30 0"
bind__visible="leaderboardFetched && menuActive || isPaused || isVictory">
<a-entity
mixin="slice"
id="leaderboardBackground"
position="0 -0.07 0"
slice9="left: 70; width: 1.5; height: 1.79; opacity: 0.9"></a-entity>
<a-entity
id="leaderboardTitle"
mixin="font"
bind__leaderboard-title="leaderboardQualified: leaderboardQualified"
text="align: center; width: 2.5; value: LEADERBOARD"
position="0 0.540 0.001"></a-entity>
<a-entity
id="leaderboardText"
mixin="font"
bind__text="value: leaderboardText"
bind__visible="!leaderboardQualified && !leaderboardEmpty"
text="baseline: top; width: 1; anchor: left; color: #00acfc; wrapCount: 20"
position="-0.6 0.35 0.001"></a-entity>
<a-entity
id="leaderboardScores"
mixin="font"
bind__text="value: leaderboardText"
bind__visible="!leaderboardQualified && !leaderboardEmpty"
text="baseline: top; align: right; width: 1; anchor: right; color: #fff; wrapCount: 20"
position="0.6 0.35 0.001"></a-entity>
<a-entity
id="leaderboardEmpty"
mixin="font"
bind__visible="leaderboard.length === 0"
text="align: center; baseline: top; width: 1.6; value: No high scores yet, be the first!"
position="0 0.47 0.001"></a-entity>
<a-entity
id="leaderboardKeyboard"
bind__super-keyboard="{% if not DEBUG_KEYBOARD %}hand: activeHand === 'left' && '#leftHand' || '#rightHand'; {% endif %}show: leaderboardQualified"
super-keyboard="label: Enter yourself to the leaderboard!; inputColor: #00acfc; labelColor: #FFF; width: 1.36; hand: {{ DEBUG_KEYBOARD and '#mouseCursor' or '#rightHand' }}; imagePath: assets/img/keyboard/; font: assets/fonts/Teko-Bold.json; align: center; model: supersaber; keyColor: #fff; injectToRaycasterObjects: false; filters: allupper; keyHoverColor: #fff; maxLength: 15"
position="0 -0.160 0.001"
proxy-event__change="event: superkeyboardchange; to: a-scene; as: leaderboardusername"
keyboard-raycastable="condition: leaderboardQualified">
</a-entity>
<a-entity id="leaderboardSubmit"
position="0 -0.730 0.002"
mixin="bigMenuButton"
bind__visible-raycastable="leaderboardQualified"
slice9="width: 1"
proxy-event="event: click; to: a-scene; as: leaderboardsubmit">
<a-entity mixin="font" text="align: center; color: #AAA; wrapCount: 20; value: SUBMIT HIGH SCORE" position="0 -0.07 0.01"></a-entity>
</a-entity>
</a-entity>

View File

@@ -303,7 +303,7 @@
bind__super-keyboard="{% if not DEBUG_KEYBOARD %}hand: activeHand === 'left' && '#leftHand' || '#rightHand'; {% endif %}show: isSearching"
super-keyboard="label: Search from over 6000 songs!; inputColor: #fff; labelColor: #FFF; width: 1.2; hand: {{ DEBUG_KEYBOARD and '#mouseCursor' or '#rightHand' }}; imagePath: assets/img/keyboard/; font: assets/fonts/Teko-Bold.json; align: center; model: supersaber; keyColor: #fff; injectToRaycasterObjects: false; filters: allupper; keyHoverColor: #fff"
position="0.6 1.1 -1.999"
keyboard-raycastable
keyboard-raycastable="condition: isSearching"
search
proxy-event__dismiss="event: superkeyboarddismiss; to: a-scene; as: keyboardclose"
proxy-event__accept="event: superkeyboardinput; to: a-scene; as: keyboardclose">