In master, as opposed to 1.41, the Cesium Viewer app is no longer showing my CZML file which is dropped on it. Previously, the current clock time would be set to the start of the interval set in the document packet. Is this a known, expected change in behavior? I’ve attached a simple file that demonstrates the problem.
Thanks,
Scott
Dukono.czml (608 Bytes)
This appears to be an inadvertent regression from https://github.com/AnalyticalGraphicsInc/cesium/pull/6154 which turned off animation by default.
Your CZML sets the start and end of the timeline but does not set the current time. Previously when the clock advanced by default it would detect the current time was out of bounds and then constrain to the start/stop.
The loading code should be fixed, but it’s good practice to always include start/stop/current in CZML for consistency.
I left current undefined so that apps don’t automatically set the animation time upon loading the data as is done by the Viewer app. I didn’t realize that is app-specific behavior.
Scott (Hunter), can you clarify what needs to be fixed after the regression from https://github.com/AnalyticalGraphicsInc/cesium/pull/6154? Should we just default currentTime to the start time in CzmlDataSource.js?
Thanks,
Gabby
Well, after thinking about it more, Scott (Reynolds) is right that the behavior of omitting currentTime is valid - this would be used to load a new data source into the scene without affecting the clock, for example.
However, there is an expectation that start <= current <= end when the clock is in CLAMPED or LOOP_STOP mode.
Looking into the current code, the Clock currently only enforces this during tick(), which is why the behavior changed after tick is no longer called.
I guess the adjustment should also be applied whenever start or end is set, which would mean making them getter/setter properties.
Got it, thanks for pointing this out!