Skip to content

Commit

Permalink
chore: update to latest bevy_args
Browse files Browse the repository at this point in the history
  • Loading branch information
mosure committed May 15, 2024
1 parent 3255153 commit a8c5a0e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ webgpu = ["bevy/webgpu"]


[dependencies]
bevy_args = { version = "1.3.0", optional = true }
bevy_args = { version = "1.4", optional = true }
bevy-inspector-egui = { version = "0.24", optional = true }
bevy_mod_picking = { version = "0.18", optional = true }
bevy_panorbit_camera = { version = "0.18", optional = true }
Expand All @@ -146,7 +146,7 @@ bytemuck = "1.14"
clap = { version = "4.4", features = ["derive"], optional = true }
flate2 = { version = "1.0", optional = true }
flexbuffers = { version = "2.0", optional = true }
half = { version = "2.3.1", optional = true, features = ["serde"] }
half = { version = "2.3", optional = true, features = ["serde"] }
image = { version = "0.25.0", default-features = false, features = ["png"] }
kd-tree = { version = "0.6", optional = true }
noise = { version = "0.9.0", optional = true }
Expand All @@ -155,17 +155,17 @@ rand = "0.8"
rayon = { version = "1.8", optional = true }
serde = "1.0"
static_assertions = "1.1"
typenum = "1.17.0"
typenum = "1.17"
wgpu = "0.19.1"


[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1"
wasm-bindgen = "0.2.89"
wasm-bindgen = "0.2"


[dependencies.bevy]
version = "0.13.0"
version = "0.13"
default-features = false
features = [
"bevy_asset",
Expand Down
18 changes: 12 additions & 6 deletions src/utils.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#[cfg(target_arch = "wasm32")]
use wasm_bindgen::prelude::*;

use bevy::prelude::*;
use bevy_args::{
Deserialize,
Expand All @@ -20,25 +17,34 @@ use bevy_args::{
pub struct GaussianSplattingViewer {
#[arg(long, default_value = "true")]
pub editor: bool,

#[arg(long, default_value = "true")]
pub press_esc_close: bool,

#[arg(long, default_value = "true")]
pub press_s_screenshot: bool,

#[arg(long, default_value = "true")]
pub show_fps: bool,

#[arg(long, default_value = "1920.0")]
pub width: f32,

#[arg(long, default_value = "1080.0")]
pub height: f32,

#[arg(long, default_value = "bevy_gaussian_splatting")]
pub name: String,

#[arg(long, default_value = "1")]
pub msaa_samples: u8,

#[arg(long, default_value = "")]
pub input_file: String,

#[arg(long, default_value = "0")]
pub gaussian_count: usize,

#[arg(long, default_value = "0")]
pub particle_count: usize,
}
Expand Down Expand Up @@ -71,15 +77,15 @@ pub fn setup_hooks() {
}


pub fn log(msg: &str) {
pub fn log(_msg: &str) {
#[cfg(debug_assertions)]
#[cfg(target_arch = "wasm32")]
{
web_sys::console::log_1(&msg.into());
web_sys::console::log_1(&_msg.into());
}
#[cfg(debug_assertions)]
#[cfg(not(target_arch = "wasm32"))]
{
println!("{}", msg);
println!("{}", _msg);
}
}

0 comments on commit a8c5a0e

Please sign in to comment.