library: render: lights: optional deserialization

This commit is contained in:
Bruno BELANYI 2020-03-19 12:58:46 +01:00
parent e3ebd1c977
commit 8778ce81b7

View file

@ -4,9 +4,13 @@ use std::iter::Iterator;
#[derive(Debug, PartialEq, Deserialize)] #[derive(Debug, PartialEq, Deserialize)]
pub struct LightAggregate { pub struct LightAggregate {
#[serde(default)]
ambients: Vec<AmbientLight>, ambients: Vec<AmbientLight>,
#[serde(default)]
directionals: Vec<DirectionalLight>, directionals: Vec<DirectionalLight>,
#[serde(default)]
points: Vec<PointLight>, points: Vec<PointLight>,
#[serde(default)]
spots: Vec<SpotLight>, spots: Vec<SpotLight>,
} }