Jump to content

What is making aspect ratio of canvas fixed?


Recommended Posts

When I am fullscreen the canvas is not 100% height even though my CSS makes it that.

When I resize the window the canvas height:width is always 2:1.

Did I set code that makes this happen somewhere that I forgot? I searched everywhere but can't figure this one out.

It seems like my code is the same as the babylon website Demo code, so I dont understand :huh:

See attached images:



Link to comment
Share on other sites

Hmm, I have that. When calling fullscreen I press F11 in my browser.

But as you can see from screenshot #2 above, the canvas also resizes when I open the inspector, and it doesn't fill the screen, it stays at exactly 2.0 aspect ratio. (You can also see I have width:100% and height:100% in my #renderCanvas CSS. I copied the Babylon Demo CSS.


No matter what size I make the window, the canvas is 2:1 aspect ratio (height = 2*width).


Is there maybe code that I wrote that controls this?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

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