So I'm writing a script to print some tiles, so far it should only draw one tile in the top left corner. It works fine in JSfiddle which i've linked below but not in chrome.
If I got into my chrome console and type initalRoom.tileGrid[1].tileImage.drawClipped(0,0,32,32,0,0);
it give the desired results in which the tile appears in the top left corner but this command is already being called when the document is ready.
Anyone able to help? Thanks.