add optional speed chart in preview mode

This commit is contained in:
Stewart Allen 2020-11-10 21:48:04 -05:00
commit 2c646352ad
9 changed files with 102 additions and 9 deletions

View file

@ -397,6 +397,10 @@
}
}
FDM.colorFunc = function(rate) {
return hsv2rgb({h: rate, s:1, v:0.75}, true);
};
FDM.prepareRender = function(levels, update, options) {
const opts = options || {};
const tools = opts.tools || {};
@ -410,6 +414,9 @@
return level.map(o => o.speed || 0).reduce((a, v) => Math.max(a,v));
}).reduce((a, v) => Math.max(a, v)) + 1;
// for reporting
self.worker.print.maxSpeed = maxspd - 1;
let lastOut = null;
let current = null;