Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yet another reorg #8

Closed
wants to merge 67 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
c5de4a3
select config from gui
philiplinden Feb 24, 2024
8552601
checkpoint: feeling out bevy implementations
philiplinden Oct 28, 2024
22a6f80
bevy: round 1
philiplinden Nov 8, 2024
14bd87f
bevy: round 2
philiplinden Nov 8, 2024
ef58ca7
bevy: round 3
philiplinden Nov 8, 2024
ad84a63
docs: devlog for 2024-11-07
philiplinden Nov 8, 2024
7e2d6cc
bevy: round 4
philiplinden Nov 8, 2024
9523bcd
bevy: round 5
philiplinden Nov 8, 2024
fda951f
checkpoint
philiplinden Nov 3, 2024
8a87976
docs: rm anims
philiplinden Nov 8, 2024
0d3d5da
bevy: round 6 - this is broken
philiplinden Nov 8, 2024
6f6712b
bevy: round 7 - fix the ui, gut everything else
philiplinden Nov 9, 2024
bddf13f
bevy: migrate atmo to use position, balloon to use components
philiplinden Nov 9, 2024
feb2d6c
bevy: start migrating dynamics to avian
philiplinden Nov 9, 2024
ec6bda6
bevy: structured thermodynamics
philiplinden Nov 10, 2024
8d8d295
cleanup
philiplinden Nov 10, 2024
c0f65c0
bevy: add minor windows for help dialogs
philiplinden Nov 10, 2024
0c89762
bevy: a little beautification
philiplinden Nov 11, 2024
3ec10c1
bevy: a little more separation of concerns
philiplinden Nov 11, 2024
2f4648e
bevy: trying to make volume work
philiplinden Nov 11, 2024
43e4c27
bevy: split thermodynamics and forces into components
philiplinden Nov 11, 2024
6134125
bevy: clean
philiplinden Nov 13, 2024
0dfd9d9
physics: ball hits the ground
philiplinden Nov 13, 2024
064a3c8
physics: buoyancy and weight are working
philiplinden Nov 13, 2024
dc88c9d
docs: corrections in the devlog
philiplinden Nov 13, 2024
56ed0f3
ci: add bevy deps
philiplinden Nov 13, 2024
99642d9
ci: replace cache step with the one from leafwing
philiplinden Nov 13, 2024
eb141a6
ci: i guess docs need sound?
philiplinden Nov 13, 2024
edb98d3
cleanup: disallow dead code in most places, add placeholders for payload
philiplinden Nov 14, 2024
4d88331
physics: impl buoyancy and weight as externalforces
philiplinden Nov 14, 2024
a38fe41
cleanup
philiplinden Nov 14, 2024
307ed7b
cleanup
philiplinden Nov 14, 2024
8cf8096
ui: drop egui, add iyes_perf_ui
philiplinden Nov 16, 2024
365e37e
physics: restructure force systems
philiplinden Nov 16, 2024
f305d5b
physics: restructure force systems
philiplinden Nov 16, 2024
e4d7121
checkpoint
philiplinden Nov 16, 2024
499710a
physics: start drag calc module
philiplinden Nov 17, 2024
aac9d94
physics: drag
philiplinden Nov 17, 2024
89180a6
physics: force refactor
philiplinden Nov 17, 2024
a17b046
aero: placeholder drag from mesh
philiplinden Nov 17, 2024
fb5c6e7
aero: checkpoint
philiplinden Nov 17, 2024
b087019
physics: forces are reliable yay
philiplinden Nov 18, 2024
88ce33b
ui: sim state monitoring, play/pause
philiplinden Nov 19, 2024
81c9930
physics: fix drag force (placeholder)
philiplinden Nov 19, 2024
696266b
doc: more resources
philiplinden Nov 22, 2024
56c23ee
mod: remove the assets module for now
philiplinden Nov 22, 2024
6c18c04
lint: clippy
philiplinden Nov 22, 2024
db5fc7e
Merge pull request #1 from philiplinden/bevy
philiplinden Nov 22, 2024
5685be7
doc: update readme
philiplinden Nov 22, 2024
75497b9
checkpoint: 2024-11-23 morning
philiplinden Nov 23, 2024
e7a6f27
checkpoint: 2024-11-23 afternoon
philiplinden Nov 23, 2024
e08cf94
bevy: get working on bevy 0.15.0-rc.3
philiplinden Nov 24, 2024
f6a49a9
bevy: reintroduce bevy trait query on 0.15 branch
philiplinden Nov 24, 2024
d3c2f20
balloon: nice
philiplinden Nov 24, 2024
2dd349d
checkpoint
philiplinden Nov 24, 2024
c80aa64
ui: some debug ui practice
philiplinden Nov 25, 2024
8467b39
checkpoint: trying to debug volume change over time
philiplinden Nov 25, 2024
3de7b41
ui: add a gas monitor
philiplinden Nov 27, 2024
a284399
physics: fix drag, volume, density, and buoyancy
philiplinden Nov 27, 2024
019fb96
Merge pull request #2 from philiplinden/bevy_0.15.0-rc.3
philiplinden Nov 27, 2024
2db5450
ci: skip deploys
philiplinden Nov 27, 2024
119dade
ui: add gizmos, flatten app module (#3)
philiplinden Nov 28, 2024
ae590a3
Debug gizmos and time controls (#4)
philiplinden Nov 29, 2024
1c697fb
Bevy 0.15 release (#5)
philiplinden Nov 30, 2024
39d4cfe
bunch a stuff (#6)
philiplinden Dec 8, 2024
e206cdd
reorg: multiple crates
philiplinden Dec 16, 2024
60bfc4e
checkpoint
philiplinden Dec 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Build

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always
RUST_LOG: info

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Populate target directory from cache
uses: Leafwing-Studios/cargo-cache@v2
with:
sweep-cache: true

- name: Install Bevy dependencies
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev

- name: Cargo Check
run: RUSTFLAGS="$RUSTFLAGS -A dead_code" cargo check

- name: Cargo Build
run: cargo build --release --all-features

doc:
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Install Bevy dependencies
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev

- name: Populate target directory from cache
uses: Leafwing-Studios/cargo-cache@v2
with:
sweep-cache: true

- name: Cargo Doc
run: cargo doc --no-deps

- uses: actions/upload-artifact@v4
with:
name: doc
path: target/doc
111 changes: 0 additions & 111 deletions .github/workflows/cargo.yml

This file was deleted.

66 changes: 66 additions & 0 deletions .github/workflows/extras.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Extras

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always
RUST_LOG: info

jobs:

book:
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v2

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v2
with:
mdbook-version: '0.4.10'

- run: mdbook build

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book

# deploy:
# if: github.ref == 'refs/heads/main'
# needs: doc
# # Grant GITHUB_TOKEN the permissions required to make a Pages deployment
# permissions:
# pages: write # to deploy to Pages
# id-token: write # to verify the deployment originates from an appropriate source
# # Deploy to the github-pages environment
# environment:
# name: github-pages
# url: ${{ steps.deployment.outputs.page_url }}
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0

# - uses: actions/download-artifact@v4
# with:
# name: doc
# path: ${{ github.workspace }}

# - name: Upload Pages artifact
# uses: actions/upload-pages-artifact@v3
# with:
# path: target/doc

# - name: Deploy to GitHub Pages
# id: deployment
# uses: actions/deploy-pages@v4
# if: github.event_name != 'pull_request'
139 changes: 100 additions & 39 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,50 +1,111 @@
[package]
name = "yahs"
description = "Yet Another HAB Simulator"
version = "0.4.0"
authors = ["Philip Linden <lindenphilipj@gmail.com>"]
version = "0.2.0"
edition = "2021"
readme = "README.md"
license-file = "LICENSE"
license = "MIT or Apache-2.0"
edition = "2021"

default-run = "yahs"

# When importing this crate as a dependency, use the simulator library as "yahs"
[lib]
name = "yahs"
path = "src/simulator/src/lib.rs"

# When running this project as a CLI, use the CLI binary as "yahs"
[[bin]]
name = "yahs"
path = "src/cli/src/main.rs"

# These are the dependencies when building the CLI from the project root
[dependencies]
# Simulator dependencies
yahs-simulator = { path = "src/simulator" }
bevy = { workspace = true }
avian3d = { workspace = true }
bevy-trait-query = { workspace = true }

# CLI dependencies
yahs-cli = { path = "src/cli" }
bevy_ratatui = "0.7.0"
ratatui = "0.29"
color-eyre = "0.6.3"
crossterm = "0.28.1"

[features]
default = ["gui"]
gui = [
"egui",
"egui_extras",
"egui_plot",
"eframe",
"emath",
"rfd",
default = ["dev"]
dev = ["yahs-cli/dev", "yahs-simulator/dev"]

[workspace.package]
authors = ["Philip Linden <lindenphilipj@gmail.com>"]
edition = "2021"
license = "MIT or Apache-2.0"

[workspace]
resolver = "2" # Important for Bevy
members = [
"src/simulator",
"src/cli",
"src/ui"
]

[dependencies]
pretty_env_logger = "0.5.0"
libm = "0.2.1"
toml = "0.8.10"
clap = { version = "4.1", default-features = false, features = [
"derive",
"std",
"help",
"usage",
"error-context",
"suggestions",
[workspace.dependencies]
# Shared dependencies with fixed versions
bevy = { version = "0.15.0", default-features = false, features = [
"bevy_state", "multi_threaded"
] }
csv = "1.2.1"
serde = { version = "1.0.196", features = ["derive"] }
log = { version = "0.4.20", features = ["release_max_level_debug"] }
egui = { version = "0.26.2", features = ["log", "serde"], optional = true }
egui_plot = { version = "0.26.2", features = ["serde"], optional = true }
eframe = { version = "0.26.2", features = ["persistence"], optional = true }
emath = { version = "0.26.2", optional = true }
egui_extras = { version = "0.26.2", features = [
"chrono",
"datepicker",
"file",
], optional = true }
rfd = { version = "0.14.0", optional = true }
ultraviolet = { version = "0.9.2", features = ["serde"] }
avian3d = { git = "https://github.com/Jondolf/avian.git", branch = "main" }
bevy-trait-query = "0.7.0"

[[bin]]
name = "yahs"
path = "src/main.rs"
# -----------------------------------------------------------------------------
# Some Bevy optimizations
# -----------------------------------------------------------------------------

# Idiomatic Bevy code often triggers these lints, and the CI workflow treats
# them as errors. In some cases they may still signal poor code quality however,
# so consider commenting out these lines.
[lints.clippy]
# Bevy supplies arguments to systems via dependency injection, so it's
# natural for systems to request more than 7 arguments -- which triggers
# this lint.
too_many_arguments = "allow"
# Queries that access many components may trigger this lint.
type_complexity = "allow"

# Compile with Performance Optimizations:
# https://bevyengine.org/learn/quick-start/getting-started/setup/#compile-with-performance-optimizations

# Enable a small amount of optimization in the dev profile for our code.
[profile.dev]
opt-level = 1

# Enable a large amount of optimization in the dev profile for dependencies.
[profile.dev.package."*"]
opt-level = 3
debug = false

# The default profile is optimized for Wasm builds because that's what [Trunk
# reads](https://github.com/trunk-rs/trunk/issues/605). Optimize for size in the
# wasm-release profile to reduce load times and bandwidth usage on web.
[profile.release]
# Compile the entire crate as one unit. Slows compile times, marginal
# improvements.
codegen-units = 1
# Optimize with size in mind (also try "z", sometimes it is better).
# Slightly slows compile times, great improvements to file size and runtime
# performance.
opt-level = "s"
# Strip all debugging information from the binary to slightly reduce file
# size.
strip = "debuginfo"

# Override some settings for native builds.
[profile.release-native]
# Default to release profile values.
inherits = "release"
# Optimize with performance in mind.
opt-level = 3
# Keep debug information in the binary.
strip = "none"
File renamed without changes.
Loading
Loading