🚀 use ts node

This commit is contained in:
platane
2020-10-16 18:54:09 +02:00
parent 5243a665b1
commit 89e2630eec
8 changed files with 32 additions and 17 deletions

View File

@@ -85,3 +85,10 @@ export const drawLerpWorld = (
ctx.restore();
};
export const getCanvasWorldSize = (grid: Grid, o: { sizeCell: number }) => {
const width = o.sizeCell * (grid.width + 2);
const height = o.sizeCell * (grid.height + 4) + 30;
return { width, height };
};