feat: bevy_hanabi

This commit is contained in:
Muhammad Nauman Raza 2024-03-19 19:40:51 +00:00
parent 484763db5d
commit d2c5e0944c
Signed by: devraza
GPG key ID: 91EAD6081011574B
3 changed files with 113 additions and 1 deletions

111
Cargo.lock generated
View file

@ -129,10 +129,11 @@ dependencies = [
[[package]] [[package]]
name = "ambition" name = "ambition"
version = "0.2.0" version = "0.3.0"
dependencies = [ dependencies = [
"bevy", "bevy",
"bevy_egui", "bevy_egui",
"bevy_hanabi",
"lazy_static", "lazy_static",
] ]
@ -178,6 +179,12 @@ dependencies = [
"libc", "libc",
] ]
[[package]]
name = "anyhow"
version = "1.0.81"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247"
[[package]] [[package]]
name = "approx" name = "approx"
version = "0.5.1" version = "0.5.1"
@ -634,6 +641,27 @@ dependencies = [
"thiserror", "thiserror",
] ]
[[package]]
name = "bevy_hanabi"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f63879a7274ed0d629f7240b0acc4c262aca0276503bdc182552b0f69cba163"
dependencies = [
"anyhow",
"bevy",
"bitflags 2.4.2",
"bytemuck",
"copyless",
"naga",
"naga_oil",
"rand",
"rand_pcg",
"ron",
"serde",
"thiserror",
"typetag",
]
[[package]] [[package]]
name = "bevy_hierarchy" name = "bevy_hierarchy"
version = "0.13.0" version = "0.13.0"
@ -1420,6 +1448,12 @@ dependencies = [
"const_soft_float", "const_soft_float",
] ]
[[package]]
name = "copyless"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2df960f5d869b2dd8532793fde43eb5427cceb126c929747a26823ab0eeb536"
[[package]] [[package]]
name = "core-foundation" name = "core-foundation"
version = "0.9.4" version = "0.9.4"
@ -2198,6 +2232,12 @@ dependencies = [
"libc", "libc",
] ]
[[package]]
name = "inventory"
version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f958d3d68f4167080a18141e10381e7634563984a537f2a49a30fd8e53ac5767"
[[package]] [[package]]
name = "io-kit-sys" name = "io-kit-sys"
version = "0.4.0" version = "0.4.0"
@ -2906,6 +2946,12 @@ dependencies = [
"unicode-xid", "unicode-xid",
] ]
[[package]]
name = "ppv-lite86"
version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
[[package]] [[package]]
name = "presser" name = "presser"
version = "0.3.1" version = "0.3.1"
@ -2951,6 +2997,45 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "17fd96390ed3feda12e1dfe2645ed587e0bea749e319333f104a33ff62f77a0b" checksum = "17fd96390ed3feda12e1dfe2645ed587e0bea749e319333f104a33ff62f77a0b"
[[package]]
name = "rand"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
dependencies = [
"libc",
"rand_chacha",
"rand_core",
]
[[package]]
name = "rand_chacha"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
dependencies = [
"ppv-lite86",
"rand_core",
]
[[package]]
name = "rand_core"
version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
dependencies = [
"getrandom",
]
[[package]]
name = "rand_pcg"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "59cad018caf63deb318e5a4586d99a24424a364f40f1e5778c29aca23f4fc73e"
dependencies = [
"rand_core",
]
[[package]] [[package]]
name = "range-alloc" name = "range-alloc"
version = "0.1.3" version = "0.1.3"
@ -3454,6 +3539,30 @@ dependencies = [
"static_assertions", "static_assertions",
] ]
[[package]]
name = "typetag"
version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "661d18414ec032a49ece2d56eee03636e43c4e8d577047ab334c0ba892e29aaf"
dependencies = [
"erased-serde",
"inventory",
"once_cell",
"serde",
"typetag-impl",
]
[[package]]
name = "typetag-impl"
version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac73887f47b9312552aa90ef477927ff014d63d1920ca8037c6c1951eab64bb1"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.52",
]
[[package]] [[package]]
name = "unicode-bidi" name = "unicode-bidi"
version = "0.3.15" version = "0.3.15"

View file

@ -17,4 +17,5 @@ opt-level = 3
[dependencies] [dependencies]
bevy = { version = "0.13.0" } bevy = { version = "0.13.0" }
bevy_egui = "0.25.0" bevy_egui = "0.25.0"
bevy_hanabi = "0.10.0"
lazy_static = "1.4.0" lazy_static = "1.4.0"

View file

@ -1,4 +1,5 @@
use bevy::{core_pipeline::tonemapping::Tonemapping, prelude::*, window::*}; use bevy::{core_pipeline::tonemapping::Tonemapping, prelude::*, window::*};
use bevy_hanabi::prelude::*;
use bevy_egui::EguiPlugin; use bevy_egui::EguiPlugin;
@ -51,6 +52,7 @@ fn main() {
..default() ..default()
}), }),
EguiPlugin, EguiPlugin,
HanabiPlugin,
)) ))
.init_resource::<UiState>() .init_resource::<UiState>()
.init_resource::<OpenWindows>() .init_resource::<OpenWindows>()