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

Extracting ambient light from light.rs, and creating light directory #12369

Merged
merged 4 commits into from
Mar 13, 2024

Conversation

nbielans
Copy link
Contributor

@nbielans nbielans commented Mar 7, 2024

Objective

Beginning of refactoring of light.rs in bevy_pbr, as per issue #12349
Create and move light.rs to its own directory, and extract AmbientLight struct.

Solution

  • moved light.rs to light/mod.rs
  • extracted AmbientLight struct to light/ambient_light.rs

Copy link
Contributor

github-actions bot commented Mar 7, 2024

Welcome, new contributor!

Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨

@nbielans nbielans closed this Mar 7, 2024
@nbielans nbielans reopened this Mar 7, 2024
@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen C-Code-Quality A section of code that is hard to understand or change labels Mar 7, 2024
@alice-i-cecile
Copy link
Member

Looks good: nice and straightforward. Once merge conflicts are resolved and we have a second approval (from anyone) I'll merge this in for you :)

@JMS55
Copy link
Contributor

JMS55 commented Mar 8, 2024

One more file moved out of the root module yay.

@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Mar 8, 2024
@Shute052
Copy link

Shute052 commented Mar 8, 2024

also PointLight, SpotLight, and DirectionalLight?

@alice-i-cecile
Copy link
Member

also PointLight, SpotLight, and DirectionalLight?

Agreed this should be done, but no preference on one vs several PRs :)

@nbielans
Copy link
Contributor Author

nbielans commented Mar 8, 2024

yup, moving those other light variants is the plan, just wanted to make sure I felt good about the process and that this looked good before doing the rest of the file!

@superdump
Copy link
Contributor

@nbielans - it looks like there are some merge conflicts. Could you update the PR by merging in the changes from main? Reach out on Discord if you need any help.

@nbielans
Copy link
Contributor Author

@superdump just merged the changes!

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Mar 13, 2024
Merged via the queue into bevyengine:main with commit e282ee1 Mar 13, 2024
25 checks passed
github-merge-queue bot pushed a commit that referenced this pull request Mar 15, 2024
# Objective

- in #12369, patched file changed
location, so patch is failing

## Solution

- fix patch
github-merge-queue bot pushed a commit that referenced this pull request Mar 23, 2024
…ht/mod.rs (#12656)

# Objective

Follow up from PR #12369 to extract lighting structs from light/mod.rs
into their own file.
Part of the Purdue Refactoring Team's goals issue #12349 

## Solution

- Moved PointLight from light/mod.rs to light/point_light.rs
- Moved SpotLight from light/mod.rs to light/spot_light.rs
- Moved DirectionalLight from light/mod.rs to light/directional_light.rs
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 S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants