summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2025-02-17 22:57:54 -0500
committerLLLL Colonq <llll@colonq>2025-02-17 22:57:54 -0500
commit0a078977d4b033739e85b95942a3f02711c4b9a3 (patch)
tree13c542ab52a35aeb6d3eabd8d15c6dbaf947142f
parentd7c175733194b406990cb0113aab2b26836e8edb (diff)
Don't set time on wasm
-rw-r--r--crates/throwshade/src/lib.rs3
1 files changed, 2 insertions, 1 deletions
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)?;