repo: janusweb action: commit revision: path_from: revision_from: 39d498dc5ff7684419a32f3b377f904621335aa0: path_to: revision_to:
commit 39d498dc5ff7684419a32f3b377f904621335aa0 Author: James BaicoianuDate: Thu Dec 22 03:36:15 2016 -0800 Improved cursor logic for VR diff --git a/scripts/janusbase.js b/scripts/janusbase.js
--- a/scripts/janusbase.js
+++ b/scripts/janusbase.js
@@ -307,9 +307,10 @@ console.error('dunno what this is', other);
});
}
this.updatePlayerCursor = function(ev) {
- if (ev.type == 'mouseover' && this.onclick) {
+ var vrdisplay = this.engine.systems.render.views.main.vrdisplay;
+ if (ev.type == 'mouseover' && (this.onclick || elation.events.hasEventListener(this, 'click'))) {
this.engine.client.player.cursor_style = 'pointer';
- } else if (this.engine.systems.controls.pointerLockActive) {
+ } else if (this.engine.systems.controls.pointerLockActive || (vrdisplay && vrdisplay.isPresenting)) {
this.engine.client.player.cursor_style = 'crosshair';
} else {
this.engine.client.player.cursor_style = 'default';
-----END OF PAGE-----