gas charge fix

This commit is contained in:
Lily-129 2022-03-01 12:15:02 -05:00 committed by GitHub
parent a16d672439
commit bcbed3959c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 4 deletions

View File

@ -92,6 +92,12 @@
}
if (pixel.charge && view !== 2) { // Yellow glow on charge
if (!elements[pixel.element].colorOn) {
if ((view === null || view === 4) && elements[pixel.element].state === "gas") {
ctx.fillStyle = "rgba(255,255,0,0.5)";
ctx.beginPath();
ctx.arc((pixel.x+0.5)*pixelSize, (pixel.y+0.5)*pixelSize, pixelSize*1.5, 0, 2 * Math.PI, false);
ctx.fill();
} else {
ctx.fillStyle = "rgba(255,255,0,0.5)";
ctx.beginPath();
ctx.arc((pixel.x+0.5)*pixelSize, (pixel.y+0.5)*pixelSize, pixelSize/2, 0, 2 * Math.PI, false);
@ -99,5 +105,6 @@
}
}
}
}
if ((!paused) || forceTick) {pixelTicks++};
}