Solar2D 3711 - HTML5 issue regarding to canvas

First of all, I want to thank everyone who contributes to the growth and development of Solar2D. Like many others, I depend on Solar2D for my professional work. The latest release of Solar2D has fixed some issues related to HTML5, which is a big step forward, as it is the platform with the least support in Solar2D.
Today I tested version 3711 for an HTML5 project, and the clarity is impressive: no blurry text or images. However, I did find one problem:

In my case, I used zoomEven for scaling and set the maximized value for the defaultMode parameter under windows in the build.settings file.
The issue I noticed is that the canvas is reduced, seemingly to half the visible space.
To make it clearer, I’ve posted two screenshots: the first one is from Solar2D version 3709, and the second one is from the latest version (3711). In the canvas of the first example (3709), the content fills the entire available browser window, while in the second, it is reduced as mentioned before.

Could you please take a look at this behavior when you have a moment, @Scott_Harrison ?

Screenshot with Solar2D 3709

Screenshot with Solar2D 3711 (latest version)

From my phone:

1 Like

Hmm, I forgot about this, I just used letterBox scaling mode.

I’ll take a look with it.

2 Likes

Thank you @Kan98
As I mentioned earlier, HTML5 is the platform with the least support in Solar2D.

It would be highly beneficial for the documentation to include detailed information about the scaling modes available in HTML5 and how they are interpreted on that platform. Although Solar2D has a small community, I believe it has the potential to grow much more. One aspect I’ve consistently noticed is the lack of updates in the documentation. Several features added in some Solar2D updates have never been officially documented, and only those of us who actively follow the various Solar2D channels and review each changelog are aware of them.

Yeah, that’s right, I haven’t figured out how to build the solar2d docs yet, I’ll ask some people later.
Solar2D is having a big update (merged on github repo) I think there will be a docs update later.

1 Like

Hey @Kan98, is there any way I can fix this in the build files for now?

I don’t have time right now, the changes will try to be done over the weekend, I will send you the webtemplate file first if it is completed.

Thank you @Kan98

I can now confirm that Solar2D is reducing the canvas to half of the available space in the browser window. I’ve uploaded a screenshot from my phone—take a look.

You can try set defaultMode = “fullscreen” in build.settings
I tried it and it works fine for my project.

I just tried that option, and for some strange reason, my game doesn’t display on my PC browser. After the initial loading bar is shown, the entire screen goes black, and nothing appears. However, it does display on my phone browser, but this time it only stretches to fill the entire width of the screen, but not the height. I have attached a screenshot below.

Definitely, the best option for HTML5 is to use “maximized,” but now it’s not working properly.

From my phone:

Definitely, the best option for HTML5 is to use “maximized,” but now it’s not working properly.