Home › Forums › General Questions › Resizing Scene to Match Window Resize
- This topic has 5 replies, 3 voices, and was last updated 3 years, 5 months ago by xeon.
-
AuthorPosts
-
2021-07-04 at 4:31 am #42512ccoulCustomer
Hello,
I am trying to make it so that if you resize the window of verge3d, the scene automatically resizes to fit the window. Right now, if I resize the window, sometimes parts of the scene are cut from view. Is there a puzzle configuration that can achieve this?2021-07-04 at 5:07 am #42513ccoulCustomerCurrent puzzle setup that is not working:
Attachments:
You must be logged in to view attached files.2021-07-04 at 5:24 am #42515xeonCustomerok…I might be having difficulty understanding what it is you are really trying to accomplish that is different from the base window that automatically resizes keeping the center camera to center screen.
Now…if you rescale the current default window maintaining the aspect ratio as much as possible… .my default window scales with no issue scaling all the content inside and not cutting off anything from view.
If in that same window I change the the aspect ratio to something similar to what I would see on a mobile phone or vertical ratio, the scene is truncated to the left and right. Is this what you are trying to prevent?
Or did I miss the understanding of your issue?
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2021-07-04 at 7:06 am #42518ccoulCustomerYes, like you said the problem is that changing the aspect ratio truncates the scene. Is there a way to prevent this?
2021-07-04 at 12:26 pm #42520GLiFTeKCustomerHi,
Try putting app.camera instead of jyst camera.Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature!2021-07-04 at 2:44 pm #42522xeonCustomerIf you are using the default window that V3D creates, it will resize your scene to fit regardless of aspect ratio. Depending on the speed of your computer hardware, size of the scene, etc., it is possible you might be having redraw issues. If you are scaling the window by dragging a corner to resize the browser window, the redraw/refresh may be slow or not able to catch up and thus may appear to be truncated momentarily while the scene updates.
I have tried a few simple scenes with objects on the edge of the camera view with different camera aspect ratios and the default window does a great job at keeping the items center and in complete view without truncating. However, during the resizing, before a refresh, the window may show a truncation.
If you are willing, you may want to try a simple scene of 5 objects spaced out to the edges of the camera view…with one being in center.
Bring that scene into SneakPeak and then if you get similar issues that you are having now with truncation. If you don’t have any issues, then it could be your scene is just heavy and needs a refresh after the resize. If it doesn’t work then there is something else going on that may be specific to your hardware configuration.Within the V3D HTML template container you will find:
<meta name=”viewport” content=”width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0″>
This is typical of responsive design.
https://www.w3schools.com/css/css_rwd_viewport.aspYou could create a new template and manage your own viewport to fit your needs. Basically setting the viewport to a specific aspect ratio and then letting the margins of the page scale accordingly. This would give a Letter Boxed view vs the full screen view but it would guarantee the content is always at the exact ratio you want.
.,
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com -
AuthorPosts
- You must be logged in to reply to this topic.