Conversation
| // 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)?; |
There was a problem hiding this comment.
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.
tychedelia
left a comment
There was a problem hiding this comment.
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.
|
|
||
| #[derive(Clone, Copy, Debug, PartialEq, Eq)] | ||
| pub enum LightType { | ||
| Ambient, |
There was a problem hiding this comment.
Ambient lights are a bit weird in that they are added to the camera rather than spawned independently in the world. In that sense, they're more like a global graphics setting. I think we should punt on ambient light for now or add it as a setting for Graphics.
| // 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)?; |
There was a problem hiding this comment.
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.
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.
light()inside ofdraw