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

The bevy_render::camera::camera module shares its name with its parent module #17196

Open
LikeLakers2 opened this issue Jan 6, 2025 · 2 comments
Labels
A-Rendering Drawing game state to the screen C-Code-Quality A section of code that is hard to understand or change D-Trivial Nice and easy! A great choice to get started with Bevy S-Needs-Design This issue requires design work to think about how it would best be accomplished

Comments

@LikeLakers2
Copy link
Contributor

LikeLakers2 commented Jan 6, 2025

While working on #17194, I came across bevy_render::camera::camera, which was linting clippy::module_inception.

While I did put in a placeholder reason explaining the difference, I believe either bevy_render::camera or bevy_render::camera::camera should be renamed, as the current naming is confusing.

My suggestion would be to rename bevy_render::camera to bevy_render::viewport, as it appears to contain viewport-related stuff as a whole; compared to bevy_render::camera::camera which only relates to the Camera component.

@LikeLakers2 LikeLakers2 changed the title The bevy_camera::camera::camera module shares its name with its parent module The bevy_render::camera::camera module shares its name with its parent module Jan 6, 2025
@BenjaminBrienen BenjaminBrienen added D-Trivial Nice and easy! A great choice to get started with Bevy A-Rendering Drawing game state to the screen C-Code-Quality A section of code that is hard to understand or change S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! labels Jan 6, 2025
@LikeLakers2
Copy link
Contributor Author

@BenjaminBrienen Actually, I wouldn't mark this as ready for implementation.

When I brought this up in #rendering-dev in the Discord, it appears there was some contention about my suggested name; so perhaps it may be wise to have some discussion first?

@BenjaminBrienen BenjaminBrienen added S-Needs-Design This issue requires design work to think about how it would best be accomplished and removed S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! labels Jan 6, 2025
@IceSentry
Copy link
Contributor

Personally, I'd prefer to not touch it and wait for the bevy_camera refactor that was planned to pull it out of bevy_render.

If we absolutely need to deal with this now, my suggestion would be to move the Camera struct to mod.rs and move the Viewport and Exposure stuff to separate files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Code-Quality A section of code that is hard to understand or change D-Trivial Nice and easy! A great choice to get started with Bevy S-Needs-Design This issue requires design work to think about how it would best be accomplished
Projects
None yet
Development

No branches or pull requests

3 participants