Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/seldom-se/seldom_interop
Interoperability traits for Bevy components
https://github.com/seldom-se/seldom_interop
bevy bevy-engine rust
Last synced: about 2 months ago
JSON representation
Interoperability traits for Bevy components
- Host: GitHub
- URL: https://github.com/seldom-se/seldom_interop
- Owner: Seldom-SE
- License: apache-2.0
- Created: 2022-10-04T13:51:27.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-04T19:39:43.000Z (8 months ago)
- Last Synced: 2024-09-09T16:56:27.588Z (3 months ago)
- Topics: bevy, bevy-engine, rust
- Language: Rust
- Homepage:
- Size: 17.6 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# `seldom_interop`
[![Crates.io](https://img.shields.io/crates/v/seldom_interop.svg)](https://crates.io/crates/seldom_interop)
[![MIT/Apache 2.0](https://img.shields.io/badge/license-MIT%2FApache-blue.svg)](https://github.com/Seldom-SE/seldom_interop#license)
[![Crates.io](https://img.shields.io/crates/d/seldom_interop.svg)](https://crates.io/crates/seldom_interop)This plugin is no longer maintained! It's functionality has been merged into `seldom_map_nav`.
`seldom_interop` is a crate featuring interoperability traits for Bevy components. This helps
apps and third-party plugins, that use alternative components to represent concepts
such as position instead of using the built-in components such as `Transform`, interoperate
with other third-party plugins that operate on such components. It currently only features
traits for positional components, and I will add more traits as needed. If you want
other interoperability traits for your plugin, please submit an issue!## Features
* Position traits: `Position2` and `Position3`
## Usage
Add to your `Cargo.toml`
```toml
# Replace * with your desired version
[dependencies]
seldom_interop = "*"
```For apps and plugins that add components for which you would like to add interoperability,
implement relevant traits for your components. For plugins that would like to use components
in an interoperable way, add a type parameter to your plugin and relevant systems. For example:```Rust
use std::marker::PhantomData;use bevy::prelude::*;
use seldom_interop::prelude::*;struct MyPlugin = Transform>(PhantomData);
impl> Plugin for MyPlugin {
fn build(&self, app: &mut App) {
app.add_system(my_system::);
}
}fn my_system>(mut positions: Query<&mut T>, time: Res
## Compatibility
| Bevy | `seldom_interop` |
| ---- | ---------------- |
| 0.12 | 0.5 |
| 0.11 | 0.4 |
| 0.10 | 0.3 |
| 0.9 | 0.2 |
| 0.8 | 0.1 |## License
`seldom_interop` is dual-licensed under MIT and Apache 2.0 at your option.
## Contributing
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion
in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above,
without any additional terms or conditions.