Skip to content

Commit

Permalink
Improve name for WebAsm
Browse files Browse the repository at this point in the history
  • Loading branch information
ReeceHumphreys committed Feb 7, 2024
1 parent 1339905 commit 41aef38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ pub fn run(event: &impl FragmentationEvent) -> Array3<f32> {
}

#[cfg(target_arch = "wasm32")]
#[wasm_bindgen]
#[wasm_bindgen(js_name = runExplosion)]
pub fn run_explosion(event: &ExplosionEvent) -> JsValue {
let result = run_core(event);
// Convert the result to JsValue
serde_wasm_bindgen::to_value(&result).unwrap()
}

#[cfg(target_arch = "wasm32")]
#[wasm_bindgen]
#[wasm_bindgen(js_name = runCollision)]
pub fn run_collision(event: &CollisionEvent) -> JsValue {
let result = run_core(event);
// Convert the result to JsValue
Expand Down

0 comments on commit 41aef38

Please sign in to comment.