Crates.io | bevy_generative |
lib.rs | bevy_generative |
version | 0.3.1 |
source | src |
created_at | 2024-01-06 16:31:11.096946 |
updated_at | 2024-08-23 12:50:02.11926 |
description | Procedural generation in Bevy |
homepage | https://github.com/manankarnik/bevy_generative |
repository | https://github.com/manankarnik/bevy_generative |
max_upload_size | |
id | 1091047 |
size | 80,859 |
bevy_generative
is a plugin written for the bevy engine that allows real-time procedural generation of maps, textures, terrain, planets and more!
rfd
for native, javascript blob for wasm)serde
Check out Procedra [Source], a procedural generation web application that allows you to experiment with all the parameters and generate assets in real-time!
Add bevy_generative
to your rust project
cargo add bevy_generative
use bevy::prelude::*;
use bevy_generative::map::{MapBundle, MapPlugin};
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugins(MapPlugin)
.add_systems(Startup, setup)
.run();
}
fn setup(mut commands: Commands) {
commands.spawn(Camera2dBundle::default());
commands.spawn(MapBundle::default());
}
use bevy::prelude::*;
use bevy_generative::terrain::{TerrainBundle, TerrainPlugin};
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugins(TerrainPlugin)
.add_systems(Startup, setup)
.run();
}
fn setup(mut commands: Commands) {
commands.spawn(PointLightBundle {
transform: Transform::from_xyz(-2.0, 2.5, 5.0).looking_at(Vec3::ZERO, Vec3::Y),
..default()
});
commands.spawn(Camera3dBundle {
transform: Transform::from_xyz(-2.0, 2.5, 5.0).looking_at(Vec3::ZERO, Vec3::Y),
..default()
});
commands.spawn(TerrainBundle::default());
}
use bevy::prelude::*;
use bevy_generative::planet::{PlanetBundle, PlanetPlugin};
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugins(PlanetPlugin)
.add_systems(Startup, setup)
.run();
}
fn setup(mut commands: Commands) {
commands.spawn(PointLightBundle {
transform: Transform::from_xyz(-2.0, 2.5, 5.0).looking_at(Vec3::ZERO, Vec3::Y),
..default()
});
commands.spawn(Camera3dBundle {
transform: Transform::from_xyz(-2.0, 2.5, 5.0).looking_at(Vec3::ZERO, Vec3::Y),
..default()
});
commands.spawn(PlanetBundle::default());
}
bevy | bevy_generative |
---|---|
0.14 | 0.3, main |
0.13 | 0.2 |
0.12 | 0.1 |
Contributions are welcome! Issues, pull requests, feature requests and bug reports are appreciated. If you'd like to contribute to this project, please follow these steps:
Please ensure your code passes all CI checks and includes relevant tests if applicable. Thank you for helping improve bevy_generative
!
Your contribution will be dual-licensed as mentioned in the License section below.
All code in this repository is dual-licensed under either:
at your option. This means you can select the license you prefer! This dual-licensing approach is the de-facto standard in the Rust ecosystem and there are very good reasons to include both.