examples
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||
//! This is the example that goes to the README.md file. The README.md should be //! updated before every release. use bevy::prelude::*; use bevy_prototype_lyon::prelude::*; fn main() { App::new() .insert_resource(Msaa { samples: 8 }) .add_plugins(DefaultPlugins) .add_plugin(ShapePlugin) .add_startup_system(setup_system) .run(); } fn setup_system(mut commands: Commands) { let shape = shapes::RegularPolygon { sides: 6, feature: shapes::RegularPolygonFeature::Radius(200.0), ..shapes::RegularPolygon::default() }; commands.spawn_bundle(OrthographicCameraBundle::new_2d()); commands.spawn_bundle(GeometryBuilder::build_as( &shape, DrawMode::Outlined { fill_mode: FillMode::color(Color::CYAN), outline_mode: StrokeMode::new(Color::BLACK, 10.0), }, Transform::default(), )); }