virtual-world-framework/vwf — pull request #398 by davideaster (2014-12-04 06:05:14+00:00)
Title: Fix replication with animations initialized with `animationTime !== 0`.

If a component implementing `animation.vwf` sets `animationTime` during initialization, the animation is set to be paused at that time, and `animationPause$` would receive a reference value based on the current simulation time. Since `animationPause$` is assigned during initialization, this isn't marked as a change.

If `animationTime` is set again after initialization, `animationStart$` and `animationStop$` receive values in relation to `animationPause$`, and they will be marked as changed. `animationPause$` hasn't changed and won't be flagged.

But since late joiners initialize with a different simulation time, they will get a different `animationPause$` value that doesn't work with the replicated `animationStart$` and `animationStop$` values.

The solution is to always take time == 0 when pausing for the first time. The absolute time doesn't matter as long as it is correctly related to the start and stop times.

We should consider holding `kernel.time()` at `0` or making it `undefined` for a component that is initializing.

A test case is to:
- Load `humvee-lesson`
- Click _Start_
- Load a second client in the same instance
- Complete the lesson up to step 3.1
- Click the gear shift to complete step 3.1
- Verify that the shift level moved to the correct position in the second client and that the second client advanced to step 3.2

@eric79 @scottnc27603 @allisoncorey, any comments?