Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

catch up with pygfx refactor of of cameras, controllers, and Texture #163

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

Merged
merged 3 commits into from
Apr 14, 2023

Conversation

kushalkolar
Copy link
Member

This implements latest changes from pygfx for the cameras, controllers, and Texture refactor:

This simplified a lot of things in fastplotlib:

  1. PlotArea._refresh_cameras() is gone
  2. PlotArea center_graphic(), center_scene(), auto_scale(), simplified
  3. Use Texture directly instead of Texture.get_view() in ImageGraphic and HeatmapGraphic

The only thing that is a regression is that it's not possible to use the same controller on two cameras with different states, so the more complex Scatter and Line examples where the cameras are flipped on some subplots doesn't work anymore, using the controllers for these plots will make all the cameras have the same state as the first camera added to the controller. Minor feature regression but I don't think anyone was using cameras in this way anyways.

Other than the above regression all examples work, our big epic visualization with calcium & behavior data also works so this is good to go!

@kushalkolar
Copy link
Member Author

will need to update setup.py to require latest pygfx when they do a new release

@kushalkolar kushalkolar merged commit e4962ca into master Apr 14, 2023
@ivoflipse
Copy link

Can you wrap multiple Controllers and then pass the wrappers events to the separate Controllers?

@kushalkolar
Copy link
Member Author

Can you wrap multiple Controllers and then pass the wrappers events to the separate Controllers?

You mean one controller for multiple viewports (that's how it is currently), and then pass events separately to the cameras?

@ivoflipse
Copy link

You said:

The only thing that is a regression is that it's not possible to use the same controller on two cameras with different states,

I think we intend the same thing, but I'm suggesting a 1-1 relation between Controller and Camera. But having 1 Controller control 2 other Controller. I think you're suggesting to have 1 Controller control 2 or more Cameras

Either way, it was more philosophical, I'm sure you'll find a way to adapt 😉

@kushalkolar
Copy link
Member Author

kushalkolar commented Apr 14, 2023 via email

@ivoflipse
Copy link

Well I was suggesting that you wrap it with a Controller that controls Controllers 😉

But I think you're wise to wait until you actually have a need for it

@kushalkolar kushalkolar deleted the pygfx-apr2023-refactor branch May 23, 2023 04:47
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.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.