Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix navigation in webex. #19

Open
draustin opened this issue Apr 27, 2020 · 0 comments
Open

Fix navigation in webex. #19

draustin opened this issue Apr 27, 2020 · 0 comments

Comments

@draustin
Copy link
Owner

My intention, and what works well in the Qt viewer, is for mouse navigation to be referred to the point in the scene that the user clicks on. For example, rotation should be about the clicked point i.e. it does not move on the screen. In the Qt viewer I use readPixels to get the depth buffer at the clicked point and use that to compute the position in eye coordinates. But there is no way of reading out float values in WebGL so I hackily encode the depth in an RGBA value. At least on my system (Chrome, MacBook Pro) this is very innacurate.

One workaround is to make rotations about some fixed point in the model. However when zoomed in on a small feature this causes too rapid a movement. Could instead move & rotate the camera - but still no obvious way of knowing the appropriate movement speed.

An alternative would be to do raycasting in the Javascript. Need to rewrite the sphere trace code in Javascript and export the geometry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant