Skip to content
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

Viewport scaling #6

Open
zeruth opened this issue Apr 14, 2024 · 0 comments
Open

Viewport scaling #6

zeruth opened this issue Apr 14, 2024 · 0 comments

Comments

@zeruth
Copy link
Contributor

zeruth commented Apr 14, 2024

The following code at
https://github.com/2004scape/Client2/blob/95f0a33a4e6c1125d6d5591653e762d170913cc0/src/html/index.html#L8C31-L8C120
effectively hardcodes the scaling factor

One effect of this is the game canvas appearing too big (doesn't fit in screen) in portrait/landscape on Chrome Android.

I remedy this in my fork by removing the content block and dealing with the scaling natively with Android/Capacitor.
I imagine there is a more elegant way to deal with setting/updating the size of the viewport for a consistent experience and will help look into this myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant