Skip to content

repo: remove bevy dependency from buoy-physics (breaks ui)#42

Open
philiplinden wants to merge 2 commits into
mainfrom
minimal-bevy
Open

repo: remove bevy dependency from buoy-physics (breaks ui)#42
philiplinden wants to merge 2 commits into
mainfrom
minimal-bevy

Conversation

@philiplinden

Copy link
Copy Markdown
Owner

This pull request refactors the buoy-physics crate to remove its dependency on Bevy and Avian3D, making it a standalone physics library. It also introduces new geometry and force calculation utilities, simplifies the codebase, and updates the crate's version and description. The most significant changes are grouped below:

Decoupling from Bevy and Avian3D:

  • Removed all Bevy and Avian3D dependencies from crates/buoy-physics/Cargo.toml, all source files, and the workspace member list in Cargo.toml. The crate now uses only glam, log, serde, and uom for math, logging, serialization, and units. ([[1]](https://github.com/philiplinden/buoy/pull/42/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542L5-R5), [[2]](https://github.com/philiplinden/buoy/pull/42/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542L39), [[3]](https://github.com/philiplinden/buoy/pull/42/files#diff-e38a006a2863fbaa4eef61316ea66fa47aa22f18498fee627f1e6bed4016e3e4L3-R16), [[4]](https://github.com/philiplinden/buoy/pull/42/files#diff-808ab521f89c11581ced6590bbdcd4b5e07d4cae1d5bceadca467522190b331dL8-L26), [[5]](https://github.com/philiplinden/buoy/pull/42/files#diff-c4009bef3ffcb157a2b30ab7f1a0540877198b047b5bc59805485095a375c68aL1-L92), [[6]](https://github.com/philiplinden/buoy/pull/42/files#diff-ee9950feae77d2adf90b011d00d62ab49db500bfd1d64e3afbd64bc8eae7554dL1-R21), [[7]](https://github.com/philiplinden/buoy/pull/42/files#diff-74818c16f61d460c5f919ed47010a5d27b07ba403f0448f11ff07421689754d2L2-L8), [[8]](https://github.com/philiplinden/buoy/pull/42/files#diff-74818c16f61d460c5f919ed47010a5d27b07ba403f0448f11ff07421689754d2L27-L30), [[9]](https://github.com/philiplinden/buoy/pull/42/files#diff-74818c16f61d460c5f919ed47010a5d27b07ba403f0448f11ff07421689754d2L53-R44), [[10]](https://github.com/philiplinden/buoy/pull/42/files#diff-74818c16f61d460c5f919ed47010a5d27b07ba403f0448f11ff07421689754d2L101-R93), [[11]](https://github.com/philiplinden/buoy/pull/42/files#diff-5099f071fb1f0487b232d3c89fef59d934fdc443d6e27689a7ba6ca96d876b8bL6-R7))

Physics and Force Calculations:

  • Introduced a new force.rs module with standalone functions for drag, buoyancy, gravity, and weight calculations using glam::Vec3 and uom types. ([crates/buoy-physics/src/force.rsR1-R50](https://github.com/philiplinden/buoy/pull/42/files#diff-69aac7b2b54d51eb071b3e204fed808e249f3ac3629335686abccce06467e99eR1-R50))
  • Removed the previous forces.rs module, including its Bevy-based plugin and system logic. ([[1]](https://github.com/philiplinden/buoy/pull/42/files#diff-c4009bef3ffcb157a2b30ab7f1a0540877198b047b5bc59805485095a375c68aL1-L92), [[2]](https://github.com/philiplinden/buoy/pull/42/files#diff-5099f071fb1f0487b232d3c89fef59d934fdc443d6e27689a7ba6ca96d876b8bL6-R7))

Geometry Utilities:

  • Added new geometry functions in geometry.rs for generating cuboid corners, calculating volumes for cuboids, cylinders, capsules, and convex polyhedra, and projecting areas for drag calculations. ([[1]](https://github.com/philiplinden/buoy/pull/42/files#diff-ee9950feae77d2adf90b011d00d62ab49db500bfd1d64e3afbd64bc8eae7554dL1-R21), [[2]](https://github.com/philiplinden/buoy/pull/42/files#diff-ee9950feae77d2adf90b011d00d62ab49db500bfd1d64e3afbd64bc8eae7554dR42-R96), [[3]](https://github.com/philiplinden/buoy/pull/42/files#diff-ee9950feae77d2adf90b011d00d62ab49db500bfd1d64e3afbd64bc8eae7554dL59-L103), [[4]](https://github.com/philiplinden/buoy/pull/42/files#diff-ee9950feae77d2adf90b011d00d62ab49db500bfd1d64e3afbd64bc8eae7554dL119-L192), [[5]](https://github.com/philiplinden/buoy/pull/42/files#diff-ee9950feae77d2adf90b011d00d62ab49db500bfd1d64e3afbd64bc8eae7554dL227-L337))
  • Refactored and consolidated volume and area calculation logic for various shapes, removing Bevy and Avian3D types. ([crates/buoy-physics/src/geometry.rsL227-L337](https://github.com/philiplinden/buoy/pull/42/files#diff-ee9950feae77d2adf90b011d00d62ab49db500bfd1d64e3afbd64bc8eae7554dL227-L337))

API and Type Simplification:

  • Removed Bevy-specific traits (e.g., Component, Resource) from physics types such as Atmosphere, GasSpecies, and IdealGas. ([[1]](https://github.com/philiplinden/buoy/pull/42/files#diff-808ab521f89c11581ced6590bbdcd4b5e07d4cae1d5bceadca467522190b331dL8-L26), [[2]](https://github.com/philiplinden/buoy/pull/42/files#diff-74818c16f61d460c5f919ed47010a5d27b07ba403f0448f11ff07421689754d2L53-R44), [[3]](https://github.com/philiplinden/buoy/pull/42/files#diff-74818c16f61d460c5f919ed47010a5d27b07ba403f0448f11ff07421689754d2L101-R93))
  • Updated the crate version to 0.4.0 and clarified the description to reflect the removal of Bevy dependency. ([crates/buoy-physics/Cargo.tomlL3-R16](https://github.com/philiplinden/buoy/pull/42/files#diff-e38a006a2863fbaa4eef61316ea66fa47aa22f18498fee627f1e6bed4016e3e4L3-R16))

Project Structure and Maintenance:

  • Removed unused or deprecated plugin logic and configuration types, and updated the workspace member list to comment out the UI crate. ([[1]](https://github.com/philiplinden/buoy/pull/42/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542L5-R5), [[2]](https://github.com/philiplinden/buoy/pull/42/files#diff-5099f071fb1f0487b232d3c89fef59d934fdc443d6e27689a7ba6ca96d876b8bL6-R7))

Let me know if you'd like more details on any of these changes!

@github-actions

Copy link
Copy Markdown

Changelog

Notable changes to this project will be documented in this file.

0.3.1 - 2025-08-14

⚙️ Repository

  • Remove bevy dependency from buoy-physics (97a377b)
📜 Full Changelog

Changelog

Notable changes to this project will be documented in this file.

0.3.0 - 2025-07-28

🧪 Experimental

⚙️ Repository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant