Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlesTaylor7 committed May 6, 2024
1 parent 6b660e0 commit b043a25
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/webgl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ pub fn render(ms: f32) -> Result<()> {
p.then = ms;
if p.twist_buffer.len() > 0 {
p.frame += delta;
console_log(delta);
if p.frame > ANIMATION_DURATION {
p.complete_twist();
}
Expand Down Expand Up @@ -184,7 +183,6 @@ pub fn on_key_down(event: &KeyboardEvent) {

#[wasm_bindgen]
pub fn on_key_up(event: &KeyboardEvent) {
console::log_2(&JsValue::from("keyup"), &JsValue::from(event));
KEYMAP.with(|keymap| {
STATE.with_borrow_mut(|state| {
let key: String = event.key();
Expand Down Expand Up @@ -594,8 +592,7 @@ impl State {
}
total += count;
}
let array = Uint32Array::from(array.as_slice());
array
Uint32Array::from(array.as_slice())
}

fn get_vertex_colors(&self) -> Float32Array {
Expand All @@ -610,9 +607,7 @@ impl State {
}
}

let array = Float32Array::from(array.as_slice());
console::log_2(&JsValue::from("colors"), &JsValue::from(&array));
array
Float32Array::from(array.as_slice())
}

fn get_vertex_positions(&self) -> Float32Array {
Expand Down Expand Up @@ -643,9 +638,7 @@ impl State {
}
}

let array = Float32Array::from(vector.as_slice());
console::log_2(&JsValue::from("positions"), &JsValue::from(&array));
array
Float32Array::from(vector.as_slice())
}
}

Expand Down

0 comments on commit b043a25

Please sign in to comment.