-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
a-canvas not always fullscreen in iOS Chrome #3282
Comments
I haven't dug into A-Frame's source code but it may be caused by fact that "orientationchange" event doesn't come with correct values at first (maybe just on iOS Chrome) - they update slightly after the event is emitted - hence it's resizing to wrong size. In my demos i have my own ui which resizes on "orientationchange" event - to prevent this from happening i would use something like this: function orientationChanged() {
const timeout = 120;
return new window.Promise(function(resolve) {
const go = (i, height0) => {
window.innerHeight != height0 || i >= timeout ?
resolve() :
window.requestAnimationFrame(() => go(i + 1, height0));
};
go(0, window.innerHeight);
});
} And use it like this: orientationChanged.then(function() {
resize();
}); |
It seems that the cause is known webkit bug: https://bugs.webkit.org/show_bug.cgi?id=170595 |
…atches the viewport on orientation changes (fix aframevr#3282)
…atches the viewport on orientation changes (fix aframevr#3282)
…atches the viewport on orientation changes (fix aframevr#3282)
…atches the viewport on orientation changes (fix aframevr#3282)
…atches the viewport on orientation changes (fix aframevr#3282)
…atches the viewport on orientation changes (fix aframevr#3282)
…atches the viewport on orientation changes (fix aframevr#3282)
…atches the viewport on orientation changes (fix aframevr#3282)
…atches the viewport on orientation changes (fix aframevr#3282)
…atches the viewport on orientation changes (fix aframevr#3282)
…atches the viewport on orientation changes (fix aframevr#3282)
Description:
Scene doesn't take up whole screen. Even if it does initially, it breaks after changing device's orientation. In Safari it works alright - i expierienced it only on Chrome iOS. Chrome version: 62.0.3202.70
The text was updated successfully, but these errors were encountered: