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

Improve Coordinate Indexing & Slicing #78

Merged
merged 23 commits into from
Jun 19, 2024
Merged

Improve Coordinate Indexing & Slicing #78

merged 23 commits into from
Jun 19, 2024

Conversation

annehaley
Copy link
Member

@annehaley annehaley commented May 2, 2024

This PR includes the following changes:

  • Internal structure for coordinate slicing now uses indices instead of true values for start and stop. This permits the user to use non-numeric coordinates (such as time) as a spatial coordinate.
  • Add a resolution argument to the DatasetBuilder (also available as a CLI arg). If not specified, resolution defaults to 128. This value is used for auto-slicing, where the step value is inferred from the start and stop values and the resolution. If the user specifies a value <=1, auto-slicing will be disabled. If auto-slicing is disabled, the user may edit start, stop, and step in the Axis Drawer (previous implementation).
  • If auto-slicing is enabled, the inputs for start, stop, step in the Axis Drawer are no longer available to the user, but a new UI component is available in the rendering area. The "Configure Bounds" menu, when open, displays a set of sliders to change the bounds (start and stop) of each coordinate axis (figure 1 below). There is also an option to enable an interactive preview mode (figure 2 below).
  • When enabled, the Interactive Preview mode displays a custom widget implemented directly with Vue (rather than using existing Trame widgets). This introduces some new code structures in the pan3d/ui/vue folder. This widget displays a preview image of one face of the rendered 3d structure and uses SVG elements to allow the user to resize a selection box which changes the bounds of the two coordinates along that face. The user may select which face to preview, and clicking the camera button next to this input will snap the camera to view that face. When this widget is shown, the two sliders which represent coordinates changed by the selection box will disappear. The time slider and the slider for the axis normal to the selected face will still be available.
  • TODO: Documentation needs updating, including tutorial screenshots (this can be done in a future PR when we update all docs with the new name)

image
image

@annehaley annehaley marked this pull request as ready for review May 3, 2024 18:14
@annehaley annehaley requested review from jourdain and johnkit May 3, 2024 18:14
@johnkit
Copy link
Collaborator

johnkit commented May 28, 2024

I went through alot of the visualization features and everything works fine for me. There were a couple things that did not work as expected, though they might not be due to this PR (I didn't go back and compare with pan3d:main branch).

  • The "Import" feature does not work for me. When I click the "Import" button, the viewer displays the "Import File Select" dialog. I can browse to my config file ok. When I click the dialog's "Import" button, the dialog remains displayed and the view does not update. (No messages on the terminal or js console.) Here's the config file I tested with: pan3d_state.json

  • This might be more of a feature request: When the user switches to cartography mode, I think we should change the center of rotation to the earth's center.

@annehaley
Copy link
Member Author

annehaley commented May 29, 2024

@johnkit I was able to test importing your state file, and I'm seeing expected behavior (video attached). This dataset does take a long time to load, though, so the loading bar does animate for a while. When you tried this, did the loading bar not appear?

pan3d-slow-import.mp4

Also, in cartography mode, the center of rotation is currently set to [0, 0, 0], which should be the center of the earth:

pan3d_cartographic_spin.mp4

pan3d/ui/vue/.eslintrc.cjs Outdated Show resolved Hide resolved
@annehaley annehaley mentioned this pull request Jun 18, 2024
@annehaley annehaley requested a review from jourdain June 18, 2024 17:23
.gitignore Show resolved Hide resolved
@annehaley annehaley merged commit c17d6b7 into main Jun 19, 2024
5 checks passed
@annehaley annehaley deleted the auto-slicing branch June 19, 2024 13:34
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

Successfully merging this pull request may close these issues.

3 participants