Crates.io | bevy_stroked_text |
lib.rs | bevy_stroked_text |
version | 0.2.0 |
source | src |
created_at | 2024-02-09 07:01:09.787969 |
updated_at | 2024-02-25 01:48:42.400686 |
description | A Bevy plugin for stroked text rendering |
homepage | |
repository | https://github.com/luan/bevy_stroked_text |
max_upload_size | |
id | 1133517 |
size | 547,511 |
A Bevy plugin for stroked text rendering. This plugin is experimental and may not have performance or quality suitable for production use. The way this plugin works currently is by rendering 8 copies of the text with a 1 pixel offset in each direction, then rendering the original text on top of that. This is not the most efficient way to render stroked text, but it is the easiest to implement and works well enough for now.
Add the plugin to your app
App::new()
.add_plugins((DefaultPlugins, StrokedTextPlugin))
.run();
Add a StrokedTextBundle to your entity
commands.spawn(
StrokedTextBundle::new(StrokedText {
text: "Hello, world!".to_string(),
font_size: 32.0,
text_anchor: bevy::sprite::Anchor::Center,
..Default::default()
})
.with_transform(Transform::from_translation(Vec3::Z).with_scale(Vec3::splat(0.25))),
);
bevy | bevy_stroked_text |
---|---|
0.12 | 0.10, main |
bevy_stroked_text
is dual-licensed under either
at your option.
PRs welcome!