{"id":19294380,"url":"https://github.com/robertdodd/bevy_round_ui","last_synced_at":"2025-07-13T19:07:34.353Z","repository":{"id":210099388,"uuid":"721387126","full_name":"robertdodd/bevy_round_ui","owner":"robertdodd","description":"Round UI nodes for Bevy","archived":false,"fork":false,"pushed_at":"2024-07-05T05:43:38.000Z","size":95,"stargazers_count":8,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-01T23:46:53.523Z","etag":null,"topics":["bevy","bevy-engine","game-development","gamedev","gui","ui"],"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/robertdodd.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"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":"2023-11-21T00:38:34.000Z","updated_at":"2025-05-22T05:40:17.000Z","dependencies_parsed_at":"2024-06-16T21:41:04.852Z","dependency_job_id":"b3869d2e-a21e-46b3-b764-bae9d660a5a9","html_url":"https://github.com/robertdodd/bevy_round_ui","commit_stats":null,"previous_names":["robertdodd/bevy_round_ui"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/robertdodd/bevy_round_ui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdodd%2Fbevy_round_ui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdodd%2Fbevy_round_ui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdodd%2Fbevy_round_ui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdodd%2Fbevy_round_ui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robertdodd","download_url":"https://codeload.github.com/robertdodd/bevy_round_ui/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdodd%2Fbevy_round_ui/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265191121,"owners_count":23725264,"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","bevy-engine","game-development","gamedev","gui","ui"],"created_at":"2024-11-09T22:38:07.656Z","updated_at":"2025-07-13T19:07:34.328Z","avatar_url":"https://github.com/robertdodd.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bevy Round UI\n\nThis [Bevy](https://bevyengine.org/) plugin contains a shader for rendering rounded rect UI elements, with an\nadjustable offset that can be used to add borders or make the node appear 3D.\n\n## Examples\n\n![Screenshot of the buttons example](https://raw.githubusercontent.com/robertdodd/bevy_round_ui/master/images/screenshot.png)\n\nThe [simple](https://github.com/robertdodd/bevy_round_ui/blob/master/examples/simple.rs) example shows how to use it\nin its simplest form. The [buttons](https://github.com/robertdodd/bevy_round_ui/blob/master/examples/buttons.rs)\nexample shows how to use it with interactive buttons and a panel. The\n[autosize](https://github.com/robertdodd/bevy_round_ui/blob/master/examples/autosize.rs) example demonstrates what it\nlooks like when nodes resize. The [circle](https://github.com/robertdodd/bevy_round_ui/blob/master/examples/circle.rs)\nexample shows how to make a circle shape. The\n[shapes](https://github.com/robertdodd/bevy_round_ui/blob/master/examples/shapes.rs) example shows a number of possible\nshapes. The [superellipse](https://github.com/robertdodd/bevy_round_ui/blob/master/examples/superellipse.rs) example\nshows how to use the superellipse material. The\n[compare](https://github.com/robertdodd/bevy_round_ui/blob/master/examples/compare.rs) example allows you to toggle\nbetween the `round_rect` and `superellipse` materials to see the difference between them. The\n[compare](https://github.com/robertdodd/bevy_round_ui/blob/master/examples/superellipse_transparency.rs) example\ndemonstrates the `superellipse` material working with transparency.\n\n## Features\n\nThe following cargo features (all enabled by default) can be used to control which materials are enabled:\n\n- `round_rect` - Enables the `RoundRectUiMaterial`.\n- `superellipse` - Enables the `SuperellipseUiMaterial`.\n\n## Basic Usage\n\n1. Add the `BevyRoundUiDefaultPlugins` plugin to the app.\n2. Create a `RoundRectUiMaterial` material.\n3. Spawn a `MaterialNodeBundle` using that material.\n\n```rust\nuse bevy::prelude::*;\nuse bevy_round_ui::prelude::*;\n\nfn main() {\n    App::new()\n        .add_plugins((DefaultPlugins, BevyRoundUiDefaultPlugins))\n        .add_systems(Startup, setup)\n        .run();\n}\n\nfn setup(mut commands: Commands, mut materials: ResMut\u003cAssets\u003cRoundRectUiMaterial\u003e\u003e) {\n    commands.spawn(Camera2dBundle::default());\n\n    commands.spawn(MaterialNodeBundle {\n        material: materials.add(RoundRectUiMaterial {\n            background_color: Color::hex(\"#F76161\").unwrap().into(),\n            border_color: Color::hex(\"#A53A3D\").unwrap().into(),\n            border_radius: RoundUiBorder::all(20.0).into(),\n            offset: RoundUiOffset::bottom(10.0).into(),\n        }),\n        style: Style {\n            width: Val::Px(200.),\n            height: Val::Px(200.),\n            ..default()\n        },\n        ..default()\n    });\n}\n```\n\n## Shapes\n\nThe [shapes](https://github.com/robertdodd/bevy_round_ui/blob/master/examples/shapes.rs) example demonstrates a number\nof possible shapes that can be achieved by changing the `RoundRectUiMaterial::border_radius` property.\n\n\u003e NOTE: Bordered circles are not perfect.\n\n![Screenshot of the shapes example](https://raw.githubusercontent.com/robertdodd/bevy_round_ui/master/images/shapes.png)\n\n## Superellipse\n\nThe [superellipse](https://github.com/robertdodd/bevy_round_ui/blob/master/examples/superellipse.rs) example\ndemonstrates using the `SuperellipseUiMaterial` material, which renders an approximate superellipse shape with an\noptional border.\n\nAlso see the [compare](https://github.com/robertdodd/bevy_round_ui/blob/master/examples/compare.rs) example, which\nallows you to toggle between the superellipse and round-rect materials to easily see their difference.\n\n![Screenshot of the superellipse example](https://raw.githubusercontent.com/robertdodd/bevy_round_ui/master/images/superellipse.png)\n\n## Compatible Bevy versions\n\n| `bevy_round_ui` | `bevy` |\n|:----------------|:-------|\n| `1.x` - `2.x`   | `0.13` |\n| `0.2`           | `0.13` |\n| `0.1`           | `0.12` |\n\n## License\n\nDual-licensed under either of\n\n- Apache License, Version 2.0,\n  ([LICENSE-APACHE](https://github.com/robertdodd/bevy_round_ui/blob/master/LICENSE-APACHE) or\n  https://www.apache.org/licenses/LICENSE-2.0)\n- MIT license ([LICENSE-MIT](https://github.com/robertdodd/bevy_round_ui/blob/master/LICENSE-MIT) or\n  https://opensource.org/licenses/MIT)\n\nat your option.\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as\ndefined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertdodd%2Fbevy_round_ui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobertdodd%2Fbevy_round_ui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertdodd%2Fbevy_round_ui/lists"}