diff --git a/frontend/js/sketch.js b/frontend/js/sketch.js index 6f8e8bd..420b81f 100644 --- a/frontend/js/sketch.js +++ b/frontend/js/sketch.js @@ -5,7 +5,7 @@ const socket = io("http://localhost:3000"); const params = { fps: 60, - zoom: 0.01, + zoom: 0.1, backgroundTicks: 60, textSpread: 0, maxSpawns: 1, @@ -188,12 +188,8 @@ const sketch = (p) => { p.background(0); p.shader(shaderProgram); - // p.ortho(x, x + width, y + height, y); - // p.ortho(0, -p.windowWidth, -p.windowHeight, 0); - console.log( - `ortho: ${-p.width / 2}, ${p.width / 2}, ${-p.height / 2}, ${p.height / 2}`, - ); - p.ortho(0, p.width, -p.height, 0); + // p.ortho(0, p.width, -p.height, 0); + p.ortho(x, x + width, -y - height, -y); // Bind texture array gl.activeTexture(gl.TEXTURE0); @@ -213,12 +209,8 @@ const sketch = (p) => { // Tell shader which layer to sample shaderProgram.setUniform("uLayer", currentLayer); - // Draw a quad covering the screen - console.log( - `Drawing tile ${currentLayer} at ${col * tileW}, ${row * tileH}`, - ); - // p.rect(col * tileW, row * tileH, tileW, tileH); - p.rect(0, 0, tileW, tileH); + p.rect(col * tileW, row * tileH, tileW, tileH); + // p.rect(0, 0, tileW, tileH); } } }