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

Low priority feature request: add flag to remove XYZ axes from bottom left corner of save_screenshot #124

Open
MatthiasJ1 opened this issue Nov 25, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@MatthiasJ1
Copy link

Personally I feel like saving just the shown objects should be the default behavior. I was surprised to see the additional elements.

@bernhard-42
Copy link
Owner

Normally, one would have one canvas for the viewer and one canvas for the xyz axes.
However in webGL this means 2 WegGL contexts of a typical maximum of 16 in the browser. Since the viewer component also runs in jupyterlab, where each cell could have a different viewer, I combined cad view and xyz view into one canvas (threejs can define rectangles, i.e view ports, to show the right stuff).

Getting a screenshot in threejs means triggering update to draw the latest into the buffers and then store the canvas buffer as image. Since the xyz axes are part of the same canvas, they will be stored, too.

I think I can make the xyz axes and labels transparent before taking screenshot and then show them again afterwards. Need to check.

@bernhard-42 bernhard-42 added the enhancement New feature or request label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants