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

fix for issue #6612: Missing tiles in VR mode (regression w.r.t. Cesium 1.44) #6663

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu
* [Jeremy Marzano](https://github.com/JeremyMarzano-ISPA/)
* [Orbit Logic](http://www.orbitlogic.com)
* [Roderick Green](https://github.com/roderickgreen/)
* [Outdooractive](https://www.outdooractive.com)
* [Guillaume Lathoud](https://github.com/glathoud/)

## [Individual CLA](Documentation/Contributors/CLAs/individual-cla-agi-v1.0.txt)
* [Victor Berchet](https://github.com/vicb)
Expand Down
6 changes: 4 additions & 2 deletions Source/Widgets/CesiumWidget/CesiumWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,11 @@ define([
var canvas = widget._canvas;
var width = canvas.width;
var height = canvas.height;
var useWebVR = widget._useWebVR = widget.scene._useWebVR;
if (width !== 0 && height !== 0) {
var frustum = widget._scene.camera.frustum;
if (defined(frustum.aspectRatio)) {
frustum.aspectRatio = width / height;
frustum.aspectRatio = useWebVR ? (width >> 1) / height : width / height;
} else {
frustum.top = frustum.right * (height / width);
frustum.bottom = -frustum.top;
Expand Down Expand Up @@ -672,7 +673,8 @@ define([
var canvas = this._canvas;
var width = canvas.clientWidth;
var height = canvas.clientHeight;
if (!this._forceResize && this._canvasWidth === width && this._canvasHeight === height) {
var useWebVR = this.scene._useWebVR;
if (!this._forceResize && this._canvasWidth === width && this._canvasHeight === height && this._useWebVR === useWebVR) {
return;
}
this._forceResize = false;
Expand Down