2018-07-18 20:48:45 +02:00
|
|
|
{% macro searchResults () %}
|
|
|
|
|
<a-entity id="searchResultList"
|
2018-07-20 19:58:09 +02:00
|
|
|
bind-for="for: item; in: searchResults; key: id; template: #searchResultTemplate"
|
2018-07-20 19:19:54 +02:00
|
|
|
layout="type: box; columns: 1; marginRow: 0.125"
|
2018-07-20 19:58:09 +02:00
|
|
|
search-result-list>
|
2018-07-18 20:48:45 +02:00
|
|
|
</a-entity>
|
|
|
|
|
|
|
|
|
|
{% raw %}
|
|
|
|
|
<template id="searchResultTemplate">
|
2018-07-20 19:58:09 +02:00
|
|
|
<a-entity class="searchResult" data-id="{{ item.id }}">
|
2018-07-20 19:19:54 +02:00
|
|
|
<a-entity class="searchResultSlice"
|
|
|
|
|
geometry="primitive: plane; width: 0.8; height: 0.1"
|
|
|
|
|
material="shader: flat; transparent: true; src: #resultImg; color: #BBB"
|
|
|
|
|
position="0 -0.13 -0.01"
|
|
|
|
|
play-audio="event: mouseenter; audio: #hoverSound; volume: 0.03"
|
|
|
|
|
animation__mouseenter="property: material.color; from: #BBB; to: #FFF; startEvents: mouseenter; pauseEvents: mouseleave; dur: 150"
|
|
|
|
|
animation__mouseleave="property: material.color; from: #FFF; to: #BBB; startEvents: mouseleave; pauseEvents: mouseenter; dur: 150"
|
|
|
|
|
raycastable></a-entity>
|
|
|
|
|
<a-entity class="searchResultContent" position="0.125 -0.05 0">
|
|
|
|
|
<a-entity class="searchResultImage" geometry="primitive: plane; width: 0.1; height: 0.1" material="shader: flat; src: url(https://s3-us-west-2.amazonaws.com/supersaber/{{ item.id }}-image.jpg)" position="-0.6 -0.08 0.001"></a-entity>
|
|
|
|
|
<a-entity class="searchResultAuthor" mixin="textFont" text="wrapCount: 48; align: left; color: #54c2fd; value: {{ item.songSubName }}" position="0 -0.060 0"></a-entity>
|
|
|
|
|
<a-entity class="searchResultTitle" mixin="textFont" text="align: left; color: #FFF; wrapCount: 35; value: {{ item.songName }}" position="0 -0.09 0"></a-entity>
|
|
|
|
|
<a-entity class="searchResultDownloads" mixin="textFont" text="color: #cc0856; anchor: left; value: {{ item.downloads }}" position="0.12 -0.09 0"></a-entity>
|
2018-07-18 20:48:45 +02:00
|
|
|
</a-entity>
|
|
|
|
|
</a-entity>
|
|
|
|
|
</template>
|
|
|
|
|
{% endraw %}
|
|
|
|
|
{% endmacro %}
|
|
|
|
|
|
2018-07-20 19:58:09 +02:00
|
|
|
<a-entity id="menu" bind__visible="menu.active" position="0 1 -1">
|
2018-07-20 15:42:47 +02:00
|
|
|
<a-entity id="keyboard" super-keyboard="hand: {{ DEBUG_KEYBOARD and '#mouseCursor' or '#rightHand' }}; imagePath: assets/img/keyboard/; injectToRaycasterObjects: false" position="0 0.2 0.02" keyboard-raycastable search></a-entity>
|
|
|
|
|
|
2018-07-18 20:48:45 +02:00
|
|
|
<a-plane id="play"
|
|
|
|
|
play-button
|
|
|
|
|
play-audio="event: mouseenter; audio: #hoverSound; volume: 0.03"
|
|
|
|
|
position="0 0.15 0"
|
|
|
|
|
material="shader: flat; src: #playImg; transparent: true; color: #BBB"
|
|
|
|
|
width="0.512"
|
|
|
|
|
height="0.256"
|
|
|
|
|
animation__mouseenter1="property: material.color; from: #BBB; to: #FFF; startEvents: mouseenter; pauseEvents: mouseleave; dur: 150"
|
|
|
|
|
animation__mouseleave1="property: material.color; from: #FFF; to: #BBB; startEvents: mouseleave; pauseEvents: mouseenter; dur: 150"
|
|
|
|
|
animation__mouseenter2="property: scale; from: 1 1 1; to: 1.1 1.1 1.1; startEvents: mouseenter; pauseEvents: mouseleave; dur: 150"
|
|
|
|
|
animation__mouseleave2="property: scale; to: 1 1 1; from: 1.1 1.1 1.1; startEvents: mouseleave; pauseEvents: mouseenter; dur: 150"
|
|
|
|
|
bind-toggle__raycastable="playButtonShowing"
|
|
|
|
|
bind__visible="playButtonShowing"></a-plane>
|
|
|
|
|
|
|
|
|
|
<a-entity id="searchResultsContainer" position="-0.85 0.7 0">
|
|
|
|
|
{{ searchResults() }}
|
|
|
|
|
</a-entity>
|
|
|
|
|
</a-entity>
|
|
|
|
|
|
|
|
|
|
<a-entity id="songInfo"
|
|
|
|
|
bind__visible="isChallengeScreen"
|
|
|
|
|
position="0 -0.25 0">
|
|
|
|
|
<a-entity id="loadingText"
|
|
|
|
|
bind__text="value: loadingText"
|
|
|
|
|
mixin="textFont"
|
|
|
|
|
text="align: center; width: 1.25"
|
|
|
|
|
position="0 1 -1"
|
|
|
|
|
rotation="-25 0 0"
|
|
|
|
|
bind__visible="challenge.isLoading"></a-entity>
|
|
|
|
|
<a-entity id="title"
|
|
|
|
|
mixin="textFont"
|
|
|
|
|
text="align: center; width: 2.50; wrapCount: 80"
|
|
|
|
|
position="0 0.9 -1"
|
|
|
|
|
rotation="-25 0 0"></a-entity>
|
|
|
|
|
</a-entity>
|