FIXED AND WORKING... BACKUP IF IT GOES WRONG
This commit is contained in:
11
src/app/home/drawMap.ts
Normal file
11
src/app/home/drawMap.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { MapTile } from '../../../../Kawaii-Jumper-server/src/mapTile';
|
||||
|
||||
export const drawMap = (
|
||||
mapTiles: MapTile[],
|
||||
context: CanvasRenderingContext2D,
|
||||
images: HTMLImageElement[],
|
||||
) => {
|
||||
for (let tile of mapTiles) {
|
||||
context.drawImage(images[tile.color], tile.x, tile.y, tile.w, tile.h);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user