Build 29071900

This commit is contained in:
Renan LE CARO 2025-04-10 21:40:45 +02:00
parent 4bb5d820c5
commit 1b94bcd6be
16 changed files with 526 additions and 143 deletions

View file

@ -123,8 +123,9 @@ export function render(gameState: GameState) {
coin.y / haloScale,
);
});
haloCanvasCtx.globalAlpha = 0.3;
gameState.balls.forEach((ball) => {
haloCanvasCtx.globalAlpha = 0.3 * (1 - ballTransparency(ball, gameState));
drawFuzzyBall(
haloCanvasCtx,
gameState.ballsColor,
@ -251,12 +252,12 @@ export function render(gameState: GameState) {
ctx.globalAlpha = 1;
forEachLiveOne(gameState.coins, (coin) => {
const color = getCoinRenderColor(gameState, coin);
const hollow = gameState.perks.metamorphosis && !coin.metamorphosisPoints;
// ctx.globalCompositeOperation = "source-over";
ctx.globalCompositeOperation = "source-over";
drawCoin(
ctx,
color,
hollow ? "transparent" : color,
coin.size,
coin.x,
coin.y,
@ -264,6 +265,7 @@ export function render(gameState: GameState) {
(hasCombo && gameState.perks.asceticism && "#FF0000") ||
// Gold coins
// (color === "#ffd300" && "#ffd300") ||
(hollow && color) ||
gameState.level.color,
coin.a,
);
@ -869,6 +871,9 @@ export function drawCoin(
canctx.lineWidth = 2;
canctx.setLineDash(redBorderDash);
}
if (color === "transparent") {
canctx.lineWidth = 2;
}
canctx.stroke();
if (color === "#ffd300") {