add ability to provide custom preview colorizer
This commit is contained in:
parent
35448175ea
commit
48e43f1a98
1 changed files with 7 additions and 1 deletions
|
|
@ -413,10 +413,16 @@
|
||||||
let lastOut = null;
|
let lastOut = null;
|
||||||
let current = null;
|
let current = null;
|
||||||
|
|
||||||
function color(point) {
|
function colorDefault(point) {
|
||||||
return hsv2rgb({h:point.speed / maxspd, s:1, v:0.75}, true);
|
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) => {
|
levels.forEach((level, index) => {
|
||||||
const prints = {};
|
const prints = {};
|
||||||
const moves = [];
|
const moves = [];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue