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

DisplayMode FullScreen should match other browser APIs #1733

Closed
eonarheim opened this issue Dec 22, 2020 · 0 comments · Fixed by #1735
Closed

DisplayMode FullScreen should match other browser APIs #1733

eonarheim opened this issue Dec 22, 2020 · 0 comments · Fixed by #1735
Labels
api change Breaking api change feature Label applied to new feature requests

Comments

@eonarheim
Copy link
Member

Context

Currently the DisplayMode.FullScreen does not match the browser fullscreen api where the aspect ratio is preserved while scaling to the available space.

Proposal

Change DisplayMode.FullScreen to match the browser api behavior, move existing functionality to a new DisplayMode.Dynamic

@eonarheim eonarheim added api change Breaking api change feature Label applied to new feature requests labels Dec 22, 2020
eonarheim added a commit that referenced this issue Jan 1, 2021
![fullscreen](https://user-images.githubusercontent.com/612071/102927569-d7045f00-445c-11eb-92d9-4126a301e937.gif)

Closes #1733
Closes #1734

## Changes:

- Breaking change: `DisplayMode.FullScreen` will now scale the game to fit the available space, preserving the `aspectRatio`. This matches the browser "FullScreen" api behavior
- New: `DisplayMode.Dynamic` now does what `DisplayMode.FullScreen` used to do, the resolution and viewport dynamically adjust to fit the available space, DOES NOT preserve `aspectRatio`
- Fix: In the the browser "FullScreen" api, coordinates are now correctly mapped from page space to world space
- Added: Screen helpers for mapping between world, screen, and page space coordinates
- Deprecate: `DisplayMode.Position` CSS can accomplish this task better than Excalibur
- Tests!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api change Breaking api change feature Label applied to new feature requests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant