We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Is there a way to code an auto scale up and or down feature for different screen sizes on a mobile device? I have tried
function windowResized() { resizeCanvas(windowWidth, windowHeight); }
doesn't seem to work.
I am building in Visual Studio 2015 with Cordova
Answers
https://forum.Processing.org/two/discussions/tagged?Tag=windowresized()
None of these discussions are really getting at what I'm looking for. Thanks though.
Not exactly a trivial question and one that has been asked before (recently)...
I'll see if I can throw a demo together.
Thanks. I look forward to it. Meanwhile I have been manipulating the device controls. I will post a solution if I find one.
Mess around with the integers till it feels right. This seems to do it combined with using displayWidth, displayHeight. Now I just need to figure out how to lock the canvas in landscape.
Create AndroidManifest.xml in res/native/android
@0c00L - here's an initial proof of concept...
Note this currently has a dependency on viewportSize. You'll have to manually paste in the source above the following demo code.
I have some ideas of how this could be wrapped up into a helper script that would make it more useful; for e.g.:
Updated demo with some additional bells and whistles :)
Thanks @blindfish. I'll study this for fluency but as I started becoming more comfortable with Cordova, I found that it has many ways to mitigate problems such as screen size with ease. Visual Studio 2015 + Cordova = Unlimited power.