From 0a078977d4b033739e85b95942a3f02711c4b9a3 Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Mon, 17 Feb 2025 22:57:54 -0500 Subject: Don't set time on wasm --- crates/throwshade/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/throwshade/src/lib.rs b/crates/throwshade/src/lib.rs index 402be0e..06311a3 100644 --- a/crates/throwshade/src/lib.rs +++ b/crates/throwshade/src/lib.rs @@ -19,9 +19,10 @@ impl ThrowShade { pub fn set(&mut self, ctx: &context::Context, st: &state::State, src: &str) -> Result<(), String> { let fsrc = format!("{}\n{}\n", FRAG, src); self.tickset = st.tick; + self.timeset = 0.0; + #[cfg(not(target_arch = "wasm32"))] if let Ok(dur) = std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH) { self.timeset = dur.as_secs_f64(); - log::info!("the time: {}", self.timeset); } if let Some(s) = &mut self.shader { s.replace(ctx, VERT, &fsrc)?; -- cgit v1.2.3