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

[CSG]: Camera starts at hardcoded position #228

Open
Cloud7050 opened this issue Sep 6, 2023 · 0 comments
Open

[CSG]: Camera starts at hardcoded position #228

Cloud7050 opened this issue Sep 6, 2023 · 0 comments
Labels
Bug [Category] minor [Priority]

Comments

@Cloud7050
Copy link
Contributor

CSG currently uses a hacky method of setting the initial camera position, adopted from the way JSCAD does it on their website. The camera starts at extremely far coordinates, then uses the "zoom to fit" feature (which is also run upon the initial render) to zoom to an extremely small scale.

https://github.com/Cloud7050/modules/blob/9624a2619e5055e6a33490204e319fbb0efd2f86/src/bundles/csg/stateful_renderer.ts#L38

In theory, if Operables are scaled to an extremely large size when rendered, the initial camera position can be inside a Shape and the camera direction calculations may bug out.

Ideally, a dynamic starting camera position will get calculated based on the actual bounds of everything being rendered.

See also Cloud7050#7

@Cloud7050 Cloud7050 added Bug [Category] minor [Priority] labels Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug [Category] minor [Priority]
Projects
None yet
Development

No branches or pull requests

1 participant