//! Shows the terminal material rendered on a quad. use bevy::{prelude::*, sprite::MaterialMesh2dBundle}; use bevy_terminal_shader::{TerminalMaterial, TerminalShaderPlugin}; fn main() { App::new() .add_plugins((DefaultPlugins, TerminalShaderPlugin)) .add_systems(Startup, setup) .run(); } /// Setup a quad and camera. fn setup( mut commands: Commands, mut meshes: ResMut>, mut materials: ResMut>, ) { commands.spawn(Camera2dBundle::default()); commands.spawn(MaterialMesh2dBundle { mesh: meshes // .add(shape::Quad::new(Vec2::new(1300., 800.)).into()) .add(bevy::math::primitives::Rectangle::new(1300., 800.)) .into(), material: materials.add(TerminalMaterial::green()), ..default() }); }