//! Shows the terminal material rendered on a cube. use bevy::prelude::*; use bevy_terminal_shader::{TerminalMaterial, TerminalShaderPlugin}; fn main() { App::new() .add_plugins((DefaultPlugins, TerminalShaderPlugin)) .add_systems(Startup, setup) .run(); } /// Set up a simple 3D scene. fn setup( mut commands: Commands, mut meshes: ResMut>, mut materials: ResMut>, ) { // cube commands.spawn(MaterialMeshBundle { // mesh: meshes.add(Mesh::from(shape::Cube { size: 1.0 })), mesh: meshes.add(Mesh::from(bevy::math::primitives::Cuboid { half_size: Vec3::splat(1.0) })), transform: Transform::from_xyz(0.0, 0.5, 0.0), material: materials.add( // TerminalMaterial::default() TerminalMaterial::green(), ), ..default() }); // camera commands.spawn(Camera3dBundle { transform: Transform::from_xyz(-2.0, 2.5, 5.0).looking_at(Vec3::ZERO, Vec3::Y), ..default() }); }