Jump to content

[SOLVED] Viewport confusion


ozRocker
 Share

Recommended Posts

Are we meant to be using

<meta name="viewport" content="width=device-width" />

so everything fits into the viewport on mobile devices?  'cos when I use this line the viewport will not render using retina display and I get a fuzzy render from the canvas.

 

Link to comment
Share on other sites

We use that for most of bjs sites:

<meta name="viewport" content="width=device-width, user-scalable=no">

Also keep in mind that by default babylonjs will limit the DPI scaling to 2. You can play with the hardware ratio with engine.setHardwareScalingRatio(0.5)

Link to comment
Share on other sites

4 hours ago, Deltakosh said:

We use that for most of bjs sites:

<meta name="viewport" content="width=device-width, user-scalable=no">

Also keep in mind that by default babylonjs will limit the DPI scaling to 2. You can play with the hardware ratio with engine.setHardwareScalingRatio(0.5)

Awesome!  That completely solved all my problems.  I didn't realise you could apply hardware scaling to desktop screens as well.  Now all my demos look twice as good :)

btw, its actually engine.setHardwareScalingLevel()

Link to comment
Share on other sites

  • ozRocker changed the title to [SOLVED] Viewport confusion

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.

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

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