mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-05-05 03:07:14 -04:00
wip
This commit is contained in:
parent
9716235531
commit
0a1d9dfe2f
18 changed files with 2391 additions and 1981 deletions
|
@ -302,22 +302,20 @@ export function render(gameState: GameState) {
|
|||
});
|
||||
startWork("render:ball shade");
|
||||
// Black shadow around balls
|
||||
if (!isOptionOn("basic")) {
|
||||
ctx.globalCompositeOperation = "source-over";
|
||||
gameState.balls.forEach((ball) => {
|
||||
ctx.globalAlpha =
|
||||
Math.min(0.8, liveCount(gameState.coins) / 20) *
|
||||
(1 - ballTransparency(ball, gameState));
|
||||
ctx.globalCompositeOperation = "source-over";
|
||||
gameState.balls.forEach((ball) => {
|
||||
ctx.globalAlpha =
|
||||
Math.min(0.8, liveCount(gameState.coins) / 20) *
|
||||
(1 - ballTransparency(ball, gameState));
|
||||
|
||||
drawBall(
|
||||
ctx,
|
||||
level.color || "#000",
|
||||
gameState.ballSize * 6,
|
||||
ball.x,
|
||||
ball.y,
|
||||
);
|
||||
});
|
||||
}
|
||||
drawBall(
|
||||
ctx,
|
||||
level.color || "#000",
|
||||
gameState.ballSize * 6,
|
||||
ball.x,
|
||||
ball.y,
|
||||
);
|
||||
});
|
||||
startWork("render:bricks");
|
||||
ctx.globalCompositeOperation = "source-over";
|
||||
renderAllBricks();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue