-
Notifications
You must be signed in to change notification settings - Fork 316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
canvas size issues when using custom resolution with last repo #2515
Comments
Did you enable dynamic resolution ? This, for me breaks the display as you said. |
I'm not really sure if I understand the issue. The custom resolution does not change the canvas/window size for me (like it should). Custom resolution instead is the resolution of the render targets used for rendering (they are later upscaled to match the canvas size again). Maybe you can share a screenshot of how it looks like for you and what you mean with "going bananas" exactly? Does the canvas size in the browser arbitrarily change between runs? Which browser and version do you use? Dynamic resolution also looks ok for me (in a relatively simple test file however...) |
since the July repo the Post Processing > Resolution > Custom Resolution and Canvas size is not acting the same. see here with just the default cube scene: June 06 repo html5: https://onelsonic.github.io/june06cube/index.html The canvas size will differ on all browser lastest version Firefox 103.0.2, Chrome 104.0.5112.102 |
found what is causing this : Kha was not updated since 6 months. This is causing unexpected canvas sizes in Armory when exporting to html5 |
I pushed a pull request to Kha to fix this thing : |
PR got rejected : I've been told : While I have not detected any blur if the scale is correctly specified in the meta headers to 1.0 scale. With the last changes in Kha, Canvas sizes are now inconsistent across browsers as canvas.style sizes are forcibly specified. From a webdesign standpoint this change in Kha looks like a step backward, removing the flexibility to do what we want with the canvas and its style. This point is valid except if you are targeting one platform in particular and don't bother the other platforms. |
Hi there, I’m having a problem with html5 full screen behavior on mobile web browser in horizontal and vertical mode. I checked them using “Google Chrome Developer Tools F12” and also checked on my mobile phone Google pixel 5a after publishing it on my server. |
@onelsonic, |
Hi, and thanks for these really helpful screenshots, @ musasixx! I'm able to reproduce your issue (I'm not sure though if it's the same that @ onelsonic originally described, it sounds different?) and I can confirm that it's also caused by the commit @ onelsonic already identified for the original issue: armory3d/Kha@a0db16d. I will try to reproduce this issue in a small pure-Kha project in the next days, and if it has the same problems we can open an issue on the Kha repository so that Robert can fix it. He doesn't like to work on issues that don't include a pure-Kha example ;) |
@MoritzBrueckner, |
Hi, sorry for my late answer. I finally had time to create the Kha example, and it looks like Kha doesn't support any auto-sizing by default. I asked on the Kha Discord whether this is wanted, but Robert (the Kha dev) didn't answer, instead someone from the community answered with a workaround that I will try in a minute. Armory currently sets the canvas size to Also, thank you very much for your images in https://forums.armory3d.org/t/html5-full-screen-behavior-on-mobile-browser-horizontal-and-vertical/4977/15 (they are very helpful!), what browsers did you use when testing the three PCs? Edit: I found a new workaround that works for me, could you please unzip the following html5 build (pure Kha project, already compiled), open index.html in your browser and test whether it works for you as expected? If yes, I will implement it in Armory and give you another Armory-based test build. I haven't tested this with "true" full screen yet, it's possible that it will break then. Browsers only allow this after the user has interacted with the page, so we can't directly start in true full screen. |
@MoritzBrueckner 1_ 2_ test on chrome test on edge |
same issue See longer discussion with Robert here : with the changes in Kha (from 9 months ago),
at each frame Kha is resizing the canvas to its fixed pixel size. My workaround : https://github.com/armory3d/Kha/blob/3752b107a5ee7870c5ce274155d34b1f85226fe4/Backends/HTML5/kha/SystemImpl.hx#L580 |
Side note: Now you can by setting the environment variable. ARMORY_PLAY_HTML5='chromium $url --new-window --start-fullscreen' Firefox kiosk mode: ARMORY_PLAY_HTML5='firefox --kiosk $url' |
@onelsonic |
Here is a solution which works for me.
Personally i mostly use the 'fill' layout in combination with browser arguments to set the window size for development: Following the discussion i think it's hard to satisfy every users (devices) needs, so the thinking is that it should just work for development, for production one should use a custom html/layout for the targeted device. |
I keep forgetting to post these solutions:
|
@rpaladin Thanks for sharing, never heard of this flag. |
I have been having the same issue, I found out that just replacing the content of the
Then enabling The original |
Hi there,
using the latest repo and having manually downloaded again as specified.
I found an issue when exporting to 'html5' with the lastest repo.
The canvas size is going bananas when using : Post Processing > Resolution > Custom Resolution
I checked with only the default cube and previous repo works as expected.
When the new repo is cropping the canvas or gives arbitrary canvas size.
The text was updated successfully, but these errors were encountered: