virtual-world-framework/vwf — pull request #115 by stevencarr (2014-01-29 20:28:43+00:00)
Title: Branch/fix humvee bugs

This fixes two issues with the humvee (redmine #3140 and #2870).

@bcbarsness @eric79 Can you review this? Some explanation is below, since some of the changes aren't really intuitive.

The first issue is that the latest nodejs changes caused the humvee and humvee lesson to just load a black screen. Both of those use the includes: keyword in the yaml, which causes a jQuery ajax request to load the file. jQuery appends a query parameter to the URL for handling the callback, and because there were query parameters, it was loading it like a new application instance. I fixed it by checking if the referer URL (the site that requested the resource, so humvee/whatever) existed and had an instance ID.

The second issue is that if the camera was set to the interior and a second client joined, the second client would still get the exterior camera. It was a race condition issue, where settingProperty was getting called in the model before the navigation code in the view was setup, so the model wouldn't update and the view would use the default camera. I moved the model code over to the view, since there was a TODO about that anyway, and changed it so that controlNavObject wouldn't overwrite cameraInUse if it was already populated.

Let me know if you have any questions.