shuffle around methods for no reason
This commit is contained in:
@@ -118,11 +118,28 @@ impl PlaybackHead{
|
||||
self.head.advance_time(&bot.bot,time);
|
||||
}
|
||||
#[wasm_bindgen]
|
||||
pub fn set_paused(&mut self,time:f64,paused:bool){
|
||||
let time=time::from_float(time).unwrap();
|
||||
self.head.set_paused(time,paused);
|
||||
}
|
||||
#[wasm_bindgen]
|
||||
pub fn set_scale(&mut self,time:f64,scale:f64){
|
||||
let time=time::from_float(time).unwrap();
|
||||
self.head.set_scale(time,scale.try_into().unwrap());
|
||||
}
|
||||
#[wasm_bindgen]
|
||||
pub fn get_head_time(&self,time:f64)->f64{
|
||||
let time=time::from_float(time).unwrap();
|
||||
let time=self.head.time(time);
|
||||
time.get() as f64/strafesnet_common::run::Time::ONE_SECOND.get() as f64
|
||||
}
|
||||
/// Set the playback head position to new_time.
|
||||
#[wasm_bindgen]
|
||||
pub fn set_head_time(&mut self,time:f64,new_time:f64){
|
||||
let time=time::from_float(time).unwrap();
|
||||
let new_time=time::from_float(new_time).unwrap();
|
||||
self.head.set_time(time,new_time);
|
||||
}
|
||||
#[wasm_bindgen]
|
||||
pub fn get_run_time(&self,bot:&CompleteBot,time:f64,mode_id:u32)->Option<f64>{
|
||||
let time=time::from_float(time).unwrap();
|
||||
@@ -142,23 +159,6 @@ impl PlaybackHead{
|
||||
Some(self.head.state().get_run(mode)?.is_finished())
|
||||
}
|
||||
#[wasm_bindgen]
|
||||
pub fn set_paused(&mut self,time:f64,paused:bool){
|
||||
let time=time::from_float(time).unwrap();
|
||||
self.head.set_paused(time,paused);
|
||||
}
|
||||
#[wasm_bindgen]
|
||||
pub fn set_scale(&mut self,time:f64,scale:f64){
|
||||
let time=time::from_float(time).unwrap();
|
||||
self.head.set_scale(time,scale.try_into().unwrap());
|
||||
}
|
||||
/// Set the playback head position to new_time.
|
||||
#[wasm_bindgen]
|
||||
pub fn set_head_time(&mut self,time:f64,new_time:f64){
|
||||
let time=time::from_float(time).unwrap();
|
||||
let new_time=time::from_float(new_time).unwrap();
|
||||
self.head.set_time(time,new_time);
|
||||
}
|
||||
#[wasm_bindgen]
|
||||
pub fn get_fov_slope_y(&self)->f64{
|
||||
self.head.state().get_fov_y()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user