From 272e37a4084526688cb4408d9e2b959f57c0d2c7 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 31 Oct 2018 12:54:49 +0100 Subject: view: move tile size definition to MapLoader We also remove the unneeded redrawPending flag. --- src/view/MapLoader.ts | 2 +- src/view/MapView.ts | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/view/MapLoader.ts b/src/view/MapLoader.ts index 6953321..878fef4 100644 --- a/src/view/MapLoader.ts +++ b/src/view/MapLoader.ts @@ -45,7 +45,7 @@ function mkTileMap( gl: WebGLRenderingContext, tiles: Map, ): TileMap { - const tileSize = MapView.tileSize; + const tileSize = 32; const canvasDim = nextPowerOf2(Math.sqrt(tiles.size)); const canvasSize = canvasDim * tileSize; diff --git a/src/view/MapView.ts b/src/view/MapView.ts index f6736e2..1061196 100644 --- a/src/view/MapView.ts +++ b/src/view/MapView.ts @@ -3,10 +3,6 @@ import {TileMap} from './MapLoader'; import Renderer from './renderer/Renderer'; export default class MapView { - public static readonly tileSize: number = 32; - - private redrawPending: boolean = false; - private readonly vertexBuffer: WebGLBuffer; private readonly textureBuffer: WebGLBuffer; -- cgit v1.2.3