fix cursor mesh visibility
This commit is contained in:
@@ -216,8 +216,8 @@
|
||||
<a-entity
|
||||
id="{{ hand }}CursorMesh"
|
||||
mixin="cursorMesh"
|
||||
bind__cursor-mesh="active: menu.active && activeHand === '{{ hand }}'"
|
||||
cursor-mesh="active: menu.active && activeHand === '{{ hand }}'; cursorEl: #{{ hand }}Hand"
|
||||
bind__cursor-mesh="active: {{ hand }}RaycasterActive"
|
||||
cursor-mesh="active: {{ hand }}RaycasterActive; cursorEl: #{{ hand }}Hand"
|
||||
material="color: {{ beamColor }}"
|
||||
scale="1.3 1.3 1.3"></a-entity>
|
||||
{% endmacro %}
|
||||
|
||||
@@ -259,8 +259,11 @@ AFRAME.registerState({
|
||||
state.isPlaying =
|
||||
!state.menu.active && !state.isPaused && !state.isVictory && !state.isGameOver &&
|
||||
!state.challenge.isLoading && !state.isSongLoading;
|
||||
state.leftRaycasterActive = !state.isPlaying && state.activeHand === 'left' && state.inVR;
|
||||
state.rightRaycasterActive = !state.isPlaying && state.activeHand === 'right' && state.inVR;
|
||||
|
||||
const anyMenuOpen = state.menu.active || state.isPaused || state.isVictory || state.isGameOver;
|
||||
state.leftRaycasterActive = anyMenuOpen && state.activeHand === 'left' && state.inVR;
|
||||
state.rightRaycasterActive = anyMenuOpen && state.activeHand === 'right' && state.inVR;
|
||||
|
||||
state.multiplierText = `${state.score.multiplier}x`;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user