{"id":15017965,"url":"https://github.com/nilirad/bevy_prototype_lyon","last_synced_at":"2025-05-13T20:09:58.898Z","repository":{"id":38005629,"uuid":"293588976","full_name":"Nilirad/bevy_prototype_lyon","owner":"Nilirad","description":"Draw 2D shapes in Bevy","archived":false,"fork":false,"pushed_at":"2025-03-31T16:20:47.000Z","size":694,"stargazers_count":758,"open_issues_count":32,"forks_count":95,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-05-07T01:55:04.129Z","etag":null,"topics":["bevy","rust","shapes"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nilirad.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-07T17:19:02.000Z","updated_at":"2025-05-04T10:26:37.000Z","dependencies_parsed_at":"2023-11-06T23:40:49.917Z","dependency_job_id":"78c1c9ce-d4d3-4dcb-b2c7-a59ecbead0de","html_url":"https://github.com/Nilirad/bevy_prototype_lyon","commit_stats":{"total_commits":234,"total_committers":24,"mean_commits":9.75,"dds":"0.22649572649572647","last_synced_commit":"8bb85b3c143e082ccc44df2fff44519f5632e2c9"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nilirad%2Fbevy_prototype_lyon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nilirad%2Fbevy_prototype_lyon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nilirad%2Fbevy_prototype_lyon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nilirad%2Fbevy_prototype_lyon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nilirad","download_url":"https://codeload.github.com/Nilirad/bevy_prototype_lyon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254020606,"owners_count":22000753,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bevy","rust","shapes"],"created_at":"2024-09-24T19:51:15.697Z","updated_at":"2025-05-13T20:09:58.868Z","avatar_url":"https://github.com/Nilirad.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bevy + Lyon = ❤\n\n[![Crates.io](https://img.shields.io/crates/v/bevy_prototype_lyon)](https://crates.io/crates/bevy_prototype_lyon)\n[![Crates.io](https://img.shields.io/crates/l/bevy_prototype_lyon)](LICENSE)\n[![Downloads](https://img.shields.io/crates/d/bevy_prototype_lyon)](https://crates.io/crates/bevy_prototype_lyon)\n[![GitHub Repo stars](https://img.shields.io/github/stars/Nilirad/bevy_prototype_lyon)](https://github.com/Nilirad/bevy_prototype_lyon)\n[![CI](https://github.com/Nilirad/bevy_prototype_lyon/actions/workflows/ci.yml/badge.svg)](https://github.com/Nilirad/bevy_prototype_lyon/actions/workflows/ci.yml)\n\n`bevy_prototype_lyon` enables [**Bevy**](https://bevyengine.org) users to draw 2D shapes and paths, like triangles, circles, rectangles, lines, arcs and beziers.\n\n[**Try out the live demo!**](https://nilirad.github.io/bevy_prototype_lyon_showcase/)\n![Regular polygon demo](docs/polygon_demo.webp)\n\n## How does it work?\n\nCurrently Bevy does not support drawing custom shapes in an easy way. This crate uses a variation of Bevy's `SpriteBundle` with custom meshes to draw shapes. The [**lyon**](https://docs.rs/lyon_tessellation) crate is used to generate those custom meshes.\n\n## Usage\n\nAdd `bevy_prototype_lyon` to your cargo project:\n\n```shell\ncargo add bevy_prototype_lyon\n```\n\nThen, you can start by drawing simple shapes:\n\n```rust\nuse bevy::{color::palettes::css::*, prelude::*};\nuse bevy_prototype_lyon::prelude::*;\n\nfn main() {\n    App::new()\n        .add_plugins((DefaultPlugins, ShapePlugin))\n        .add_systems(Startup, setup_system)\n        .run();\n}\n\nfn setup_system(mut commands: Commands) {\n    let shape = shapes::RegularPolygon {\n        sides: 6,\n        feature: shapes::RegularPolygonFeature::Radius(200.0),\n        ..shapes::RegularPolygon::default()\n    };\n\n    commands.spawn((Camera2d, Msaa::Sample4));\n    commands.spawn(\n        ShapeBuilder::with(\u0026shape)\n            .fill(DARK_CYAN)\n            .stroke((BLACK, 10.0))\n            .build(),\n    );\n}\n```\n\nDon't forget to check out the [examples](https://github.com/Nilirad/bevy_prototype_lyon/tree/latest/examples) to learn more!\n\n## Bevy versions supported\n\nI strive to support the latest version of Bevy. Support for a version of Bevy is dropped as soon as a new one is released.\n\nThe following table shows the latest version of `bevy_prototype_lyon` that supports a certain version of Bevy.\n\n|bevy|bevy_prototype_lyon|license|\n|---|---|---|\n|0.15|0.13|MIT/Apache 2.0|\n|0.14|0.12|MIT/Apache 2.0|\n|0.13|0.11|MIT/Apache 2.0|\n|0.12|0.10|MIT/Apache 2.0|\n|0.11|0.9|MIT/Apache 2.0|\n|0.10|0.8|MIT/Apache 2.0|\n|0.9 |0.7|MIT/Apache 2.0|\n|0.8 |0.6|MIT/Apache 2.0|\n|0.7 |0.5|MIT/Apache 2.0|\n|0.6 |0.4|MIT/Apache 2.0|\n|0.5 |0.3|MIT|\n|0.4 |0.2|MIT|\n\n***\n\n### License\n\nLicensed under either of\n\n * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any\nadditional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnilirad%2Fbevy_prototype_lyon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnilirad%2Fbevy_prototype_lyon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnilirad%2Fbevy_prototype_lyon/lists"}