diff --git a/src/hub.html b/src/hub.html index 62d4984389c245fcbba362f07292d16b23864bd1..84fdef5aad8143b197be7d1b2d494c6ea771e44e 100644 --- a/src/hub.html +++ b/src/hub.html @@ -17,6 +17,13 @@ <% } else { %> <script src="https://cdn.rawgit.com/aframevr/aframe/3e7a4b3/dist/aframe-master.js" integrity="sha384-EaMOuyBOi9ERV/lVDwQgz/yFWBDWPsIju5Co6oCZZHXuvbLBO81yPWn80q0BbBn3" crossorigin="anonymous"></script> <% } %> + + <script> + // HACK: this has to run after A-Frame but before our bundle, since A-Frame blows away the local storage setting + if (/[&?]debug=true/.test(window.location.search) && typeof localStorage !== "undefined") { + localStorage.debug = "naf-janus-adapter:*"; + } + </script> </head> <body data-html-prefix="<%= HTML_PREFIX %>"> diff --git a/src/hub.js b/src/hub.js index 97470e1db7add15cec671b179c3e4f3568c087a6..6153285d108a339594861a9216481cbfcd0df0e4 100644 --- a/src/hub.js +++ b/src/hub.js @@ -6,7 +6,6 @@ import { patchWebGLRenderingContext } from "./utils/webgl"; patchWebGLRenderingContext(); import "aframe-xr"; -import debug from "debug"; import "./vendor/GLTFLoader"; import "networked-aframe/src/index"; import "naf-janus-adapter"; @@ -132,17 +131,11 @@ function qsTruthy(param) { const isBotMode = qsTruthy("bot"); const isTelemetryDisabled = qsTruthy("disable_telemetry"); const isDebug = qsTruthy("debug"); -const logFilter = qs["log_filter"] || (isDebug && "naf-janus-adapter:*"); if (!isBotMode && !isTelemetryDisabled) { registerTelemetry(); } -// NOTE: this needs to happen after a-frame's `utils/debug.js` file has been eval'ed because it overwrites any prior debug settings :/ -if (logFilter) { - debug.enable(logFilter); -} - disableiOSZoom(); AFRAME.registerInputBehaviour("trackpad_dpad4", trackpad_dpad4);