Skip to content

Commit

Permalink
Workaround issue #602
Browse files Browse the repository at this point in the history
The current implementation of SceneTransitioner is fundamentally broken. It only accounts for primitives that exist at the time the transition starts. Since the visualizers add primitives on demand, the Polyline for orbits drawn in Earth/Fixed does not get added until the first frame after the transition begins. Therefore, the visualization is incorrect until the transition completes.

The short term easy workaround is for the DynamicPathVisualizer to create both Earth/Fixed and ICRF Polylines at the time of construction, this way even though it will be empty when the transition starts, it will still have a TWEEN animation set up for it. This fixed is obviously specific to DynamicPathVisualizer, but that's the only place we have this problem right now.

The longer term solution is that we should only have a single TWEEN animation function, and that function should set the morphTime for all primitives in the collection, or primtiives should simply always get the current morphtime from the scene during their update loop. This way if a primitive is added during a morph, it can automatically join in at the correct moprh time and mode.

I'll also add that, technically, there is an additional problem with morphing dynamic paths, because we don't actually morph between the fixed and inertial frames, they snap at the very beginning of any transition in and out of 3D, they just aren't as noticeable. This should be fixable, but is a different (but related) issue.
  • Loading branch information
mramato committed Mar 28, 2013
1 parent da4177a commit 09c16cd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Source/DynamicScene/DynamicPathVisualizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,10 @@ define([
throw new DeveloperError('scene is required.');
}
this._scene = scene;
this._updaters = {};
this._updaters = {
FIXED : new PolylineUpdater(scene, ReferenceFrame.FIXED),
INERTIAL : new PolylineUpdater(scene, ReferenceFrame.INERTIAL)
};
this._dynamicObjectCollection = undefined;
this.setDynamicObjectCollection(dynamicObjectCollection);
};
Expand Down Expand Up @@ -323,6 +326,7 @@ define([

if (typeof currentUpdater === 'undefined') {
currentUpdater = new PolylineUpdater(this._scene, frameToVisualize);
currentUpdater.update(time);
this._updaters[frameToVisualize] = currentUpdater;
}

Expand Down

0 comments on commit 09c16cd

Please sign in to comment.