You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the World size defaults to the width/height of the window--when it loads. If the screen is rotated, or the window is resized, the world keeps its initial aspect ratio.
My expectation is that most of the time, you want to specify a desired width/height; then you have a fixed aspect ratio, and positioning things on the screen is much easier!
It's not clear whether dynamically-sized Worlds even make sense. We should probably either a) disable auto-sizing entirely, and require a width/height to be specified; or b) emit resize events from World when the window is resized, so the game can react to them.
The text was updated successfully, but these errors were encountered:
Considering this is for mobiles, where resize events aren't really a thing I'm leaning towards forcing a user-defined size. But then again, significantly, rotate is a thing on mobiles. And yet, these games are are going to be almost always intended to be played one way up.
So I come down on the forced to define size side of things.
Currently the World size defaults to the width/height of the window--when it loads. If the screen is rotated, or the window is resized, the world keeps its initial aspect ratio.
My expectation is that most of the time, you want to specify a desired width/height; then you have a fixed aspect ratio, and positioning things on the screen is much easier!
It's not clear whether dynamically-sized Worlds even make sense. We should probably either a) disable auto-sizing entirely, and require a width/height to be specified; or b) emit
resize
events from World when the window is resized, so the game can react to them.The text was updated successfully, but these errors were encountered: