-
Notifications
You must be signed in to change notification settings - Fork 18
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
camera update and resetting with custom zoom/pan #19
Comments
Using the current camera system, resetting to a particular zoom/pan level might require initializing the camera with a single instantaneous zoom/pan interaction that represents the previous incremental zooming/panning. https://github.com/ismms-himc/clustergrammer-gl/blob/master/src/cameras/camera_interaction.js |
Also, slow down zooming a little by default (maybe allow this to be adjusted by users). |
Camera update notes (paraphrased from gitter channel @rreusser comments): Using d3-zoom the main code is here: https://observablehq.com/@rreusser/regl-tools#persistentZoom
note, the scales are d3 scales (see scale definitions under sample usage)
usage looks like this
Using the d3 scales with webgl is a different manner, the function below translates the scales into a 2d view matrix that can be used in webgl https://observablehq.com/@rreusser/regl-tools#createReglViewportConfiguration
|
Sometimes the camera and zoom object can get out of sync. They are reset when the user zooms all the way out (as a fail safe). We should ultimately prevent this mis-syncing from happening or add an additional fail safe that resets the camera when the user has finished interacting with the visualization.
The text was updated successfully, but these errors were encountered: