Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing serialization implementation #5

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/curves/color_point.rs
Original file line number Diff line number Diff line change
@@ -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,
}
Expand Down
5 changes: 3 additions & 2 deletions src/randomized_values/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use bevy::prelude::*;
use serde::{Deserialize, Serialize};
use std::f32::consts::PI;

pub trait RandValue {
Expand All @@ -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,
Expand All @@ -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,
Expand Down
Loading