Skip to content

Commit

Permalink
Simulation System (Initial) (#971)
Browse files Browse the repository at this point in the history
  • Loading branch information
HunterBarclay authored Apr 17, 2024
2 parents e4e1e00 + 22d7122 commit 2601ecd
Show file tree
Hide file tree
Showing 24 changed files with 1,989 additions and 986 deletions.
65 changes: 50 additions & 15 deletions fission/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,55 @@ To build, install all dependencies:
```bash
npm i
```
#### Development Server
To run the development server, run the following package script:
```bash
npm run dev
```
### NPM Scripts

#### Production Preview
To preview the production build, run the following package script:
```bash
npm run preview
```
| Script | Description |
| ------ | ----------- |
| `dev` | Starts the development server used for testing. Supports hotloading (though finicky with WASM module loading). |
| `test` | Runs the unit tests via vitest. |
| `build` | Builds the project into it's packaged form. Uses root base path. |
| `build:prod` | Builds the project into it's packaged form. Uses the `/fission/` base path. |
| `preview` | Runs the built project for preview locally before deploying. |
| `lint` | Runs eslint on the project. |
| `lint:fix` | Attempts to fix issues found with eslint. |
| `prettier` | Runs prettier on the project as a check. |
| `prettier:fix` | Runs prettier on the project to fix any issues with formating. **DO NOT USE**, I don't like the current format it uses. |
| `format` | Runs `prettier:fix` and `lint:fix`. **Do not use** for the same reasons as `prettier:fix`. |

#### Testing
To run unit tests, run the following package script:
```bash
npm run test
```
## Core Systems
These core systems make up the bulk of the vital technologies to make Synthesis work. The idea is that these systems will serve as a
jumping off point for anything requiring real-time simulation.

### World
The world serves as a hub for all of the core systems. It is a static class that handles system update execution order and lifetime.

### Scene Renderer
The Scene Renderer is our interface with rendering within the Canvas. This is primarily done via ThreeJS, however can be extended later on.

### Physics System
This Physics System is our interface with Jolt, ensuring objects are properly handled and provides utility functions that are more custom fit to our purposes.

[Jolt Physics Architecture](https://jrouwe.github.io/JoltPhysics/)

### Input System

### UI System

## Additional Systems
These systems will extend off of the core systems to build out features in Synthesis.

### Simulation System
The Simulation System articulates dynamic elements of the scene via the Physics System. At it's core there are 3 main components:

#### Driver
Drivers are mostly write-only. They take in values to know how to articulate the physics objects and contraints.

#### Stimulus
Stimulu are mostly read-only. They read values from given physics objects and constraints.

#### Brain
Brains are the controllers of the mechanisms. They use a combination of Drivers and Stimuli to control a given mechanism.

For basic user control of the mechanisms, we'll have a Synthesis Brain. By the end of Summer 2024, I hope to have an additional brain, the WPIBrain for facilitating WPILib code control over the mechanisms inside of Synthesis.

### Mode System
Loading

0 comments on commit 2601ecd

Please sign in to comment.