@@ -10,14 +10,14 @@ impl Plugin for LightPlugin {
1010}
1111
1212pub fn create_directional (
13- In ( ( px, py, pz, r , g , b , a , illuminance) ) : In < ( f32 , f32 , f32 , f32 , f32 , f32 , f32 , f32 ) > ,
13+ In ( ( px, py, pz, color , illuminance) ) : In < ( f32 , f32 , f32 , Color , f32 ) > ,
1414 mut commands : Commands ,
1515) -> Entity {
1616 commands
1717 . spawn ( (
1818 DirectionalLight {
1919 illuminance,
20- color : Color :: srgba ( r , g , b , a ) ,
20+ color,
2121 ..default ( )
2222 } ,
2323 Transform :: from_xyz ( px, py, pz) ,
@@ -26,25 +26,14 @@ pub fn create_directional(
2626}
2727
2828pub fn create_point (
29- In ( ( px, py, pz, r, g, b, a, intensity, range, radius) ) : In < (
30- f32 ,
31- f32 ,
32- f32 ,
33- f32 ,
34- f32 ,
35- f32 ,
36- f32 ,
37- f32 ,
38- f32 ,
39- f32 ,
40- ) > ,
29+ In ( ( px, py, pz, color, intensity, range, radius) ) : In < ( f32 , f32 , f32 , Color , f32 , f32 , f32 ) > ,
4130 mut commands : Commands ,
4231) -> Entity {
4332 commands
4433 . spawn ( (
4534 PointLight {
4635 intensity,
47- color : Color :: srgba ( r , g , b , a ) ,
36+ color,
4837 range,
4938 radius,
5039 ..default ( )
@@ -55,14 +44,11 @@ pub fn create_point(
5544}
5645
5746pub fn create_spot (
58- In ( ( px, py, pz, r, g, b, a, intensity, range, radius, inner_angle, outer_angle) ) : In < (
59- f32 ,
60- f32 ,
61- f32 ,
62- f32 ,
47+ In ( ( px, py, pz, color, intensity, range, radius, inner_angle, outer_angle) ) : In < (
6348 f32 ,
6449 f32 ,
6550 f32 ,
51+ Color ,
6652 f32 ,
6753 f32 ,
6854 f32 ,
@@ -74,7 +60,7 @@ pub fn create_spot(
7460 commands
7561 . spawn ( (
7662 SpotLight {
77- color : Color :: srgba ( r , g , b , a ) ,
63+ color,
7864 intensity,
7965 range,
8066 radius,
0 commit comments