Change Game Background Color
To debug correct canvas
This commit is contained in:
parent
2eacf58314
commit
96a776c60b
1 changed files with 1 additions and 2 deletions
|
@ -16,11 +16,10 @@ class Game {
|
||||||
void update([num dt]) {}
|
void update([num dt]) {}
|
||||||
|
|
||||||
void draw([num interp]) {
|
void draw([num interp]) {
|
||||||
// CanvasRenderingContext2D ctx = this.canvas.getContext('2d');
|
|
||||||
// print(grid.toString());
|
|
||||||
int brickW = (canvas.width ~/ grid[0].length);
|
int brickW = (canvas.width ~/ grid[0].length);
|
||||||
int brickH = (canvas.height ~/ grid.length);
|
int brickH = (canvas.height ~/ grid.length);
|
||||||
|
|
||||||
|
ctx.setFillColorRgb(255, 0,0);
|
||||||
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
||||||
for(int y=0;y<grid.length;y++) {
|
for(int y=0;y<grid.length;y++) {
|
||||||
for(int x=0;x<grid[y].length;x++) {
|
for(int x=0;x<grid[y].length;x++) {
|
||||||
|
|
Loading…
Reference in a new issue