2017-12-31 18:26:59 +01:00
|
|
|
// Set prod to true when releasing
|
2019-08-23 02:25:48 +02:00
|
|
|
// const _prod = true;
|
|
|
|
const _prod = false;
|
2017-12-31 18:26:59 +01:00
|
|
|
|
2018-12-30 23:16:09 +01:00
|
|
|
var Debug = {
|
2019-05-04 21:33:48 +02:00
|
|
|
// performanceMetrics: true, // should not be affected by debug.debug in order to allow benchmarking of the impact logging in console has
|
2019-09-18 01:05:17 +02:00
|
|
|
// init: true,
|
|
|
|
// debug: true,
|
2019-06-14 23:21:03 +02:00
|
|
|
// keyboard: true,
|
2019-09-18 01:05:17 +02:00
|
|
|
// resizer: true,
|
2019-06-14 23:21:03 +02:00
|
|
|
// debugArDetect: true,
|
|
|
|
// scaler: true,
|
|
|
|
// debugStorage: true,
|
2019-09-18 01:05:17 +02:00
|
|
|
// comms: true,
|
2018-04-26 00:40:09 +02:00
|
|
|
// showArDetectCanvas: true,
|
2019-01-02 20:36:00 +01:00
|
|
|
// flushStoredSettings: true,
|
2019-06-14 23:21:03 +02:00
|
|
|
// playerDetect: true,
|
2019-06-02 23:54:32 +02:00
|
|
|
// periodic: true,
|
2019-08-31 22:10:51 +02:00
|
|
|
// videoRescan: true,
|
2019-02-15 00:00:22 +01:00
|
|
|
// mousemove: true,
|
2019-06-02 23:54:32 +02:00
|
|
|
// arDetect: {
|
2019-02-16 01:19:29 +01:00
|
|
|
// edgeDetect: true
|
2019-06-02 23:54:32 +02:00
|
|
|
// },
|
2019-06-03 00:39:33 +02:00
|
|
|
// canvas: {
|
2019-06-02 23:54:32 +02:00
|
|
|
// debugDetection: true
|
2019-06-03 00:39:33 +02:00
|
|
|
// },
|
2019-06-03 00:45:59 +02:00
|
|
|
debugCanvas: {
|
2018-07-10 21:58:26 +02:00
|
|
|
// enabled: true,
|
|
|
|
// guardLine: true
|
2019-06-03 00:39:33 +02:00
|
|
|
// enabled: false,
|
|
|
|
// guardLine: false
|
2019-06-03 00:45:59 +02:00
|
|
|
}
|
2017-09-24 01:54:46 +02:00
|
|
|
}
|
|
|
|
|
2017-12-31 18:26:59 +01:00
|
|
|
if(_prod){
|
2018-05-02 17:52:25 +02:00
|
|
|
__disableAllDebug(Debug);
|
|
|
|
}
|
|
|
|
|
|
|
|
function __disableAllDebug(obj) {
|
2019-06-03 00:45:59 +02:00
|
|
|
for(let key in obj) {
|
2018-05-02 17:52:25 +02:00
|
|
|
if (obj.hasOwnProperty(key) ){
|
2019-06-03 00:45:59 +02:00
|
|
|
if(obj[key] instanceof Object) {
|
2018-05-02 17:52:25 +02:00
|
|
|
__disableAllDebug(obj[key]);
|
2019-06-03 00:45:59 +02:00
|
|
|
}
|
|
|
|
else {
|
2018-05-02 17:52:25 +02:00
|
|
|
obj[key] = false;
|
2019-06-03 00:45:59 +02:00
|
|
|
}
|
2018-05-02 17:52:25 +02:00
|
|
|
}
|
2017-12-31 18:26:59 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-09-24 01:54:46 +02:00
|
|
|
if(Debug.debug)
|
|
|
|
console.log("Guess we're debugging ultrawidify then. Debug.js must always load first, and others must follow.\nLoading: Debug.js");
|
2018-12-30 23:16:09 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default Debug;
|