| Crates.io | rgx-lyon |
| lib.rs | rgx-lyon |
| version | 0.1.2 |
| created_at | 2020-09-08 05:20:05.819197+00 |
| updated_at | 2020-09-23 03:34:53.334055+00 |
| description | A 2d graphics pipeline for rgx utilizing lyon |
| homepage | |
| repository | https://github.com/khonsulabs/rgx-lyon |
| max_upload_size | |
| id | 286020 |
| size | 58,113 |
This crate provides extremely feature-rich vector shape rendering to rgx via lyon.
let mut builder = ShapeBuilder::default();
lyon::tessellation::basic_shapes::fill_circle(
Point::new(50., 50.),
25.,
&FillOptions::default(),
&mut builder,
)
.expect("Error tesselating circle");
let shape = builder.prepare(&renderer);
// { ... }
pass.set_pipeline(&self.pipeline);
self.shape.draw(pass);
For a more in-depth look, check out the examples/ directory. You can run individual examples using cargo run --example <name>, e.g., cargo run --example circle