use std::f32::consts::TAU; use std::f64::consts::TAU as TAU64; use bevy::prelude::*; use bevy_polyline::prelude::*; // This example demonstrates how to use the `depth_bias` field on `PolylineMaterial` // // It should display on screen: // * A rotating plane centered on the screen that eventually intersects with the camera. // * A vertical red line that is drawn in front of everything. // * 100 horizontal lines, going from the top to the bottom of the screen going through // all the colors of the rainbow. // // In addition, you can use the UP and DOWN arrow keys to move forward and backward the // camera. // // Each horizontal line has a different depth_bias, going from 1.0 at the top to -1.0 at // the bottom (the middle line is 0.0) In combination with the rotating plane, it should // demonstrate how different depth_bias values interact with geometry. fn main() { App::new() .insert_resource(ClearColor(Color::BLACK)) .insert_resource(Msaa::Sample4) .add_plugins(DefaultPlugins) .add_plugins(PolylinePlugin) .add_systems(Update, (move_camera, rotate_plane)) .add_systems(Startup, setup) .run(); } #[derive(Component)] struct Rotating(f64); fn rotate_plane(time: Res