Skip to content
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