From c9a6dce3af4dce6bf764b8f73d792a21b6d92e87 Mon Sep 17 00:00:00 2001 From: Manan Karnik Date: Fri, 12 Jan 2024 22:58:51 +0530 Subject: [PATCH] refactor: update serde skipped fields --- src/map.rs | 2 ++ src/noise.rs | 2 +- src/planet.rs | 1 + src/terrain.rs | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/map.rs b/src/map.rs index 4b958f4..00be10b 100644 --- a/src/map.rs +++ b/src/map.rs @@ -48,8 +48,10 @@ pub struct Map { /// Size of the map pub size: [u32; 2], /// If true, `ImageSampler::linear()` is used else `ImageSampler::nearest()` + #[serde(skip)] pub anti_aliasing: bool, /// If true, exports model in glb format + #[serde(skip)] pub export: bool, } diff --git a/src/noise.rs b/src/noise.rs index aea7c38..bbdc691 100644 --- a/src/noise.rs +++ b/src/noise.rs @@ -123,7 +123,7 @@ impl Default for Region { #[serde(rename_all = "camelCase")] pub struct Gradient { /// Image handle of gradient - #[serde(skip_serializing, skip_deserializing)] + #[serde(skip)] pub image: Handle, /// Size of gradient pub size: [u32; 2], diff --git a/src/planet.rs b/src/planet.rs index f830a31..c9f4064 100644 --- a/src/planet.rs +++ b/src/planet.rs @@ -74,6 +74,7 @@ pub struct Planet { /// If true, exports model in glb format /// Native: Shows save file dialog. /// WASM: Downloads model based on browser configuration. + #[serde(skip)] pub export: bool, } diff --git a/src/terrain.rs b/src/terrain.rs index e6b7b68..d2d6e3b 100644 --- a/src/terrain.rs +++ b/src/terrain.rs @@ -53,6 +53,7 @@ pub struct Terrain { /// The mesh below this value will be flat pub sea_percent: f32, /// If true, exports model in glb format + #[serde(skip)] pub export: bool, }