virtual-world-framework / vwf

Virtual World Framework
https://virtual.wf
Other
142 stars 53 forks source link

Modern ids #448

Closed davideaster closed 9 years ago

davideaster commented 9 years ago

This branch removes the remaining uses of legacy-format node IDs. These include:

Root node IDs change as, for example:

index-vwf and appscene-vwf change to index.vwf and appscene.vwf, respectively. With branch/absolute-application-url, these further change to /path/to/application/index.vwf and /path/to/application/appscene.vwf.

The camera ID changes from http-vwf-example-com-camera-vwf-camera for type camera.vwf to something similar to /path/to/application/index.vwf:n-xx-camera, for some sequence number n and some randomization xx. (Still to do.)

Existing references to the legacy-format IDs should now be fixed. Attempts to parse the ID string have also been fixed. Additionally, a few remaining assumptions that the application component is index.vwf have also been fixed.

The camera references are a little more complicated and are still to be done.

Related changes for the applications are in https://github.com/virtual-world-framework/vwf-apps/tree/branch/modern-ids.

@allisoncorey @scottnc27603 @eric79

davideaster commented 9 years ago

@scottnc27603, can you see what we can do about the cameras? I found five cases:

We may now be able to refer directly to the camera node instead of recoding IDs. Searching for and matching the camera using kernel.find( parentID, "./element(camera,'http://vwf.example.com/camera.vwf')" ) may also be helpful.

You can use kernel.find( parentID, "./element(*,'http://vwf.example.com/camera.vwf')" ) to find the camera regardless of name. kernel.test( parentID, "./element(*,'http://vwf.example.com/camera.vwf')", possibleCameraID ) will give you a true/false answer.

scottnc27603 commented 9 years ago

Ok, I'll look into it.

Sent from my iPhone Scott Haynes 919 480 7800 cell

On Feb 7, 2015, at 6:30 PM, davideaster notifications@github.com wrote:

@scottnc27603, can you see what we can do about the cameras? I found five cases:

support/client/lib/vwf/model/cesium.js support/client/lib/vwf/model/glge.js support/client/lib/vwf/model/threejs.js support/client/lib/vwf/view/editor.js support/proxy/vwf.example.com/scene.vwf.yaml We may now be able to refer directly to the camera node instead of recoding IDs. Searching for and matching the camera using kernel.find( parentID, "./element(camera,'http://vwf.example.com/camera.vwf')" ) may also be helpful.

You can use kernel.find( parentID, "./element(,'http://vwf.example.com/camera.vwf')" ) to find the camera regardless of name. kernel.test( parentID, "./element(,'http://vwf.example.com/camera.vwf')", possibleCameraID ) will give you a true/false answer.

— Reply to this email directly or view it on GitHub.

allisoncorey commented 9 years ago

:+1: Looks good so far!

scottnc27603 commented 9 years ago

@davideaster @allisoncorey I've removed all hardcoded camera IDs. Plus, I cleaned up the storing of cameras in the drivers. I didn't change the storing those components as nodes in the drivers however.

davideaster commented 9 years ago

Hooray!