x3dom / component-editor

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

Navigation Cube sync suggestion #3

Closed dimitarsi closed 9 years ago

dimitarsi commented 9 years ago

I wrote a simple jq plugin to help with synchronisation. It has a few issues when panning or changing to orthoview.

What it does it's listening to viewpointChanged event ( i tried to add handler to enterFrame, but there are no orientation and position params ) of viewpoint or orthoviewpoint, getting the orientation and the position from the event and setting the orientation and the position to the bound viewpoint. Before setting the position - multiplying the unit vector of the position to the current distance to the center of rotation.

Probably not the best naming of the variables - the setOrientation target param refers to the event.target. This could be misleading.

tpaviot commented 9 years ago

This pull request is superseed by PR #4. Close this one.