Ledmap persistent/consistent and showing in segment graph +small changes

pio.ini: remove ping pong clock from _all
ce.js: change on error handling
liveviewws2D: add colorAdjust
json.cpp: ledmaps will be stored in json/info 
settings_2D: fieldChange at loadJS

FX_(2D)fcn.cpp:
- loadedLedmap default 0 (default)
- loadedLedmap active then only use if index <size

index.js:
- global ledmap set to active value
- draw to drawSegments
- gradient colored leds
- add ledmaps to graphics
- add fetchAndExecute (from custom effects), used by drawSegments to get ledmap contents
- graphics bigger in non pc mode
This commit is contained in:
Ewoud
2023-02-10 16:26:35 +01:00
parent 26f97f4dc6
commit 40e82166bc
12 changed files with 2477 additions and 2387 deletions

View File

@@ -50,8 +50,9 @@
let lOf = Math.floor((c.width - pPL*mW)/2); //left offeset (to center matrix)
var i = 6;
ctx.clearRect(0, 0, c.width, c.height); //WLEDMM
function colorAdjust(color) {return 55+150*color/255;} //WLEDMM in range 55 - 205
for (y=0.5;y<mH;y++) for (x=0.5; x<mW; x++) {
ctx.fillStyle = `rgb(${leds[i]},${leds[i+1]},${leds[i+2]})`;
ctx.fillStyle = `rgb(${colorAdjust(leds[i])},${colorAdjust(leds[i+1])},${colorAdjust(leds[i+2])})`;
ctx.beginPath();
ctx.arc(x*pPL+lOf, y*pPL, pPL*0.4, 0, 2 * Math.PI);
ctx.fill();