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

Introduce camera parameters for ui.scene #2897

Merged
merged 2 commits into from
Apr 23, 2024
Merged

Introduce camera parameters for ui.scene #2897

merged 2 commits into from
Apr 23, 2024

Conversation

falkoschindler
Copy link
Contributor

As an extension to PR #2890, this PR makes perspective and orthographic cameras configurable, such that field-of-view (for perspective cameras) as well as the volume size (for orthographic cameras) can be configured:

with ui.scene(camera=ui.scene.perspective_camera(fov=50)) as scene:
    scene.box()
with ui.scene(camera=ui.scene.orthographic_camera(size=5)) as scene:
    scene.box()

Screenshot 2024-04-15 at 14 32 26

@falkoschindler falkoschindler added the enhancement New feature or request label Apr 15, 2024
@falkoschindler falkoschindler added this to the 1.4.23 milestone Apr 15, 2024
@falkoschindler falkoschindler merged commit e13cd63 into main Apr 23, 2024
6 checks passed
@falkoschindler falkoschindler deleted the scene-cameras branch April 23, 2024 15:46
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

Successfully merging this pull request may close these issues.

1 participant