Skip to content

Commit

Permalink
fix(ci)
Browse files Browse the repository at this point in the history
Signed-off-by: RSUU <[email protected]>
  • Loading branch information
rsuu committed May 7, 2024
1 parent 29f3f0f commit 0a69154
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 39 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,15 @@ de_svg = ["dep:usvg", "dep:tiny-skia", "dep:resvg"]
ex_full = ["ex_tar"]
ex_tar = ["dep:tar"]

[target.'cfg(target_arch = "wasm32")'.dependencies]
[target.'cfg(target_family = "wasm")'.dependencies]
console_log = "1.0"
console_error_panic_hook = "0.1.7"
#wasm-bindgen-futures = "0.4.30"
wasm-bindgen = "0.2.92"
web-sys = { version = "0.3.69", features = ["Document", "Window", "Element"] }

[target.'cfg(target_arch = "wasm32")'.features]
default = []
# [target.'cfg(target_family = "wasm")'.features]
# default = []

[package.metadata.wasm-pack.profile.release]
wasm-opt = false
36 changes: 1 addition & 35 deletions src/window.rs
Original file line number Diff line number Diff line change
@@ -1,39 +1,5 @@
#[cfg(target_arch = "x86_64")]
#[cfg(not(target_arch = "wasm32"))]
pub mod desktop;

#[cfg(target_arch = "wasm32")]
pub mod web;

// event_loop.run(move |event, _target, control_flow| {
// let start_time = Instant::now();
// match event {
// Event::WindowEvent { event: WindowEvent::CloseRequested, .. } => {
// *control_flow = ControlFlow::Exit;
// },
// ...
// /*
// * Process events here
// */
// }
// match *control_flow {
// ControlFlow::Exit => (),
// _ => {
// /*
// * Grab window handle from the display (untested - based on API)
// */
// display.gl_window().window().request_redraw();
// /*
// * Below logic to attempt hitting TARGET_FPS.
// * Basically, sleep for the rest of our milliseconds
// */
// let elapsed_time = Instant::now().duration_since(start_time).as_millis() as u64;
//
// let wait_millis = match 1000 / TARGET_FPS >= elapsed_time {
// true => 1000 / TARGET_FPS - elapsed_time,
// false => 0
// };
// let new_inst = start_time + std::time::Duration::from_millis(wait_millis);
// *control_flow = ControlFlow::WaitUntil(new_inst);
// }
// }
// });

0 comments on commit 0a69154

Please sign in to comment.