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

Resize events? #8

Open
tjvr opened this issue Jul 27, 2017 · 1 comment
Open

Resize events? #8

tjvr opened this issue Jul 27, 2017 · 1 comment

Comments

@tjvr
Copy link
Member

tjvr commented Jul 27, 2017

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.

@pelshen
Copy link
Contributor

pelshen commented Aug 2, 2019

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.

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

No branches or pull requests

2 participants