diff --git a/src/mode/fdm/prepare.js b/src/mode/fdm/prepare.js index 28e4cb9d..d009d9a4 100644 --- a/src/mode/fdm/prepare.js +++ b/src/mode/fdm/prepare.js @@ -413,10 +413,16 @@ let lastOut = null; let current = null; - function color(point) { + function colorDefault(point) { return hsv2rgb({h:point.speed / maxspd, s:1, v:0.75}, true); } + function colorCustom(point) { + return FDM.rateToColor(point.speed, maxspd); + } + + const color = FDM.rateToColor ? colorCustom : colorDefault; + levels.forEach((level, index) => { const prints = {}; const moves = [];