diff --git a/CHANGES.md b/CHANGES.md index c1ed900509ed..91de0bdbf8c0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,6 +8,8 @@ Change Log * Deprecated * * Improved KML NetworkLink compatibility by supporting the `Url` tag. [#3895](https://github.com/AnalyticalGraphicsInc/cesium/pull/3895). +* Fixed exaggerated terrain tiles disappearing. [#3676](https://github.com/AnalyticalGraphicsInc/cesium/issues/3676) +* Fixed infinite horizontal 2D scrolling in IE/Edge. [#3893](https://github.com/AnalyticalGraphicsInc/cesium/issues/3893) ### 1.21 - 2016-05-02 @@ -22,7 +24,6 @@ Change Log * Fixed issue causing the fog to go dark and the atmosphere to flicker when the camera clips the globe. [#3178](https://github.com/AnalyticalGraphicsInc/cesium/issues/3178) * Fixed a bug that caused an exception and rendering to stop when using `ArcGisMapServerImageryProvider` to connect to a MapServer specifying the Web Mercator projection and a fullExtent bigger than the valid extent of the projection. [#3854](https://github.com/AnalyticalGraphicsInc/cesium/pull/3854) * Fixed issue causing an exception when switching scene modes with an active KML network link. [#3865](https://github.com/AnalyticalGraphicsInc/cesium/issues/3865) -* Fixed exaggerated terrain tiles disappearing. [#3676](https://github.com/AnalyticalGraphicsInc/cesium/issues/3676) ### 1.20 - 2016-04-01 diff --git a/Source/Scene/Scene.js b/Source/Scene/Scene.js index 750f812da421..8796ce7de157 100644 --- a/Source/Scene/Scene.js +++ b/Source/Scene/Scene.js @@ -1763,37 +1763,40 @@ define([ } else if (windowCoordinates.x > context.drawingBufferWidth * 0.5) { viewport.width = windowCoordinates.x; + var right = camera.frustum.right; camera.frustum.right = maxCoord.x - x; executeCommandsInViewport(true, scene, passState, backgroundColor, picking); viewport.x += windowCoordinates.x; + viewport.width = context.drawingBufferWidth - windowCoordinates.x; camera.position.x = -camera.position.x; - var right = camera.frustum.right; - camera.frustum.right = -camera.frustum.left; - camera.frustum.left = -right; + camera.frustum.left = -camera.frustum.right; + camera.frustum.right = camera.frustum.left + (right - camera.frustum.right); frameState.cullingVolume = camera.frustum.computeCullingVolume(camera.positionWC, camera.directionWC, camera.upWC); context.uniformState.update(frameState); executeCommandsInViewport(false, scene, passState, backgroundColor, picking); } else { - viewport.x += windowCoordinates.x; - viewport.width -= windowCoordinates.x; + viewport.x = windowCoordinates.x; + viewport.width = context.drawingBufferWidth - windowCoordinates.x; + var left = camera.frustum.left; camera.frustum.left = -maxCoord.x - x; executeCommandsInViewport(true, scene, passState, backgroundColor, picking); - viewport.x = viewport.x - viewport.width; + viewport.x = 0; + viewport.width = windowCoordinates.x; camera.position.x = -camera.position.x; - var left = camera.frustum.left; - camera.frustum.left = -camera.frustum.right; - camera.frustum.right = -left; + camera.frustum.right = -camera.frustum.left; + camera.frustum.left = camera.frustum.right + (left - camera.frustum.left); + frameState.cullingVolume = camera.frustum.computeCullingVolume(camera.positionWC, camera.directionWC, camera.upWC); context.uniformState.update(frameState);