2004Scape / Client2

Source port of the original Java code
https://2004scape.github.io/Client2/
19 stars 10 forks source link

Viewport scaling #6

Open zeruth opened 7 months ago

zeruth commented 7 months ago

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.