Update glow.js

This commit is contained in:
slweeb 2025-01-08 14:41:56 -05:00
parent ec40b6dcf3
commit 86574d889b
1 changed files with 21 additions and 1 deletions

View File

@ -1,3 +1,21 @@
/* TODO:
- warning and automatic disable for non-chromium users
- firefly glow
- sun temperature-dependent glow strength
*/
var isChromium = !!window.chrome;
if (!isChromium) {
window.addEventListener("load",function(){
console.log(1)
logMessage("Error: glow.js only works on Chrome or Chromium-based browsers.")
})
}
else {
addCanvasLayer("glowmod");
addCanvasLayer("glowmod2");
canvasLayersPre.unshift(canvasLayers["glowmod"]);
@ -78,4 +96,6 @@ renderEachPixel(function(pixel,ctx) {
drawSquare(glowmodCtx2,"#ffff00",pixel.x-1,pixel.y-1,3);
}
}
})
})
}