Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into TMStoURL
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGES.md
  • Loading branch information
mramato committed Jan 27, 2016
2 parents 80aee9b + 9ea3771 commit 33519c5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Change Log
* Added `BoundingSphere.fromEncodedCartesianVertices` to create bounding volumes from parallel arrays of the upper and lower bits of `EncodedCartesian3`s.
* Fixed creating bounding volumes for `GroundPrimitive`s whose containing rectangle has a width greater than pi.
* Fixed incorrect texture coordinates for polygons with large height.
* Fixed camera.flyTo not working when in 2D mode and only orientation changes
* Added `UrlTemplateImageryProvider.reinitialize` for changing imagery provider options without creating a new instance.
* `UrlTemplateImageryProvider` now accepts a promise to an `options` object in addition to taking the object directly.

Expand Down
10 changes: 6 additions & 4 deletions Source/Scene/CameraFlightPath.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,12 @@ define([
empty = empty && CesiumMath.equalsEpsilon(Math.max(frustum.right - frustum.left, frustum.top - frustum.bottom), destination.z, CesiumMath.EPSILON6);

empty = empty || (scene.mode !== SceneMode.SCENE2D &&
Cartesian3.equalsEpsilon(destination, camera.position, CesiumMath.EPSILON10) &&
CesiumMath.equalsEpsilon(CesiumMath.negativePiToPi(heading), CesiumMath.negativePiToPi(camera.heading), CesiumMath.EPSILON10) &&
CesiumMath.equalsEpsilon(CesiumMath.negativePiToPi(pitch), CesiumMath.negativePiToPi(camera.pitch), CesiumMath.EPSILON10) &&
CesiumMath.equalsEpsilon(CesiumMath.negativePiToPi(roll), CesiumMath.negativePiToPi(camera.roll), CesiumMath.EPSILON10));
Cartesian3.equalsEpsilon(destination, camera.position, CesiumMath.EPSILON10));

empty = empty &&
CesiumMath.equalsEpsilon(CesiumMath.negativePiToPi(heading), CesiumMath.negativePiToPi(camera.heading), CesiumMath.EPSILON10) &&
CesiumMath.equalsEpsilon(CesiumMath.negativePiToPi(pitch), CesiumMath.negativePiToPi(camera.pitch), CesiumMath.EPSILON10) &&
CesiumMath.equalsEpsilon(CesiumMath.negativePiToPi(roll), CesiumMath.negativePiToPi(camera.roll), CesiumMath.EPSILON10);

if (empty) {
return emptyFlight(complete, cancel);
Expand Down
1 change: 1 addition & 0 deletions Specs/Scene/CameraFlightPathSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ defineSuite([
camera.up = Cartesian3.clone(Cartesian3.UNIT_Y);
camera.right = Cartesian3.cross(camera.direction, camera.up, new Cartesian3());
camera.frustum = createOrthographicFrustum();
camera.update(scene.mode);
var frustum = camera.frustum;
var destination = Cartesian3.clone(camera.position);
destination.z = Math.max(frustum.right - frustum.left, frustum.top - frustum.bottom);
Expand Down

0 comments on commit 33519c5

Please sign in to comment.