-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Move `Geometry` impl to wrapper `Path` * Add path example
- Loading branch information
Showing
3 changed files
with
33 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
use bevy::prelude::*; | ||
use bevy_prototype_lyon::prelude::*; | ||
|
||
fn main() { | ||
App::new() | ||
.insert_resource(Msaa { samples: 4 }) | ||
.add_plugins(DefaultPlugins) | ||
.add_plugin(ShapePlugin) | ||
.add_startup_system(setup_system) | ||
.run(); | ||
} | ||
|
||
fn setup_system(mut commands: Commands) { | ||
let mut path_builder = PathBuilder::new(); | ||
path_builder.move_to(Vec2::ZERO); | ||
path_builder.line_to(100.0 * Vec2::ONE); | ||
let line = path_builder.build(); | ||
|
||
commands.spawn_bundle(OrthographicCameraBundle::new_2d()); | ||
commands.spawn_bundle(GeometryBuilder::build_as( | ||
&line, | ||
DrawMode::Stroke(StrokeMode::new(Color::BLACK, 10.0)), | ||
Transform::default(), | ||
)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
762ff4d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When will this fix be released?
762ff4d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just a minor ergonomic fix. I don't want to bump a new version only for this. There is a simple workaround in #138.
762ff4d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx