AnalyticalGraphicsInc/cesium — pull request #604 by mramato (2013-03-28 17:57:04+00:00)
Title: Workaround issue #602

This works around #602 for the DynmicPathVisaulizer.

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.