| Crates.io | turing-api |
| lib.rs | turing-api |
| version | 0.0.4 |
| created_at | 2025-04-07 17:25:13.309012+00 |
| updated_at | 2025-04-11 01:54:19.474301+00 |
| description | The Turing mod scripting API for Beat Saber |
| homepage | |
| repository | https://github.com/westbot657/Turing-api-rs |
| max_upload_size | |
| id | 1624495 |
| size | 15,344 |
The rust Turing scripting API for Beat Saber
This API exposes methods defined by the Turing mod for Beat Saber map scripting
This is a work-in-progress and will not be usable until the Turing mod is released (probably will be a while)
pub trait UnityConvertible {
type UnityType;
fn to_unity_type(self) -> Self::UnityType;
fn from_unity_type(t: Self::UnityType) -> Self;
}
impl Beatmap {
pub fn add_color_note(note: ColorNote) { ... }
pub fn add_bomb_note(note: ColorNote) { ... }
pub fn add_chain_head_note(note: ColorNote) { ... }
pub fn add_chain_link_note(note: ColorNote) { ... }
pub fn add_chain_note(note: ColorNote) { ... }
pub fn add_arc(note: ColorNote) { ... }
pub fn add_wall(note: ColorNote) { ... }
}
impl Data {
pub fn set_temp_value<T>(key: &str, v: T) {...}
pub fn get_temp_value<T>(key: &str) -> Option<T> {...}
pub fn remove_temp_value(key: &str) {...}
}
impl Log {
pub fn info(message: &str) {...}
pub fn warning(message: &str) {...}
pub fn error(message: &str) {...}
pub fn debug(message: &str) {...}
}
impl Color {
pub fn set_rgb(&mut self, r: f32, g: f32, b: f32) {...}
pub fn set_rgba(&mut self, r: f32, g: f32, b: f32, a: f32) {...}
}
impl Vec2 {
pub fn get_x(&self) -> f32 { ... }
pub fn get_y(&self) -> f32 { ... }
pub fn set_x(&self, x: f32) { ... }
pub fn set_y(&self, y: f32) { ... }
}
impl UnityConvertible for glam::Vec2 {
type UnityType = Vec2;
// ...
}
impl Vec3 {
pub fn get_x(&self) -> f32 { ... }
pub fn get_y(&self) -> f32 { ... }
pub fn get_z(&self) -> f32 { ... }
pub fn set_x(&self, x: f32) { ... }
pub fn set_y(&self, y: f32) { ... }
pub fn set_z(&self, z: f32) { ... }
}
impl UnityConvertible for glam::Vec3 {
type UnityType = Vec3;
// ...
}
impl Vec4 {
pub fn get_x(&self) -> f32 { ... }
pub fn get_y(&self) -> f32 { ... }
pub fn get_z(&self) -> f32 { ... }
pub fn get_w(&self) -> f32 { ... }
pub fn set_x(&self, x: f32) { ... }
pub fn set_y(&self, y: f32) { ... }
pub fn set_z(&self, z: f32) { ... }
pub fn set_w(&self, z: f32) { ... }
}
impl UnityConvertible for glam::Vec4 {
type UnityType = Vec4;
// ...
}
impl Quat {
pub fn get_x(&self) -> f32 { ... }
pub fn get_y(&self) -> f32 { ... }
pub fn get_z(&self) -> f32 { ... }
pub fn get_w(&self) -> f32 { ... }
pub fn set_x(&self, x: f32) { ... }
pub fn set_y(&self, y: f32) { ... }
pub fn set_z(&self, z: f32) { ... }
pub fn set_w(&self, z: f32) { ... }
}
impl UnityConvertible for glam::Quat {
type UnityType = Quat;
// ...
}
pub fn create_color_note(beat: f32) -> ColorNote {...}
pub fn create_bomb_note(beat: f32) -> BombNote {...}
pub fn create_chain_head_note(beat: f32) -> ChainHeadNote {...}
pub fn create_chain_link_note(beat: f32) -> ChainLinkNote {...}
pub fn create_chain_note(beat: f32) -> ChainNote {...}
pub fn create_arc(beat: f32) -> Arc {...}
pub fn create_wall(beat: f32) -> Wall {...}