Skip to content

Commit

Permalink
Lint library files
Browse files Browse the repository at this point in the history
  • Loading branch information
zerebos committed Jul 28, 2023
1 parent 0b20e39 commit fda69fe
Show file tree
Hide file tree
Showing 4 changed files with 461 additions and 661 deletions.
6 changes: 4 additions & 2 deletions src/game.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import Player from "./player";
import Block from "./block";
import WebGLUtils from "./utils/webgl-utils";

let player;
const blocks = [];

/** @type {WebGLRenderingContext} */
let gl;

const keyEnum = {UP: 0, DOWN: 1, LEFT: 2, RIGHT: 3};
Expand All @@ -25,8 +26,9 @@ window.game = new class Game {
statusDisplay = document.getElementById("status");
playDisplay = document.getElementById("play");

/** @type {HTMLCanvasElement} */
const canvas = document.getElementById("gl-canvas");
gl = WebGLUtils.setupWebGL(canvas);
gl = canvas.getContext("webgl");
if (!gl) alert("WebGL is not available");

gl.viewport(0, 0, 512, 512); // set size of viewport
Expand Down
Loading

0 comments on commit fda69fe

Please sign in to comment.