36个版本
0.15.0 | 2024年3月17日 |
---|---|
0.14.0 | 2023年11月5日 |
0.13.0 | 2023年7月12日 |
0.12.4 | 2023年3月11日 |
0.7.4 | 2021年11月24日 |
#246 在 游戏开发
89 每月下载量
用于 2 包
140KB
2.5K SLoC
Bevy Ascii Terminal
集成到bevy的ecs框架中的简单ascii终端。
此包的目的是提供一个简单、直接且希望快速的渲染彩色ascii的方法,旨在“传统roguelikes”,但如果需要,也可以作为简单的UI工具。
代码示例
use bevy::prelude::*;
use bevy_ascii_terminal::prelude::*;
fn setup(mut commands: Commands) {
// Create the terminal
let mut terminal = Terminal::new([20,3]).with_border(Border::single_line());
// Draw a blue "Hello world!" to the terminal
terminal.put_string([1, 1], "Hello world!".fg(Color::BLUE));
commands.spawn((
// Spawn the terminal bundle from our terminal
TerminalBundle::from(terminal),
// Automatically set up the camera to render the terminal
AutoCamera,
));
}
fn main () {
App::new()
.add_plugins((DefaultPlugins, TerminalPlugin))
.add_systems(Startup, setup)
.run();
}
版本
bevy | bevy_ascii_terminal |
---|---|
0.13 | 0.15.0 |
0.12 | 0.14.0 |
0.11 | 0.13.0 |
0.9 | 0.12.1 |
0.8.1 | 0.11.1-4 |
0.8 | 0.11 |
0.7 | 0.9-0.10 |
Bevy Ascii Terminal项目
依赖
~37–73MB
~1.5M SLoC