3 个版本
0.1.6 | 2022 年 5 月 20 日 |
---|---|
0.1.5 | 2022 年 5 月 16 日 |
0.1.4 | 2022 年 5 月 16 日 |
#435 in 游戏
20KB
499 行
onshape-level-gen
OnShape VR 游戏的自动关卡生成器
在此下载稳定版本。
在此下载夜间版本。
lib.rs
:
此包包含生成 OnShape yml 级别文件的必要工具。
示例
use onshape_level_gen::util::*;
// this difficulty is a FFT result iterating factor.
let init_difficulty_limit = 1.2f32;
let input_ogg = "~/your_target_file.ogg";
let output_yml = "~/level.yml";
let (samples, output_params) = get_data_from_ogg(input_ogg).unwrap();
let notes = get_notes_from_samples(samples, init_difficulty_limit).unwrap();
let walls = get_walls_from_notes(¬es);
let yml_content = gen_yml(&output_params, walls);
std::fs::write(output_yml, yml_content).unwrap();
依赖项
~4MB
~142K SLoC