✨ Updated debug output
This commit is contained in:
parent
a5d9da60db
commit
08a372184b
2 changed files with 10 additions and 12 deletions
|
@ -39,7 +39,8 @@ Part.prototype.macroClosure = function(args) {
|
||||||
self[macro](args);
|
self[macro](args);
|
||||||
} else {
|
} else {
|
||||||
self.debug(
|
self.debug(
|
||||||
{ style: "warning", label: "🔍 Macro not found" },
|
"warning",
|
||||||
|
"Macro not found",
|
||||||
`Macro ${macro.substr(7)} is not registered`
|
`Macro ${macro.substr(7)} is not registered`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -169,7 +169,8 @@ Pattern.prototype.sampleOption = function(optionName) {
|
||||||
for (let run = 1; run < 11; run++) {
|
for (let run = 1; run < 11; run++) {
|
||||||
this.options[optionName] = val;
|
this.options[optionName] = val;
|
||||||
this.debug(
|
this.debug(
|
||||||
{ style: "info", label: "🔬 Sample run" },
|
"info",
|
||||||
|
"Sample run",
|
||||||
`Sampling option ${optionName} with value ${round(val)}`
|
`Sampling option ${optionName} with value ${round(val)}`
|
||||||
);
|
);
|
||||||
this.sampleRun(parts, anchors, run, 10);
|
this.sampleRun(parts, anchors, run, 10);
|
||||||
|
@ -189,7 +190,8 @@ Pattern.prototype.sampleListOption = function(optionName) {
|
||||||
for (let val of option.list) {
|
for (let val of option.list) {
|
||||||
this.options[optionName] = val;
|
this.options[optionName] = val;
|
||||||
this.debug(
|
this.debug(
|
||||||
{ style: "info", label: "🔬 Sample run" },
|
"info",
|
||||||
|
"Sample run",
|
||||||
`Sampling option ${optionName} with value ${round(val)}`
|
`Sampling option ${optionName} with value ${round(val)}`
|
||||||
);
|
);
|
||||||
this.sampleRun(parts, anchors, run, runs);
|
this.sampleRun(parts, anchors, run, runs);
|
||||||
|
@ -213,7 +215,8 @@ Pattern.prototype.sampleMeasurement = function(measurementName) {
|
||||||
for (let run = 1; run < 11; run++) {
|
for (let run = 1; run < 11; run++) {
|
||||||
this.settings.measurements[measurementName] = val;
|
this.settings.measurements[measurementName] = val;
|
||||||
this.debug(
|
this.debug(
|
||||||
{ style: "info", label: "🔬 Sample run" },
|
"info",
|
||||||
|
"Sample run",
|
||||||
`Sampling measurement ${measurementName} with value ${round(val)}`
|
`Sampling measurement ${measurementName} with value ${round(val)}`
|
||||||
);
|
);
|
||||||
this.sampleRun(parts, anchors, run, 10);
|
this.sampleRun(parts, anchors, run, 10);
|
||||||
|
@ -235,10 +238,7 @@ Pattern.prototype.sampleModels = function(models, focus = false) {
|
||||||
for (let l in models) {
|
for (let l in models) {
|
||||||
run++;
|
run++;
|
||||||
this.settings.measurements = models[l];
|
this.settings.measurements = models[l];
|
||||||
this.debug(
|
this.debug("info", "Sample run", `Sampling model ${l}`);
|
||||||
{ style: "info", label: "🔬 Sample run" },
|
|
||||||
`Sampling model ${l}`
|
|
||||||
);
|
|
||||||
let className = l === focus ? "sample-focus" : "";
|
let className = l === focus ? "sample-focus" : "";
|
||||||
this.sampleRun(parts, anchors, run, runs, className);
|
this.sampleRun(parts, anchors, run, runs, className);
|
||||||
}
|
}
|
||||||
|
@ -277,10 +277,7 @@ Pattern.prototype.on = function(hook, method) {
|
||||||
};
|
};
|
||||||
|
|
||||||
Pattern.prototype.with = function(plugin) {
|
Pattern.prototype.with = function(plugin) {
|
||||||
this.debug(
|
this.debug("success", "Plugin loaded", `${plugin.name} v${plugin.version}`);
|
||||||
{ style: "success", label: "🔌 Plugin loaded" },
|
|
||||||
`${plugin.name} v${plugin.version}`
|
|
||||||
);
|
|
||||||
if (plugin.hooks) this.loadPluginHooks(plugin);
|
if (plugin.hooks) this.loadPluginHooks(plugin);
|
||||||
if (plugin.macros) this.loadPluginMacros(plugin);
|
if (plugin.macros) this.loadPluginMacros(plugin);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue