Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ickshonpe/bundle_bundle
https://github.com/ickshonpe/bundle_bundle
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/ickshonpe/bundle_bundle
- Owner: ickshonpe
- License: mit
- Created: 2022-11-25T16:00:41.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2022-11-30T12:38:13.000Z (about 2 years ago)
- Last Synced: 2024-12-17T08:14:28.652Z (25 days ago)
- Language: Rust
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bundle_bundle
Extension trait for Bundle with one method `bundle` that provides an alternative to tuples for building anonymous bundles.
Supports Bevy 0.9
# Usage
Add to your project with:
```
cargo add bundle_bundle
```Now where you used a tuple struct:
```rust
commands.spawn((
Text2dBundle::from_section("message", text_style),
Background(Color::NAVY),
MessageMarkerComponent,
));
```You can instead use:
```rust
use bundle_bundle::BundleBundleExt;commands.spawn(
Text2dBundle::from_section("message", text_style)
.bundle(BackgroundColor(Color::NAVY))
.bundle(MessageMarkerComponent)
);
```# Examples
```
cargo run --example hello_world
```