It's a difficult question!
For a canvas, you are not actually using a style to determine its width and height.
So, setting the style of the canvas, you actually distort the canvas.
Thus, writing <canvas id="game" width=512 height=512> </canvas> on your main page will fix your problem.
I tested it to confirm that this is really a problem, so if something is wrong let me know and I will send you my code.
There should also not be MainContext.drawImage(m.canvas, 0, 0); ? Otherwise you grunt the Minotaur?
Simon sarris
source share