add light-grid option pt2
This commit is contained in:
parent
4658c375ad
commit
e9a786c1a2
|
@ -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,
|
||||
|
|
|
@ -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]);
|
||||
|
|
Loading…
Reference in New Issue
Block a user