Emscripten scale-to-fit canvas to window view script.

About Monkey 2 Forums Monkey 2 Code Library Emscripten scale-to-fit canvas to window view script.

This topic contains 0 replies, has 1 voice, and was last updated by  Richard Betson 1 month, 4 weeks ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #15316

    Richard Betson
    Participant

    Hi,

    I came up with this to scale my apps canvas to fit the window view. Movement of the mouse, clicking on the canvas or changing focus will trigger the script and scale the canvas to fit. I use it in my web app entry page on my website.

    Just slip this into your projects Emscripten launch HTML page.

    .

    Here is my entire launch HTML file. You can just replace the “your whatever’s” with your own.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.