Jump to content

BabylonJs: Problem after resizing canvas


DarkLight
 Share

Recommended Posts

Hello all,

I'm working on a personal project and im facing a small problem with canvas resizing,

Here the initial state:

image.thumb.png.ba8fab1b634465db51a5bf66a188b10f.png

 

You can see that the scene is well centered, the problem happens when i close a panel (the right or the left panels) then the canvas will be scaled and the scene will be like here:

image.thumb.png.f13e55177af0273f144b120352b42ef9.png

 

Please note that im creating the canvas like the following:

<canvas id="renderCanvas" style="width:100%;height:100%;" touch-action="none"></canvas>

Any help will be appreciated :)

Thxs in advance guys :)

Regards

DarkLight

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.

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