remove largely unused debug class

This commit is contained in:
Stewart Allen 2021-07-04 21:05:46 -04:00
commit 6337cae736
15 changed files with 30 additions and 281 deletions

View file

@ -1,4 +1,4 @@
/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
"use strict";
@ -203,7 +203,7 @@
function gridhost_tracker(host,key) {
ajax(host+"/api/check?key="+key, function(data) {
data = js2o(data);
DBUG.log(data);
console.log(data);
if (!(data.done || data.error)) {
setTimeout(function() { gridhost_tracker(host,key) }, 1000);
}
@ -373,7 +373,7 @@
gridhost_tracker(host,json.key);
API.ajax(host+"/api/wait?key="+json.key, function(data) {
data = js2o(data);
DBUG.log(data);
console.log(data);
API.show.alert("print to "+target+": "+data.status, 600);
});
} else {

View file

@ -1,4 +1,4 @@
/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
"use strict";
@ -8,7 +8,6 @@
KIRI = self.kiri,
BASE = self.base,
UTIL = BASE.util,
DBUG = BASE.debug,
LANG = KIRI.lang.current,
WIN = self.window,
DOC = self.document,
@ -56,8 +55,6 @@
saveTimer = null,
noop = () => {};
DBUG.enable();
// add show() to catalog for API
CATALOG.show = showCatalog;
@ -1134,7 +1131,7 @@
API.event.emit('slice.end', getMode());
// print stats
segtimes.total = Date.now() - now;
DBUG.log(segtimes);
console.log(segtimes);
if (callback && typeof callback === 'function') {
callback();
}
@ -1231,7 +1228,7 @@
// print stats
segtimes.total = Date.now() - now;
DBUG.log(segtimes);
console.log(segtimes);
API.event.emit('print', pMode);
API.event.emit('preview.end', pMode);
@ -2483,7 +2480,7 @@
function loadFile() {
$('load-file').onchange = function(event) {
DBUG.log(event);
console.log(event);
platformLoadFiles(event.target.files);
};
$('load-file').click();
@ -2908,7 +2905,7 @@
setWidgetVisibility(true);
break;
default:
DBUG.log("invalid view mode: "+mode);
console.log("invalid view mode: "+mode);
return;
}
API.event.emit('view.set', mode);
@ -2933,7 +2930,7 @@
function setMode(mode, lock, then) {
if (!MODES[mode]) {
DBUG.log("invalid mode: "+mode);
console.log("invalid mode: "+mode);
mode = 'FDM';
}
// change mode constants

View file

@ -13,7 +13,6 @@
FDM = DRIVERS.FDM,
BASE = self.base,
UTIL = BASE.util,
DBUG = BASE.debug,
POLY = BASE.polygons,
SQRT = Math.sqrt,
SQR = UTIL.sqr,

View file

@ -516,8 +516,7 @@
*/
function connectLines(input, z, debug) {
// map points to all other points they're connected to
let DBUG = BASE.debug,
CONF = BASE.config,
let CONF = BASE.config,
pmap = {},
points = [],
output = [],
@ -532,6 +531,7 @@
if (cp) return cp;
points.push(p);
pmap[p.key] = p;
p.pos = 0;
p.mod = nextMod++; // unique seq ID for points
p.toString = function() { return this.mod }; // point array concat
return p;
@ -559,7 +559,7 @@
function findPathsMinRecurse(point, path, paths, from) {
let stack = [ ];
if (paths.length > 10000) {
DBUG.log(`indeterminate path @ ${z} from paths=${paths.length} input=${input.length}`);
console.log(`indeterminate path @ ${z} from paths=${paths.length} input=${input.length}`);
input.excessive = paths.length;
return;
}

View file

@ -1,4 +1,4 @@
/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
"use strict";
@ -10,7 +10,6 @@
DRIVERS = KIRI.driver,
BASE = self.base,
CONF = BASE.config,
DBUG = BASE.debug,
UTIL = BASE.util,
POLY = BASE.polygons,
MATH = Math,
@ -721,7 +720,7 @@
if (driver) {
driver.slice(settings, widget, catchupdate, catchdone);
} else {
DBUG.log('invalid mode: '+settings.mode);
console.log('invalid mode: '+settings.mode);
ondone('invalid mode: '+settings.mode);
}
}

View file

@ -177,7 +177,6 @@ KIRI.minions = {
};
console.log(`kiri | init work | ${KIRI.version || "rogue"}`);
BASE.debug.disable();
// code is running in the worker / server context
const dispatch =