@@ 12,6 12,7 @@ sprite = "textures/mercury.png"
radius = 333.33 # m
mass = 205_000_000.0 # kg
default_transform = [116_129.4, 0.0, 0.0]
+orbit = { orbiting = "Sun", eccentricity = 0.2056 }
[[planets]]
name = "Venus"
@@ 19,6 20,7 @@ sprite = "textures/venus.png"
radius = 949.9 # m
mass = 806_166_000.0 # kg
default_transform = [216_999.6, 0.0, 0.0]
+orbit = { orbiting = "Sun", eccentricity = 0.0068 }
[[planets]]
name = "Earth"
@@ 27,6 29,7 @@ indicator_sprite = "textures/earth_icon.png"
radius = 1000.0 # m
mass = 4_900_000_000.0 # kg
default_transform = [300_000.0, 0.0, 0.0]
+orbit = { orbiting = "Sun", eccentricity = 0.0167 }
[[planets]]
name = "Moon"
@@ 35,6 38,7 @@ indicator_sprite = "textures/moon_icon.png"
radius = 272.7 # m
mass = 60_236_000.0 # kg
default_transform = [305_700.0, 0.0, 0.0]
+orbit = { orbiting = "Earth", eccentricity = 0.0549 }
[[planets]]
name = "Mars"
@@ 43,6 47,7 @@ indicator_sprite = "textures/mars_icon.png"
radius = 531.0 # m
mass = 525_857_000.0 # kg
default_transform = [430_000.0, 0.0, 0.0]
+orbit = { orbiting = "Sun", eccentricity = 0.0934 }
[[planets]]
name = "Jupiter"
@@ 50,6 55,7 @@ sprite = "textures/jupiter.png"
radius = 10973.0 # m
mass = 1_131_221_218_000.0 # kg
default_transform = [1_561_140.0, 0.0, 0.0]
+orbit = { orbiting = "Sun", eccentricity = 0.0484 }
[[planets]]
name = "Saturn"
@@ 57,6 63,7 @@ sprite = "textures/earth.png"
radius = 9_140.2 # m
mass = 561_386_112_000.0 # kg
default_transform = [2_874_780.0, 0.0, 0.0]
+orbit = { orbiting = "Sun", eccentricity = 0.0541 }
[[planets]]
name = "Uranus"
@@ 64,6 71,7 @@ sprite = "textures/venus.png"
radius = 4007.0 # m
mass = 69_763_532_000.0 # kg
default_transform = [4_050_000.0, 0.0, 0.0]
+orbit = { orbiting = "Sun", eccentricity = 0.0472 }
[[planets]]
name = "Neptune"
@@ 71,6 79,7 @@ sprite = "textures/mars.png"
radius = 3_883.0 # m
mass = 106_674_649_000.0 # kg
default_transform = [5_000_000.0, 0.0, 0.0]
+orbit = { orbiting = "Sun", eccentricity = 0.0086 }
[[planets]]
name = "Pluto"
@@ 78,3 87,4 @@ sprite = "textures/jupiter.png"
radius = 186.8 # m
mass = 10_817_000.0 # kg
default_transform = [5_922_300.0, 0.0, 0.0]
+orbit = { orbiting = "Sun", eccentricity = 0.2488 }<
\ No newline at end of file
@@ 17,6 17,13 @@ pub struct Planet {
pub mass: f32,
pub default_transform: [f32; 3],
pub special_sprite_properties: Option<SpecialSpriteProperties>,
+ pub orbit: Option<OrbitData>
+}
+
+#[derive(Deserialize, TypePath, Serialize, Clone, Debug)]
+pub struct OrbitData {
+ pub orbiting: String,
+ pub eccentricity: f32,
}
#[derive(Deserialize, TypePath, Serialize, Clone, Debug)]
@@ 30,7 37,6 @@ pub struct PlanetBundle {
pub transform: Transform,
pub collider: Collider,
pub mass: Mass
- //pub additional_mass_properties: AdditionalMassProperties,
}
#[derive(Deserialize, Asset, TypePath)]