6 个版本
0.1.5 | 2023 年 3 月 24 日 |
---|---|
0.1.4 | 2023 年 3 月 23 日 |
0.1.2 | 2023 年 2 月 28 日 |
12 在 #3d-rendering
42 每月下载量
在 ftc 中使用
120KB
2.5K SLoC
有关文档和示例,请访问网站。
您可以在应用程序中这样渲染 Forged Thoughts 脚本
use forgedthoughts::prelude::*;
// Create FT
let ft = FT::new();
// Compile a script
let rc = ft.compile_code("let s = Sphere();".to_string(), "main.ft".to_string);
// Render it into a buffer
let mut buffer = ColorBuffer::new(ctx.settings.width as usize, ctx.settings.height as usize);
for i in 0..ctx.settings.renderer.iterations {
ft.render(&mut ctx, &mut buffer);
}
// Convert the buffer to Vec<u8>
let out = buffer.to_u8_vec();
依赖项
~7.5MB
~119K SLoC