diff options
Diffstat (limited to 'examples/solar_system')
-rw-r--r-- | examples/solar_system/Cargo.toml | 6 | ||||
-rw-r--r-- | examples/solar_system/README.md | 4 | ||||
-rw-r--r-- | examples/solar_system/src/main.rs | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/examples/solar_system/Cargo.toml b/examples/solar_system/Cargo.toml index 1a98a87e..ca64da14 100644 --- a/examples/solar_system/Cargo.toml +++ b/examples/solar_system/Cargo.toml @@ -6,6 +6,8 @@ edition = "2021" publish = false [dependencies] -iced = { path = "../..", features = ["canvas", "tokio", "debug"] } -env_logger = "0.10.0" +iced.workspace = true +iced.features = ["debug", "canvas", "tokio"] + rand = "0.8.3" +tracing-subscriber = "0.3" diff --git a/examples/solar_system/README.md b/examples/solar_system/README.md index acfbc466..81ffd3a5 100644 --- a/examples/solar_system/README.md +++ b/examples/solar_system/README.md @@ -5,9 +5,7 @@ An animated solar system drawn using the `Canvas` widget and showcasing how to c The __[`main`]__ file contains all the code of the example. <div align="center"> - <a href="https://gfycat.com/selfassuredaromaticdunnart"> - <img src="https://thumbs.gfycat.com/SelfassuredAromaticDunnart-small.gif"> - </a> + <img src="https://iced.rs/examples/solar_system.gif"> </div> You can run it with `cargo run`: diff --git a/examples/solar_system/src/main.rs b/examples/solar_system/src/main.rs index 58d06206..8295dded 100644 --- a/examples/solar_system/src/main.rs +++ b/examples/solar_system/src/main.rs @@ -23,7 +23,7 @@ use iced::{ use std::time::Instant; pub fn main() -> iced::Result { - env_logger::builder().format_timestamp(None).init(); + tracing_subscriber::fmt::init(); SolarSystem::run(Settings { antialiasing: true, @@ -117,8 +117,8 @@ impl State { let (width, height) = window::Settings::default().size; State { - space_cache: Default::default(), - system_cache: Default::default(), + space_cache: canvas::Cache::default(), + system_cache: canvas::Cache::default(), start: now, now, stars: Self::generate_stars(width, height), |