Skip to content

Commit 8b5ee35

Browse files
authored
Merge pull request #197 from De-Panther/ios_small_fix
Ugly hack to fix WebXR Viewer viewports on iOS
2 parents e3ef6cb + 2dd3698 commit 8b5ee35

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Packages/webxr/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
### Fixed
9+
- Another ugly hack to fix WebXR Viewer viewports on iOS.
810

911
## [0.14.0] - 2021-12-26
1012
### Fixed

Packages/webxr/Runtime/Plugins/WebGL/webxr.jspre

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ setTimeout(function () {
10151015
leftRect.w = (viewport.width / glLayer.framebufferWidth) * (glLayer.framebufferWidth / this.canvas.width);
10161016
leftRect.h = (viewport.height / glLayer.framebufferHeight) * (glLayer.framebufferHeight / this.canvas.height);
10171017
}
1018-
} else if (view.eye === 'right' && viewport.width != 0 && viewport.height != 0) {
1018+
} else if (view.eye === 'right' && viewport.width != 0 && viewport.height != 0 && viewport.x != 0) { // Ugly hack for iOS Mozilla WebXR Viewer
10191019
eyeCount = 2;
10201020
if (viewport) {
10211021
rightRect.x = (viewport.x / glLayer.framebufferWidth) * (glLayer.framebufferWidth / this.canvas.width);

0 commit comments

Comments
 (0)