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

Maybe make the default arcball camera more exposed? #270

Open
werner291 opened this issue Feb 10, 2021 · 1 comment
Open

Maybe make the default arcball camera more exposed? #270

werner291 opened this issue Feb 10, 2021 · 1 comment

Comments

@werner291
Copy link

Hello!

The Window class has a default arcball camera that is very useful, but sometimes starts out in a position that's a bit too close to the geometry.

Right now, it's a private member of the Window class, and not to my knowledge accessible from outside. Would it be possible to allow outside code to access it and move it around?

@alvinhochun
Copy link
Collaborator

There was a PR that asked for this (#209), and my reply to it was:

I believe the canonical way to do it is to construct your own camera or use one of kiss3d::camera::* and pass it to Window::render_with_camera instead of calling Window::render. Alternatively, you can create a type and have it implement kiss3d::window::State which allows you to return your own camera in State::cameras_and_effect_and_renderer, then use Window::render_loop to start the rendering.

This is still my viewpoint today as it not only does the same thing, but also easier to handle than borrowing from the Window.

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

No branches or pull requests

2 participants