add light-grid option pt2

This commit is contained in:
HF 2020-01-07 00:03:39 +01:00
parent 4658c375ad
commit e9a786c1a2
2 changed files with 3 additions and 3 deletions

View File

@ -26,8 +26,8 @@ import { loadingTiles } from './loadImage';
import pixelNotify from './PixelNotify';
// dimensions of offscreen canvas NOT whole canvas
const CANVAS_WIDTH = screen.width * 2;
const CANVAS_HEIGHT = screen.height * 2;
const CANVAS_WIDTH = window.screen.width * 2;
const CANVAS_HEIGHT = window.screen.height * 2;
const SCALE_THREASHOLD = Math.min(
CANVAS_WIDTH / TILE_SIZE / 3,
CANVAS_HEIGHT / TILE_SIZE / 3,

View File

@ -85,7 +85,7 @@ export function renderGrid(
if (!viewportCtx) return;
viewportCtx.globalAlpha = 0.5;
viewportCtx.fillStyle = (isLightGrid) ? '#222222' : '#DDDDDD';
viewportCtx.fillStyle = (isLightGrid) ? '#DDDDDD' : '#222222';
let [xoff, yoff] = screenToWorld(state, $viewport, [0, 0]);
let [x, y] = worldToScreen(state, $viewport, [xoff, yoff]);