physis + ship movement
This commit is contained in:
282
Cargo.lock
generated
282
Cargo.lock
generated
@@ -111,6 +111,12 @@ version = "0.5.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4aa90d7ce82d4be67b64039a3d588d38dbcc6736577de4a847025ce5b0c468d1"
|
checksum = "4aa90d7ce82d4be67b64039a3d588d38dbcc6736577de4a847025ce5b0c468d1"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "allocator-api2"
|
||||||
|
version = "0.2.21"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "alsa"
|
name = "alsa"
|
||||||
version = "0.9.1"
|
version = "0.9.1"
|
||||||
@@ -373,6 +379,38 @@ dependencies = [
|
|||||||
"v_frame",
|
"v_frame",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "avian3d"
|
||||||
|
version = "0.3.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "e8ba10c23fee3d432f3c6cf8d036e269d952b8840c1ca4fa6a021ab926786dc4"
|
||||||
|
dependencies = [
|
||||||
|
"avian_derive",
|
||||||
|
"bevy",
|
||||||
|
"bevy_heavy",
|
||||||
|
"bevy_math",
|
||||||
|
"bevy_transform_interpolation",
|
||||||
|
"bitflags 2.9.0",
|
||||||
|
"derive_more",
|
||||||
|
"itertools 0.13.0",
|
||||||
|
"nalgebra",
|
||||||
|
"parry3d",
|
||||||
|
"parry3d-f64",
|
||||||
|
"thread_local",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "avian_derive"
|
||||||
|
version = "0.2.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "12b257f601a1535e0d4a7a7796f535e3a13de62fd422b16dff7c14d27f0d4048"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro-error2",
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "avif-serialize"
|
name = "avif-serialize"
|
||||||
version = "0.8.3"
|
version = "0.8.3"
|
||||||
@@ -838,6 +876,16 @@ dependencies = [
|
|||||||
"tracing",
|
"tracing",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "bevy_heavy"
|
||||||
|
version = "0.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "34ccc861fea2ff58c67f4df119512e204050bd7631a3a9c65e1a5e9d162cce28"
|
||||||
|
dependencies = [
|
||||||
|
"bevy_math",
|
||||||
|
"bevy_reflect",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bevy_image"
|
name = "bevy_image"
|
||||||
version = "0.16.0"
|
version = "0.16.0"
|
||||||
@@ -1378,6 +1426,15 @@ dependencies = [
|
|||||||
"thiserror 2.0.12",
|
"thiserror 2.0.12",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "bevy_transform_interpolation"
|
||||||
|
version = "0.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "72c7c6c4e6a3d5415b3a29a17bd20c17cd0e2f068b96b24e263316d58d5346ea"
|
||||||
|
dependencies = [
|
||||||
|
"bevy",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bevy_ui"
|
name = "bevy_ui"
|
||||||
version = "0.16.0"
|
version = "0.16.0"
|
||||||
@@ -1493,7 +1550,7 @@ dependencies = [
|
|||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"regex",
|
"regex",
|
||||||
"rustc-hash",
|
"rustc-hash 1.1.0",
|
||||||
"shlex",
|
"shlex",
|
||||||
"syn",
|
"syn",
|
||||||
]
|
]
|
||||||
@@ -1899,7 +1956,7 @@ dependencies = [
|
|||||||
"fontdb",
|
"fontdb",
|
||||||
"log",
|
"log",
|
||||||
"rangemap",
|
"rangemap",
|
||||||
"rustc-hash",
|
"rustc-hash 1.1.0",
|
||||||
"rustybuzz",
|
"rustybuzz",
|
||||||
"self_cell",
|
"self_cell",
|
||||||
"smol_str",
|
"smol_str",
|
||||||
@@ -2145,6 +2202,15 @@ dependencies = [
|
|||||||
"bytemuck",
|
"bytemuck",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "ena"
|
||||||
|
version = "0.14.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "3d248bdd43ce613d87415282f69b9bb99d947d290b10962dd6c56233312c2ad5"
|
||||||
|
dependencies = [
|
||||||
|
"log",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "encase"
|
name = "encase"
|
||||||
version = "0.10.0"
|
version = "0.10.0"
|
||||||
@@ -2709,6 +2775,7 @@ version = "0.15.3"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3"
|
checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"allocator-api2",
|
||||||
"equivalent",
|
"equivalent",
|
||||||
"foldhash",
|
"foldhash",
|
||||||
"serde",
|
"serde",
|
||||||
@@ -3127,6 +3194,16 @@ dependencies = [
|
|||||||
"regex-automata 0.1.10",
|
"regex-automata 0.1.10",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "matrixmultiply"
|
||||||
|
version = "0.3.10"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a06de3016e9fae57a36fd14dba131fccf49f74b40b7fbdb472f96e361ec71a08"
|
||||||
|
dependencies = [
|
||||||
|
"autocfg",
|
||||||
|
"rawpointer",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "maybe-rayon"
|
name = "maybe-rayon"
|
||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
@@ -3210,7 +3287,7 @@ dependencies = [
|
|||||||
"indexmap",
|
"indexmap",
|
||||||
"log",
|
"log",
|
||||||
"pp-rs",
|
"pp-rs",
|
||||||
"rustc-hash",
|
"rustc-hash 1.1.0",
|
||||||
"spirv",
|
"spirv",
|
||||||
"strum",
|
"strum",
|
||||||
"termcolor",
|
"termcolor",
|
||||||
@@ -3232,12 +3309,40 @@ dependencies = [
|
|||||||
"once_cell",
|
"once_cell",
|
||||||
"regex",
|
"regex",
|
||||||
"regex-syntax 0.8.5",
|
"regex-syntax 0.8.5",
|
||||||
"rustc-hash",
|
"rustc-hash 1.1.0",
|
||||||
"thiserror 1.0.69",
|
"thiserror 1.0.69",
|
||||||
"tracing",
|
"tracing",
|
||||||
"unicode-ident",
|
"unicode-ident",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "nalgebra"
|
||||||
|
version = "0.33.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "26aecdf64b707efd1310e3544d709c5c0ac61c13756046aaaba41be5c4f66a3b"
|
||||||
|
dependencies = [
|
||||||
|
"approx",
|
||||||
|
"glam",
|
||||||
|
"matrixmultiply",
|
||||||
|
"nalgebra-macros",
|
||||||
|
"num-complex",
|
||||||
|
"num-rational",
|
||||||
|
"num-traits",
|
||||||
|
"simba",
|
||||||
|
"typenum",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "nalgebra-macros"
|
||||||
|
version = "0.2.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "254a5372af8fc138e36684761d3c0cdb758a4410e938babcff1c860ce14ddbfc"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ndk"
|
name = "ndk"
|
||||||
version = "0.8.0"
|
version = "0.8.0"
|
||||||
@@ -3404,6 +3509,15 @@ dependencies = [
|
|||||||
"num-traits",
|
"num-traits",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "num-complex"
|
||||||
|
version = "0.4.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495"
|
||||||
|
dependencies = [
|
||||||
|
"num-traits",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "num-derive"
|
name = "num-derive"
|
||||||
version = "0.4.2"
|
version = "0.4.2"
|
||||||
@@ -3855,6 +3969,60 @@ dependencies = [
|
|||||||
"windows-targets 0.52.6",
|
"windows-targets 0.52.6",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "parry3d"
|
||||||
|
version = "0.17.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "6aeb9659a05b1783fb2e9bc94f48225ae5b40817eb45b62569c0e4dd767a6e51"
|
||||||
|
dependencies = [
|
||||||
|
"approx",
|
||||||
|
"arrayvec",
|
||||||
|
"bitflags 2.9.0",
|
||||||
|
"downcast-rs 1.2.1",
|
||||||
|
"either",
|
||||||
|
"ena",
|
||||||
|
"log",
|
||||||
|
"nalgebra",
|
||||||
|
"num-derive",
|
||||||
|
"num-traits",
|
||||||
|
"ordered-float",
|
||||||
|
"rayon",
|
||||||
|
"rstar",
|
||||||
|
"rustc-hash 2.1.1",
|
||||||
|
"simba",
|
||||||
|
"slab",
|
||||||
|
"smallvec",
|
||||||
|
"spade",
|
||||||
|
"thiserror 1.0.69",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "parry3d-f64"
|
||||||
|
version = "0.17.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "c4484c8ad93ff03c0e57aa1a4f3ff5406ab6301a1eb838ef6dea90e94f00a6c7"
|
||||||
|
dependencies = [
|
||||||
|
"approx",
|
||||||
|
"arrayvec",
|
||||||
|
"bitflags 2.9.0",
|
||||||
|
"downcast-rs 1.2.1",
|
||||||
|
"either",
|
||||||
|
"ena",
|
||||||
|
"log",
|
||||||
|
"nalgebra",
|
||||||
|
"num-derive",
|
||||||
|
"num-traits",
|
||||||
|
"ordered-float",
|
||||||
|
"rayon",
|
||||||
|
"rstar",
|
||||||
|
"rustc-hash 2.1.1",
|
||||||
|
"simba",
|
||||||
|
"slab",
|
||||||
|
"smallvec",
|
||||||
|
"spade",
|
||||||
|
"thiserror 1.0.69",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "paste"
|
name = "paste"
|
||||||
version = "1.0.15"
|
version = "1.0.15"
|
||||||
@@ -4008,6 +4176,28 @@ dependencies = [
|
|||||||
"toml_edit",
|
"toml_edit",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "proc-macro-error-attr2"
|
||||||
|
version = "2.0.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "proc-macro-error2"
|
||||||
|
version = "2.0.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro-error-attr2",
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "proc-macro2"
|
name = "proc-macro2"
|
||||||
version = "1.0.95"
|
version = "1.0.95"
|
||||||
@@ -4189,6 +4379,12 @@ version = "0.6.2"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539"
|
checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rawpointer"
|
||||||
|
version = "0.2.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rayon"
|
name = "rayon"
|
||||||
version = "1.10.0"
|
version = "1.10.0"
|
||||||
@@ -4299,6 +4495,12 @@ version = "0.8.50"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "57397d16646700483b67d2dd6511d79318f9d057fdbd21a4066aeac8b41d310a"
|
checksum = "57397d16646700483b67d2dd6511d79318f9d057fdbd21a4066aeac8b41d310a"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "robust"
|
||||||
|
version = "1.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "4e27ee8bb91ca0adcf0ecb116293afa12d393f9c2b9b9cd54d33e8078fe19839"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rodio"
|
name = "rodio"
|
||||||
version = "0.20.1"
|
version = "0.20.1"
|
||||||
@@ -4327,12 +4529,29 @@ version = "0.20.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97"
|
checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rstar"
|
||||||
|
version = "0.12.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "421400d13ccfd26dfa5858199c30a5d76f9c54e0dba7575273025b43c5175dbb"
|
||||||
|
dependencies = [
|
||||||
|
"heapless",
|
||||||
|
"num-traits",
|
||||||
|
"smallvec",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustc-hash"
|
name = "rustc-hash"
|
||||||
version = "1.1.0"
|
version = "1.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
|
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rustc-hash"
|
||||||
|
version = "2.1.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustix"
|
name = "rustix"
|
||||||
version = "0.38.44"
|
version = "0.38.44"
|
||||||
@@ -4384,6 +4603,15 @@ version = "1.0.20"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
|
checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "safe_arch"
|
||||||
|
version = "0.7.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "96b02de82ddbe1b636e6170c21be622223aea188ef2e139be0a5b219ec215323"
|
||||||
|
dependencies = [
|
||||||
|
"bytemuck",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "same-file"
|
name = "same-file"
|
||||||
version = "1.0.6"
|
version = "1.0.6"
|
||||||
@@ -4486,6 +4714,19 @@ version = "1.3.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "simba"
|
||||||
|
version = "0.9.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b3a386a501cd104797982c15ae17aafe8b9261315b5d07e3ec803f2ea26be0fa"
|
||||||
|
dependencies = [
|
||||||
|
"approx",
|
||||||
|
"num-complex",
|
||||||
|
"num-traits",
|
||||||
|
"paste",
|
||||||
|
"wide",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "simd-adler32"
|
name = "simd-adler32"
|
||||||
version = "0.3.7"
|
version = "0.3.7"
|
||||||
@@ -4573,10 +4814,23 @@ dependencies = [
|
|||||||
name = "space-game"
|
name = "space-game"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"avian3d",
|
||||||
"bevy",
|
"bevy",
|
||||||
"bevy-inspector-egui",
|
"bevy-inspector-egui",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "spade"
|
||||||
|
version = "2.13.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "1ece03ff43cd2a9b57ebf776ea5e78bd30b3b4185a619f041079f4109f385034"
|
||||||
|
dependencies = [
|
||||||
|
"hashbrown",
|
||||||
|
"num-traits",
|
||||||
|
"robust",
|
||||||
|
"smallvec",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "spin"
|
name = "spin"
|
||||||
version = "0.9.8"
|
version = "0.9.8"
|
||||||
@@ -4983,6 +5237,12 @@ version = "1.0.3"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c"
|
checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "typenum"
|
||||||
|
version = "1.18.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-bidi"
|
name = "unicode-bidi"
|
||||||
version = "0.3.18"
|
version = "0.3.18"
|
||||||
@@ -5376,7 +5636,7 @@ dependencies = [
|
|||||||
"parking_lot",
|
"parking_lot",
|
||||||
"profiling",
|
"profiling",
|
||||||
"raw-window-handle",
|
"raw-window-handle",
|
||||||
"rustc-hash",
|
"rustc-hash 1.1.0",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
"thiserror 2.0.12",
|
"thiserror 2.0.12",
|
||||||
"wgpu-hal",
|
"wgpu-hal",
|
||||||
@@ -5419,7 +5679,7 @@ dependencies = [
|
|||||||
"range-alloc",
|
"range-alloc",
|
||||||
"raw-window-handle",
|
"raw-window-handle",
|
||||||
"renderdoc-sys",
|
"renderdoc-sys",
|
||||||
"rustc-hash",
|
"rustc-hash 1.1.0",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
"thiserror 2.0.12",
|
"thiserror 2.0.12",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
@@ -5442,6 +5702,16 @@ dependencies = [
|
|||||||
"web-sys",
|
"web-sys",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wide"
|
||||||
|
version = "0.7.32"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "41b5576b9a81633f3e8df296ce0063042a73507636cbe956c61133dd7034ab22"
|
||||||
|
dependencies = [
|
||||||
|
"bytemuck",
|
||||||
|
"safe_arch",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "winapi"
|
name = "winapi"
|
||||||
version = "0.3.9"
|
version = "0.3.9"
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ version = "0.1.0"
|
|||||||
edition = "2024"
|
edition = "2024"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
avian3d = { version = "0.3.0", features = ["debug-plugin"] }
|
||||||
bevy = { version = "0.16.0", features = ["file_watcher"] }
|
bevy = { version = "0.16.0", features = ["file_watcher"] }
|
||||||
# bevy_rapier3d = { version = "0.29.0", features = ["simd-stable", "parallel"] }
|
# bevy_rapier3d = { version = "0.29.0", features = ["simd-stable", "parallel"] }
|
||||||
bevy-inspector-egui = "0.31.0"
|
bevy-inspector-egui = "0.31.0"
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
use std::f32::consts::FRAC_PI_2;
|
use std::f32::consts::FRAC_PI_2;
|
||||||
|
|
||||||
|
use avian3d::{PhysicsPlugins, prelude::*};
|
||||||
use bevy::{
|
use bevy::{
|
||||||
input::mouse::MouseMotion,
|
input::mouse::MouseMotion,
|
||||||
prelude::*,
|
prelude::*,
|
||||||
@@ -20,13 +21,18 @@ pub struct CameraPitch(pub f32);
|
|||||||
#[derive(Component)]
|
#[derive(Component)]
|
||||||
pub struct Unfocused;
|
pub struct Unfocused;
|
||||||
|
|
||||||
|
#[derive(Component)]
|
||||||
|
pub struct Ship;
|
||||||
|
|
||||||
impl Plugin for GamePlugin {
|
impl Plugin for GamePlugin {
|
||||||
fn build(&self, app: &mut bevy::app::App) {
|
fn build(&self, app: &mut bevy::app::App) {
|
||||||
// app.add_plugins(RapierPhysicsPlugin::<NoUserData>::default());
|
// app.add_plugins(RapierPhysicsPlugin::<NoUserData>::default());
|
||||||
|
app.add_plugins((PhysicsPlugins::default(), PhysicsDebugPlugin::default()));
|
||||||
|
app.insert_resource(Gravity::ZERO);
|
||||||
app.add_systems(Startup, (setup_scene, spawn_ship));
|
app.add_systems(Startup, (setup_scene, spawn_ship));
|
||||||
|
|
||||||
app.add_systems(Update, ((camera_yaw, camera_pitch).chain(), camera_toggle, fly_camera));
|
app.add_systems(Update, ((camera_yaw, camera_pitch).chain(), camera_toggle, fly_camera));
|
||||||
|
app.add_systems(Update, ship_controls);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,7 +71,13 @@ fn setup_scene(
|
|||||||
|
|
||||||
let cube = meshes.add(Cuboid::new(100.0, 0.1, 100.0));
|
let cube = meshes.add(Cuboid::new(100.0, 0.1, 100.0));
|
||||||
let material = materials.add(Color::WHITE);
|
let material = materials.add(Color::WHITE);
|
||||||
commands.spawn((Mesh3d(cube), MeshMaterial3d(material), Transform::default()));
|
commands.spawn((
|
||||||
|
Mesh3d(cube),
|
||||||
|
MeshMaterial3d(material),
|
||||||
|
Transform::default(),
|
||||||
|
RigidBody::Static,
|
||||||
|
Collider::cuboid(100.0, 0.1, 100.0),
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
fn spawn_ship(
|
fn spawn_ship(
|
||||||
@@ -81,35 +93,44 @@ fn spawn_ship(
|
|||||||
Mesh3d(meshes.add(Cuboid::new(3.0, 0.1, 6.0))),
|
Mesh3d(meshes.add(Cuboid::new(3.0, 0.1, 6.0))),
|
||||||
MeshMaterial3d(material.clone()),
|
MeshMaterial3d(material.clone()),
|
||||||
Name::new("Ship"),
|
Name::new("Ship"),
|
||||||
|
Ship,
|
||||||
|
LinearDamping::default(),
|
||||||
|
AngularDamping::default(),
|
||||||
Transform::from_xyz(0.0, 1.0, 0.0),
|
Transform::from_xyz(0.0, 1.0, 0.0),
|
||||||
|
RigidBody::Dynamic,
|
||||||
children![
|
children![
|
||||||
(
|
(
|
||||||
Name::new("Back Wall"),
|
Name::new("Back Wall"),
|
||||||
Mesh3d(meshes.add(Cuboid::new(3.0, 2.0, 0.1))),
|
Mesh3d(meshes.add(Cuboid::new(3.0, 2.0, 0.1))),
|
||||||
|
Collider::cuboid(3.0, 2.0, 0.1),
|
||||||
MeshMaterial3d(material.clone()),
|
MeshMaterial3d(material.clone()),
|
||||||
Transform::from_xyz(0.0, 1.0, 6.0 / 2.0),
|
Transform::from_xyz(0.0, 1.0, 6.0 / 2.0),
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
Name::new("Front Window"),
|
Name::new("Front Window"),
|
||||||
Mesh3d(meshes.add(Cuboid::new(3.0, 2.0, 0.1))),
|
Mesh3d(meshes.add(Cuboid::new(3.0, 2.0, 0.1))),
|
||||||
|
Collider::cuboid(3.0, 2.0, 0.1),
|
||||||
MeshMaterial3d(window_material),
|
MeshMaterial3d(window_material),
|
||||||
Transform::from_xyz(0.0, 1.0, -6.0 / 2.0),
|
Transform::from_xyz(0.0, 1.0, -6.0 / 2.0),
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
Name::new("Right Wall"),
|
Name::new("Right Wall"),
|
||||||
Mesh3d(meshes.add(Cuboid::new(0.1, 2.0, 6.0))),
|
Mesh3d(meshes.add(Cuboid::new(0.1, 2.0, 6.0))),
|
||||||
|
Collider::cuboid(0.1, 2.0, 6.0),
|
||||||
MeshMaterial3d(material.clone()),
|
MeshMaterial3d(material.clone()),
|
||||||
Transform::from_xyz(3.0 / 2.0, 1.0, 0.0),
|
Transform::from_xyz(3.0 / 2.0, 1.0, 0.0),
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
Name::new("Left Wall"),
|
Name::new("Left Wall"),
|
||||||
Mesh3d(meshes.add(Cuboid::new(0.1, 2.0, 6.0))),
|
Mesh3d(meshes.add(Cuboid::new(0.1, 2.0, 6.0))),
|
||||||
|
Collider::cuboid(0.1, 2.0, 6.0),
|
||||||
MeshMaterial3d(material.clone()),
|
MeshMaterial3d(material.clone()),
|
||||||
Transform::from_xyz(-3.0 / 2.0, 1.0, 0.0),
|
Transform::from_xyz(-3.0 / 2.0, 1.0, 0.0),
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
Name::new("Roof"),
|
Name::new("Roof"),
|
||||||
Mesh3d(meshes.add(Cuboid::new(3.0, 0.1, 6.0))),
|
Mesh3d(meshes.add(Cuboid::new(3.0, 0.1, 6.0))),
|
||||||
|
Collider::cuboid(3.0, 0.1, 6.0),
|
||||||
MeshMaterial3d(material.clone()),
|
MeshMaterial3d(material.clone()),
|
||||||
Transform::from_xyz(0.0, 2.0, 0.0),
|
Transform::from_xyz(0.0, 2.0, 0.0),
|
||||||
)
|
)
|
||||||
@@ -119,11 +140,10 @@ fn spawn_ship(
|
|||||||
|
|
||||||
pub fn camera_toggle(
|
pub fn camera_toggle(
|
||||||
key: Res<ButtonInput<KeyCode>>,
|
key: Res<ButtonInput<KeyCode>>,
|
||||||
window_query: Single<&mut Window, With<PrimaryWindow>>,
|
mut window: Single<&mut Window, With<PrimaryWindow>>,
|
||||||
camera: Single<Entity, With<CameraRoot>>,
|
camera: Single<Entity, With<CameraRoot>>,
|
||||||
mut commands: Commands,
|
mut commands: Commands,
|
||||||
) {
|
) {
|
||||||
let mut window = window_query.into_inner();
|
|
||||||
if key.just_pressed(KeyCode::Escape) {
|
if key.just_pressed(KeyCode::Escape) {
|
||||||
if window.cursor_options.visible {
|
if window.cursor_options.visible {
|
||||||
commands.entity(camera.into_inner()).remove::<Unfocused>();
|
commands.entity(camera.into_inner()).remove::<Unfocused>();
|
||||||
@@ -197,3 +217,56 @@ fn get_mouse_delta(mut mouse_motion: EventReader<MouseMotion>) -> Vec2 {
|
|||||||
}
|
}
|
||||||
return delta;
|
return delta;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn ship_controls(
|
||||||
|
ship_query: Single<
|
||||||
|
(
|
||||||
|
&Transform,
|
||||||
|
&mut LinearVelocity,
|
||||||
|
&mut AngularVelocity,
|
||||||
|
&mut LinearDamping,
|
||||||
|
&mut AngularDamping,
|
||||||
|
),
|
||||||
|
With<Ship>,
|
||||||
|
>,
|
||||||
|
window: Single<&Window, With<PrimaryWindow>>,
|
||||||
|
key: Res<ButtonInput<KeyCode>>,
|
||||||
|
time: Res<Time>,
|
||||||
|
) {
|
||||||
|
if !window.cursor_options.visible {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let (transform, mut vel, mut ang, mut ldamp, mut adamp) = ship_query.into_inner();
|
||||||
|
|
||||||
|
let mut move_vec = Vec3::ZERO;
|
||||||
|
|
||||||
|
if key.pressed(KeyCode::KeyW) {
|
||||||
|
move_vec.z = -1.0;
|
||||||
|
} else if key.pressed(KeyCode::KeyS) {
|
||||||
|
move_vec.z = 1.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if key.pressed(KeyCode::KeyA) {
|
||||||
|
move_vec.x = -1.0;
|
||||||
|
} else if key.pressed(KeyCode::KeyD) {
|
||||||
|
move_vec.x = 1.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if key.pressed(KeyCode::Space) {
|
||||||
|
move_vec.y = 1.0;
|
||||||
|
} else if key.pressed(KeyCode::ShiftLeft) {
|
||||||
|
move_vec.y = -1.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if key.pressed(KeyCode::ControlLeft) {
|
||||||
|
ldamp.0 = 0.8;
|
||||||
|
adamp.0 = 0.8;
|
||||||
|
} else {
|
||||||
|
ldamp.0 = 0.0;
|
||||||
|
adamp.0 = 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
move_vec = transform.rotation * move_vec.normalize_or_zero();
|
||||||
|
|
||||||
|
vel.0 += move_vec * time.delta_secs();
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user