menu-controls allow unselecting / going back, remove unnoticable animations for perf

This commit is contained in:
Kevin Ngo
2018-10-04 01:54:25 -07:00
parent 6ee60c8b0c
commit 5bd7ca3246
6 changed files with 49 additions and 26 deletions

View File

@@ -111,7 +111,9 @@ AFRAME.registerComponent('menu-controls', {
unselect: function () {
if (!this.data.enabled) { return; }
this.el.sceneEl.emit('menuunselect', null, false);
if (this.data.selectedChallengeId) {
this.el.sceneEl.emit('menuchallengeunselect', null, false);
}
},
hoverResult: function (i) {