diff --git a/src/curves/color_point.rs b/src/curves/color_point.rs index f2f8693..58cc1a3 100644 --- a/src/curves/color_point.rs +++ b/src/curves/color_point.rs @@ -1,10 +1,11 @@ use bevy::{reflect::Reflect, render::color::Color}; +use serde::{Deserialize, Serialize}; use std::{ iter::Sum, ops::{Add, Deref, Mul, Sub}, }; -#[derive(Reflect, Default, Debug, Clone, PartialEq, Copy)] +#[derive(Reflect, Default, Debug, Clone, PartialEq, Copy, Serialize, Deserialize)] pub struct ColorPoint { pub color: Color, } diff --git a/src/randomized_values/mod.rs b/src/randomized_values/mod.rs index 1fedb4f..46293ca 100644 --- a/src/randomized_values/mod.rs +++ b/src/randomized_values/mod.rs @@ -1,4 +1,5 @@ use bevy::prelude::*; +use serde::{Deserialize, Serialize}; use std::f32::consts::PI; pub trait RandValue { @@ -8,7 +9,7 @@ pub trait RandValue { fn constant(value: Self::Out) -> Self; } -#[derive(Debug, Clone, Copy, Reflect, Default)] +#[derive(Debug, Clone, Copy, Reflect, Default, Serialize, Deserialize)] pub struct RandF32 { pub min: f32, pub max: f32, @@ -29,7 +30,7 @@ impl RandValue for RandF32 { } } -#[derive(Debug, Clone, Copy, Reflect)] +#[derive(Debug, Clone, Copy, Reflect, Serialize, Deserialize)] pub struct RandVec3 { pub magnitude: RandF32, pub direction: Vec3,