Skip to content

Conversation

@catilac
Copy link
Contributor

@catilac catilac commented Feb 6, 2026

This is very WIP. Let me know if this is the right direction, and I'll wrap it up, and some of the other light types. No materials so I can't really tell if it's working, but I know you just have to spawn a light and it will just work in bevy.

  • I've commented out the work I did to make lights work like Geometry
  • Currently it will just spawn a light on setup, and we will not repeatedly call light() inside of draw

@catilac catilac requested a review from tychedelia February 6, 2026 17:38
Comment on lines 33 to 35
// We will only declare lights in `setup`
// rather than calling some sort of `light()` method inside of `draw`
let _point_light = light_create(LightType::Point, 0.0, 0.0, 0.0)?;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not totally sure, but I think we may want to consider including color as a required constructor arg since all three types share that.

Copy link
Member

@tychedelia tychedelia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I think one question I have is about all the different possible fields that lights can have and whether it makes sense to expose them all or try to wrap them up in some common settings (i.e. illuminance for directional light and intensity for spot light could maybe be collapsed or something?).

Alternatively, if we do want to expose these settings / distinguish between the light types, maybe it does make sense to expose them as different types rather than under a single generic light type? I'm not sure.

Comment on lines 33 to 35
// We will only declare lights in `setup`
// rather than calling some sort of `light()` method inside of `draw`
let _point_light = light_create(LightType::Point, 0.0, 0.0, 0.0)?;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not totally sure, but I think we may want to consider including color as a required constructor arg since all three types share that.

@catilac
Copy link
Contributor Author

catilac commented Feb 9, 2026

Looks good! I think one question I have is about all the different possible fields that lights can have and whether it makes sense to expose them all or try to wrap them up in some common settings (i.e. illuminance for directional light and intensity for spot light could maybe be collapsed or something?).

Alternatively, if we do want to expose these settings / distinguish between the light types, maybe it does make sense to expose them as different types rather than under a single generic light type? I'm not sure.

Thanks so much for the feedback! I wasn't sure either but was originally leaning that they would each need their own type, and methods. I do like the idea of a common settings object, I hadn't thought about that!

EDIT: Also, this is really getting me primed for the Camera work ahead

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

Successfully merging this pull request may close these issues.

2 participants