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

Automatically resize the Three.js view to fit window if the size was not forced #420

Closed
wants to merge 2 commits into from
Closed

Automatically resize the Three.js view to fit window if the size was not forced #420

wants to merge 2 commits into from

Conversation

nabijaczleweli
Copy link
Contributor

Resizing the browser window had no effect, leading to requiring a reload. With this patch the view size follows the browser's, if not overridden in params.

I arrived at this code by blind-hacking at the export, so am not sure if all is up to standard (the render() call in particular).

@whitequark
Copy link
Contributor

This looks good but incomplete, because while resizing recenters the model, it doesn't adjust its scale. Do you think you could try to handle that as well?

@nabijaczleweli
Copy link
Contributor Author

Not sure what the state-of-the-art correct way of handling this is, but code from new commit behaves pretty much like I'd expect scaling on resize to behave?

@whitequark
Copy link
Contributor

Thank you, merged as e243396.

@whitequark whitequark closed this May 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants