From e85a779ff083f481aae74740295fb89a645b3b0f Mon Sep 17 00:00:00 2001 From: glathoud Date: Wed, 23 May 2018 14:31:29 +0200 Subject: [PATCH 1/3] fix for missing tiles in WebVR mode https://github.com/AnalyticalGraphicsInc/cesium/issues/6612 --- Source/Widgets/CesiumWidget/CesiumWidget.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Widgets/CesiumWidget/CesiumWidget.js b/Source/Widgets/CesiumWidget/CesiumWidget.js index 6a28e30dc94d..e39f38c03269 100644 --- a/Source/Widgets/CesiumWidget/CesiumWidget.js +++ b/Source/Widgets/CesiumWidget/CesiumWidget.js @@ -123,7 +123,7 @@ define([ if (width !== 0 && height !== 0) { var frustum = widget._scene.camera.frustum; if (defined(frustum.aspectRatio)) { - frustum.aspectRatio = width / height; + frustum.aspectRatio = widget._scene._useWebVR ? (width >> 1) / height : width / height; } else { frustum.top = frustum.right * (height / width); frustum.bottom = -frustum.top; From e47a7d5d57c78012f0607d12a95671ac5efa9ffb Mon Sep 17 00:00:00 2001 From: glathoud Date: Thu, 24 May 2018 07:58:14 +0200 Subject: [PATCH 2/3] fixed use case when starting directly in VR https://github.com/AnalyticalGraphicsInc/cesium/issues/6612 --- Source/Widgets/CesiumWidget/CesiumWidget.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/Widgets/CesiumWidget/CesiumWidget.js b/Source/Widgets/CesiumWidget/CesiumWidget.js index e39f38c03269..e0ed4e632b08 100644 --- a/Source/Widgets/CesiumWidget/CesiumWidget.js +++ b/Source/Widgets/CesiumWidget/CesiumWidget.js @@ -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 = widget._scene._useWebVR ? (width >> 1) / height : width / height; + frustum.aspectRatio = useWebVR ? (width >> 1) / height : width / height; } else { frustum.top = frustum.right * (height / width); frustum.bottom = -frustum.top; @@ -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; From 103b244f6cfb024adb484bfe274e3398a0295043 Mon Sep 17 00:00:00 2001 From: glathoud Date: Wed, 6 Jun 2018 07:54:55 +0200 Subject: [PATCH 3/3] updated for glathoud --- CONTRIBUTORS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index f847a49ec88f..45097fd7ed7d 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -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)