forked from Brickworks/yahs
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
41 changed files
with
469 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,64 @@ | ||
[package] | ||
name = "yahs" | ||
description = "Yet Another HAB Simulator" | ||
authors = ["Philip Linden <[email protected]>"] | ||
version = "0.4.0" | ||
edition = "2021" | ||
authors = ["Philip Linden <[email protected]>"] | ||
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/main.rs" | ||
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 = [ | ||
# Default to a native dev build. | ||
"dev_native", | ||
"render", | ||
] | ||
dev = [ | ||
# Improve compile times for dev builds by linking Bevy as a dynamic | ||
# library. | ||
"bevy/dynamic_linking", | ||
"bevy/bevy_dev_tools", | ||
] | ||
dev_native = [ | ||
"dev", | ||
# Enable system information plugin for native dev builds. | ||
"bevy/sysinfo_plugin", | ||
] | ||
headless = [ | ||
# Exclude rendering features | ||
# This feature does not include the "render" feature | ||
# Thus, rendering-related dependencies are disabled | ||
] | ||
render = [ | ||
# Enable features needed for visuals, windowed operation, and UIs. | ||
"bevy/bevy_asset", | ||
"bevy/bevy_color", | ||
"bevy/bevy_core_pipeline", | ||
"bevy/bevy_gizmos", | ||
"bevy/ktx2", | ||
"bevy/bevy_mesh_picking_backend", | ||
"bevy/bevy_pbr", | ||
"bevy/bevy_render", | ||
"bevy/bevy_picking", | ||
"bevy/bevy_text", | ||
"bevy/bevy_ui", | ||
"bevy/bevy_ui_picking_backend", | ||
"bevy/bevy_window", | ||
"bevy/bevy_winit", | ||
"bevy/default_font", | ||
"bevy/tonemapping_luts", | ||
"bevy/png", | ||
"bevy/webgl2", | ||
] | ||
inspect = [ | ||
"default", | ||
"bevy-inspector-egui", | ||
default = ["dev"] | ||
dev = ["yahs-cli/dev", "yahs-simulator/dev"] | ||
|
||
[workspace.package] | ||
authors = ["Philip Linden <[email protected]>"] | ||
edition = "2021" | ||
license = "MIT or Apache-2.0" | ||
|
||
[workspace] | ||
resolver = "2" # Important for Bevy | ||
members = [ | ||
"src/simulator", | ||
"src/cli", | ||
"src/ui" | ||
] | ||
|
||
[dependencies] | ||
bevy = { version = "0.15.0", default-features = false, features = [ | ||
"bevy_asset", | ||
"bevy_state", | ||
"multi_threaded", | ||
[workspace.dependencies] | ||
# Shared dependencies with fixed versions | ||
bevy = { version = "0.15.0", default-features = false, features = [ | ||
"bevy_state", "multi_threaded" | ||
] } | ||
avian3d = { git = "https://github.com/Jondolf/avian.git", branch = "main", features = ["debug-plugin"] } | ||
bevy-trait-query = { git = "https://github.com/JoJoJet/bevy-trait-query.git", branch = "bevy-0.15-rc" } | ||
bevy-inspector-egui = { version = "0.28", optional = true, features = ["highlight_changes"] } | ||
avian3d = { git = "https://github.com/Jondolf/avian.git", branch = "main" } | ||
bevy-trait-query = "0.7.0" | ||
|
||
# ----------------------------------------------------------------------------- | ||
# Some Bevy optimizations | ||
# ----------------------------------------------------------------------------- | ||
|
@@ -83,7 +74,6 @@ 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 | ||
|
||
|
@@ -94,6 +84,7 @@ 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 | ||
|
@@ -102,9 +93,6 @@ opt-level = 3 | |
# Compile the entire crate as one unit. Slows compile times, marginal | ||
# improvements. | ||
codegen-units = 1 | ||
# Do a second optimization pass over the entire program, including | ||
# dependencies. Slows compile times, marginal improvements. | ||
lto = "thin" | ||
# Optimize with size in mind (also try "z", sometimes it is better). | ||
# Slightly slows compile times, great improvements to file size and runtime | ||
# performance. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[book] | ||
authors = ["Philip Linden"] | ||
language = "en" | ||
multilingual = false | ||
title = "yahs documentation" | ||
src = "docs" | ||
|
||
[build] | ||
build-dir = "docs/book" | ||
create-missing = false | ||
|
||
[output.html] | ||
mathjax-support = true | ||
default-theme = "ayu" | ||
preferred-dark-theme = "ayu" | ||
smart-punctuation = true | ||
# no-section-label = true | ||
git-repository-url = "https://github.com/philiplinden/yahs" | ||
git-repository-icon = "fa-github" | ||
edit-url-template = "https://github.com/philiplinden/yahs/edit/main/docs/{path}" | ||
|
||
[output.html.print] | ||
enable = true # include support for printable output | ||
page-break = true # insert page-break after each chapter | ||
|
||
[output.html.fold] | ||
enable = true # whether or not to enable section folding | ||
level = 1 # the depth to start folding |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
book |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[Introduction](index.md) | ||
|
||
--- | ||
|
||
- [yahs-sim](crates/yahs-sim/README.md) | ||
- [yahs-ui](crates/yahs-ui/README.md) | ||
- [yahs-cli](crates/yahs-cli/README.md) | ||
|
||
--- | ||
|
||
[Devlog](devlog.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# yet another HAB simulator | ||
|
||
This is a high altitude balloon simulator built in | ||
[Bevy](https://bevyengine.org/). The goal is to simulate the flight of a HAB | ||
(High Altitude Balloon) and to provide a software-in-the-loop platform for | ||
testing out various physics and engineering concepts with a realistic | ||
simulation. | ||
|
||
This project is split into three parts: | ||
|
||
- [yahs-sim](https://github.com/philiplinden/yahs-sim) is the main simulation | ||
crate. It is a Bevy plugin that can be added to any Bevy project. | ||
- [yahs-ui](https://github.com/philiplinden/yahs-ui) is a simple UI for the | ||
simulation. It is not required but it is useful for visualizing the | ||
simulation and for debugging. | ||
- [yahs-cli](https://github.com/philiplinden/yahs-cli) is a command line tool | ||
for running the simulation. It is useful for testing out the simulation | ||
without having to deal with the UI. |
Oops, something went wrong.