mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-24 22:16:14 -04:00
Graphics change, more light thanks to optimized computations
This commit is contained in:
parent
83c79b6564
commit
ba7e368938
16 changed files with 215 additions and 90 deletions
11
src/game.ts
11
src/game.ts
|
@ -45,6 +45,8 @@ import {
|
|||
backgroundCanvas,
|
||||
ctx,
|
||||
gameCanvas,
|
||||
haloCanvas,
|
||||
haloScale,
|
||||
render,
|
||||
scoreDisplay,
|
||||
} from "./render";
|
||||
|
@ -127,12 +129,15 @@ export const fitSize = () => {
|
|||
gameState.canvasHeight = height;
|
||||
gameCanvas.width = width;
|
||||
gameCanvas.height = height;
|
||||
ctx.fillStyle = currentLevelInfo(gameState)?.color || "black";
|
||||
ctx.globalAlpha = 1;
|
||||
ctx.fillRect(0, 0, width, height);
|
||||
// ctx.fillStyle = currentLevelInfo(gameState)?.color || "black";
|
||||
// ctx.globalAlpha = 1;
|
||||
// ctx.fillRect(0, 0, width, height);
|
||||
backgroundCanvas.width = width;
|
||||
backgroundCanvas.height = height;
|
||||
|
||||
haloCanvas.width = width / haloScale;
|
||||
haloCanvas.height = height / haloScale;
|
||||
|
||||
gameState.gameZoneHeight = isOptionOn("mobile-mode")
|
||||
? (height * 80) / 100
|
||||
: height;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue