Skip to content

Commit

Permalink
Slightly better transition
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaStorm committed Jun 9, 2016
1 parent e1a906d commit 0b73417
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions Source/Scene/SceneTransitioner.js
Original file line number Diff line number Diff line change
Expand Up @@ -660,23 +660,14 @@ define([
var endDir = Cartesian3.clone(cameraCV.direction, scratch3DToCVEndDir);
var endUp = Cartesian3.clone(cameraCV.up, scratch3DToCVEndUp);

var startRight = camera.frustum.right;
var endRight = endPos.z * 0.5;
morphOrthographicToPerspective(transitioner, 0.0, cameraCV, complete);

function update(value) {
columbusViewMorph(startPos, endPos, value.time, camera.position);
columbusViewMorph(startDir, endDir, value.time, camera.direction);
columbusViewMorph(startUp, endUp, value.time, camera.up);
Cartesian3.cross(camera.direction, camera.up, camera.right);
Cartesian3.normalize(camera.right, camera.right);

var frustum = camera.frustum;
frustum.right = CesiumMath.lerp(startRight, endRight, value.time);
frustum.left = -frustum.right;
frustum.top = frustum.right * (scene.drawingBufferHeight / scene.drawingBufferWidth);
frustum.bottom = -frustum.top;

camera.position.z = 2.0 * scene.mapProjection.ellipsoid.maximumRadius;
}
var tween = scene.tweens.add({
duration : duration,
Expand Down

0 comments on commit 0b73417

Please sign in to comment.