x3dom / component-editor

A simple 3D component editor, based on X3DOM
Other
79 stars 31 forks source link

View connector2.1 #4

Closed dimitarsi closed 9 years ago

dimitarsi commented 9 years ago

This is another version of the jq viewConnector, but this time i think there is some issue with the up vector in Examine mode. I am not sure what should i do when the up vector is not [0,1,0]. Also I should get rid of the event param ( setOrientation), I can use the inverse ViewMatrix to get the position.

tpaviot commented 9 years ago

@dimitarsi Rather than adding a second static/js/jquery.viewConnector2.js file, can you please modify static/js/jquery.viewConnector.js so that it's easier to trace and review changes. That way, the modification of index.html would become unnecessary and you could squash your commits into one.

tpaviot commented 9 years ago

I ran a few tests. It runs quite well in Examine mode. However, there's an issue in Turntable mode, since the Back/Front/Side etc. cube behaviour overwrites the default behavior (the z vector [0, 0, 1] should be a limit). But it's pretty convincing.

dimitarsi commented 9 years ago

I kept the main code from the viewConnector but updated the orientation part and also the binding to the viewpoints. Also I change how the upVector is calculated - now it should be accurate :)

tpaviot commented 9 years ago

@tsturm FYI after your merge this pull request, I merged all the related commits into one and removed the trailing static/js/jquery.viewConnector2.js file.