use bevy::asset::Asset; use bevy::math::Vec3; use bevy::prelude::TypePath; use serde::{Deserialize, Serialize}; #[derive(Deserialize, TypePath, Serialize, Clone, Debug, PartialEq, Asset)] pub struct PartConfig { pub part: PartPartConfig, pub physics: PartPhysicsConfig, pub joints: Vec } #[derive(Deserialize, TypePath, Serialize, Clone, Debug, PartialEq, Asset)] pub struct PartPartConfig { pub name: String, pub sprite_connected: String, pub sprite_disconnected: String, } #[derive(Deserialize, TypePath, Serialize, Clone, Debug, PartialEq, Asset)] pub struct PartPhysicsConfig { pub width: f32, pub height: f32, pub mass: f32 } #[derive(Deserialize, TypePath, Serialize, Clone, Debug, PartialEq, Asset)] pub struct JointConfig { pub translation: Vec3, pub rotation: f32 }