Crates.io | bevy_terminal_shader |
lib.rs | bevy_terminal_shader |
version | 0.2.0 |
source | src |
created_at | 2024-01-09 10:21:37.971516 |
updated_at | 2024-07-23 06:57:03.527344 |
description | An old school terminal shader for the bevy game engine |
homepage | |
repository | https://github.com/shanecelis/bevy_terminal_shader |
max_upload_size | |
id | 1093759 |
size | 1,500,946 |
This crate provides an old school terminal-like, or oscilloscope, effect that can be applied to 2D and 3D objects on the bevy game engine.
cargo add bevy_terminal_shader
use bevy::prelude::*;
fn main() {
App::new()
.add_plugins(bevy_terminal_shader::TerminalShaderPlugin)
.run()
}
use bevy::prelude::*;
fn setup(
mut commands: Commands,
mut meshes: ResMut<Assets<Mesh>>,
mut materials: ResMut<Assets<TerminalMaterial>>) {
commands.spawn(Camera2dBundle::default());
commands.spawn(MaterialMesh2dBundle {
mesh: meshes
.add(shape::Quad::new(Vec2::new(1300., 800.)).into())
.into(),
material: materials.add(TerminalMaterial::green()),
..default()
});
Run the "quad" example like so:
cargo run --example quad
This will show a large quad like the one shown at the beginning of this README.
cargo run --example cube
This will show a rotating cube with the shader as its surfaces.
bevy_oscilloscope_shader
.bevy_terminal_shader | bevy |
---|---|
0.2 | 0.14 |
0.1 | 0.12.1 |
This crate is licensed under the MIT License or the Apache License 2.0 or CC0 License.
Terminal Shader by mrange originally released under the CC0 License.