Jump to content

Game size 100% of browser

Binary Moon

Recommended Posts

I have a canvas that is 800 x 600 and I want it to stretch to the full width of the page (with the height stretching proportionally).


At the moment I am doing this using css (a simple width:100% on the canvas) and it mostly works just fine - however the mouse position properties don't seem to scale with the canvas and so events like onInputOver and onInputDown are offset from their scaled canvas position. So I was wondering if anyone knows how to work around this - or even if it's possible to work around this?

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...