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

Milestone 2: MVP #988

Closed
wants to merge 880 commits into from
Closed
Changes from 92 commits
Commits
Show all changes
880 commits
Select commit Hold shift + click to select a range
e986aa4
Merge branch 'haverty/1692/preferences' into dhruv/1728/intake-ejecto…
HunterBarclay Jul 14, 2024
cbe34c8
Fixed label for intake size
HunterBarclay Jul 14, 2024
ccfb830
Formatted
HunterBarclay Jul 14, 2024
d4234ef
Formatting
HunterBarclay Jul 14, 2024
ae6a9df
Merge branch 'haverty/1692/preferences' into dhruv/1728/intake-ejecto…
HunterBarclay Jul 14, 2024
8ac356d
Merge branch 'dev' into barclah/batching
HunterBarclay Jul 14, 2024
f35e830
moved APS AUTH to global scope
azaleacolburn Jul 14, 2024
a026479
Still have an unknown issues with very select meshes
HunterBarclay Jul 14, 2024
a4b1660
Done and gathered statistics
HunterBarclay Jul 14, 2024
1464839
removed stat print outs
HunterBarclay Jul 14, 2024
e743fdf
Formatter
HunterBarclay Jul 14, 2024
0ce9548
Merge branch 'dev' of https://github.com/Autodesk/synthesis into colb…
azaleacolburn Jul 14, 2024
65eb06e
Merge branch 'dev' of https://github.com/Autodesk/synthesis into colb…
azaleacolburn Jul 14, 2024
bdd0c08
fixed urlencoding for token revocation
azaleacolburn Jul 14, 2024
50bb640
Merged numbered assembly name logic into one function
LucaHaverty Jul 15, 2024
e5f2c36
Position and scale scoring zones with gizmos
LucaHaverty Jul 15, 2024
435e4bb
Merge branch 'dhruv/1728/intake-ejector-config' into haverty/1730/sco…
LucaHaverty Jul 15, 2024
b2a5a06
Upgrade Import Modal (#1008)
HunterBarclay Jul 15, 2024
62df037
Created basic progress notification. Currently integrating into mirab…
HunterBarclay Jul 15, 2024
3b1747a
Merge branch 'dev' into barclah/1752/loading-notif
HunterBarclay Jul 15, 2024
c640873
Progress notifications integrated with spawning. Issue with unit test…
HunterBarclay Jul 15, 2024
4660906
I didn't change anything and now the issue with vitest taking too lon…
HunterBarclay Jul 15, 2024
40e44fa
Merge branch 'dev' into haverty/1692/preferences
LucaHaverty Jul 15, 2024
3e3a437
Merge branch 'dev' into dhruv/1728/intake-ejector-config
HunterBarclay Jul 15, 2024
19666cc
add import to general imports
azaleacolburn Jul 15, 2024
7247694
Renamed BodyAssociated to BodyAssociate, made requested changes.
HunterBarclay Jul 15, 2024
f67f467
Merge branch 'dev' of https://github.com/Autodesk/synthesis into colb…
azaleacolburn Jul 15, 2024
4234e55
Merge branch 'dev' of https://github.com/Autodesk/synthesis into colb…
azaleacolburn Jul 15, 2024
abf0bb2
removed .. from deps import path
azaleacolburn Jul 15, 2024
aac25c9
Formatting
BrandonPacewic Jul 15, 2024
2441ae4
Preferences System (#1007)
HunterBarclay Jul 15, 2024
7f6824e
Merge branch 'dev' of https://github.com/Autodesk/synthesis into colb…
azaleacolburn Jul 15, 2024
f6495e7
Adding unit tests
HunterBarclay Jul 15, 2024
847bd0c
Testing collision
a-crowell Jul 15, 2024
c664ec6
Merge remote-tracking branch 'origin/dev' into crowela/1731/scoring-p…
a-crowell Jul 15, 2024
249cfc9
Parent node fix and better material
LucaHaverty Jul 15, 2024
bf82eee
switch to create token
azaleacolburn Jul 15, 2024
076f179
Merge branch 'dev' into haverty/1730/scoring-zones-config
LucaHaverty Jul 15, 2024
86cc121
fix arg name val
azaleacolburn Jul 15, 2024
764749e
Fixed poker slider error
Dhruv-0-Arora Jul 15, 2024
f75fc6b
Merge remote-tracking branch 'origin/dev' into dhruv/1728/intake-ejec…
Dhruv-0-Arora Jul 15, 2024
46c49fa
Formatting
Dhruv-0-Arora Jul 15, 2024
dc2029c
UI upgrades and fixes
LucaHaverty Jul 15, 2024
b74f704
fixed pickling bug
azaleacolburn Jul 15, 2024
f2f3602
Removed the unaccessable _deleteGizmoOnEscape variable & fixed manage…
Dhruv-0-Arora Jul 15, 2024
a489135
Changed implementation of removing transform gizmos from objects as t…
Dhruv-0-Arora Jul 15, 2024
36b614a
format
LucaHaverty Jul 15, 2024
0fc72c8
Fixing body associates
HunterBarclay Jul 15, 2024
b480efa
add write scope to token
azaleacolburn Jul 15, 2024
0521a74
Fixed dependencies
HunterBarclay Jul 15, 2024
afd6d1a
Removing extra installDeps call
HunterBarclay Jul 15, 2024
40c56cc
Removed yet another duplicate install dependencies
HunterBarclay Jul 15, 2024
264ba4d
Added transparent materials support
Dhruv-0-Arora Jul 15, 2024
570f40f
Implemented transparency into the loadmaterials
Dhruv-0-Arora Jul 15, 2024
d2825d8
versioning json fixed
azaleacolburn Jul 15, 2024
671f519
Removed unused enum value
Dhruv-0-Arora Jul 15, 2024
09377a6
Removed console log
Dhruv-0-Arora Jul 15, 2024
3fee77c
removed annoying prints
azaleacolburn Jul 15, 2024
14e878d
Removed unused var eslint complaint
a-crowell Jul 15, 2024
c01dc72
fixed update_file_version function
azaleacolburn Jul 15, 2024
1b18b3f
made requested change
HunterBarclay Jul 15, 2024
96185ad
Intake and Ejector Configurator (#1017)
HunterBarclay Jul 16, 2024
bd073b7
Removed comments
HunterBarclay Jul 16, 2024
cbcf154
Made requested changes
Dhruv-0-Arora Jul 16, 2024
3ba9fd4
Delete duplicate func
a-crowell Jul 16, 2024
0e8ce08
Merge branch 'dev' into crowela/1731/scoring-physics
a-crowell Jul 16, 2024
8837fa8
Of course the other one was removed
a-crowell Jul 16, 2024
7252270
Added handling suggestion to EnableTransformControls()
Dhruv-0-Arora Jul 16, 2024
e97d4f7
Batched Rendering (#1023)
HunterBarclay Jul 16, 2024
99f8ecc
Transparent Materials Mirabuf (#1028)
HunterBarclay Jul 16, 2024
61e624a
Start to ejectable-specific collision
a-crowell Jul 16, 2024
28dc689
add linage id serialization
azaleacolburn Jul 16, 2024
c5bfd45
Fixed build errors with sliders and settings modal
LucaHaverty Jul 16, 2024
c9c64b0
Format
LucaHaverty Jul 16, 2024
0f5454b
Merge remote-tracking branch 'origin/dev' into dhruv/delete-assembly-fix
Dhruv-0-Arora Jul 16, 2024
d60c362
Fixed checkbox
HunterBarclay Jul 16, 2024
8d208bc
Delete Assembly Hot Fix (#1027)
HunterBarclay Jul 16, 2024
515c154
Merge branch 'dev' into haverty/1730/scoring-zones-config
HunterBarclay Jul 16, 2024
6dc0490
very messy but working new versioning code
azaleacolburn Jul 16, 2024
e4ef292
removed unneeded serialization
azaleacolburn Jul 16, 2024
8903e62
Added build workflow
HunterBarclay Jul 16, 2024
42a1174
Updated workflow and added intentional error for testing
HunterBarclay Jul 16, 2024
18874ad
Worked, fixing error
HunterBarclay Jul 16, 2024
3b9b005
Panel to pick a control scheme and brain configuration events
LucaHaverty Jul 16, 2024
b76d4ad
Basic example of tags using canvas elements
Dhruv-0-Arora Jul 16, 2024
4685449
allow independent upload (without download)
azaleacolburn Jul 16, 2024
482b059
mocked up what I want
HunterBarclay Jul 16, 2024
7aab74b
Gamepiece-specific collision
a-crowell Jul 16, 2024
38ae8f3
Merge remote-tracking branch 'origin/dev' into dhruv/name-tags
Dhruv-0-Arora Jul 16, 2024
573ed7b
fix dumb type errors
azaleacolburn Jul 16, 2024
45a0042
Minor fixes
HunterBarclay Jul 16, 2024
6bf4546
Minor refactoring
HunterBarclay Jul 16, 2024
5fa5cad
Build Errors (#1029)
HunterBarclay Jul 16, 2024
c515c20
Merge branch 'dev' into barclah/1752/loading-notif
HunterBarclay Jul 16, 2024
cc531dc
added dedicated mirabuf folder to aps project current folder
azaleacolburn Jul 16, 2024
81b3e1d
Merge branch 'colbura/1721/aps-file-upload' of https://github.com/Aut…
azaleacolburn Jul 16, 2024
f1d99ca
added success uploading message
azaleacolburn Jul 16, 2024
8aaef1e
Created working tags that will append as more assemblies are created
Dhruv-0-Arora Jul 16, 2024
43c4e68
Merge remote-tracking branch 'origin/dev' into dhruv/name-tags
Dhruv-0-Arora Jul 16, 2024
d1f76ca
Working name tag tracking
Dhruv-0-Arora Jul 16, 2024
c695a8a
Scoring zone config review changes
LucaHaverty Jul 16, 2024
44dcb35
Styling nametags and only adding them to robots
Dhruv-0-Arora Jul 16, 2024
853fab9
Formatting
Dhruv-0-Arora Jul 16, 2024
8889a4b
Fixed glitchy effect
HunterBarclay Jul 16, 2024
d145ca2
Merge branch 'haverty/1730/scoring-zones-config' of github.com:autode…
LucaHaverty Jul 16, 2024
22ec16f
Merge branch 'dev' into haverty/1730/scoring-zones-config
LucaHaverty Jul 16, 2024
d878388
auth uses synthesis website now
azaleacolburn Jul 16, 2024
a30d7b3
Formatted
HunterBarclay Jul 16, 2024
1c65afc
Events!
a-crowell Jul 16, 2024
6fb8214
Event refactor
a-crowell Jul 17, 2024
bddff16
Refactored scoring collision and start to intake collision
a-crowell Jul 17, 2024
8bd2183
Finalized the overlay positioning and fixed the computation for the b…
Dhruv-0-Arora Jul 17, 2024
df08606
Formatting
Dhruv-0-Arora Jul 17, 2024
0632161
Debugging SetEjectable > isAdded(bodyID)
a-crowell Jul 17, 2024
9a460d3
Physics system be crazy
HunterBarclay Jul 17, 2024
067baf3
Fixed the scale messing up the rotation of scoring zones
LucaHaverty Jul 17, 2024
a0f0ccc
Debug clean up
a-crowell Jul 17, 2024
ed6c548
Update fission/src/aps/APS.ts
azaleacolburn Jul 17, 2024
dbdbc9f
Update fission/src/aps/APS.ts
azaleacolburn Jul 17, 2024
0f459c1
Merge branch 'dev' of https://github.com/Autodesk/synthesis into colb…
azaleacolburn Jul 17, 2024
08043a4
removed lockfile and removed the early return in aps logout
azaleacolburn Jul 17, 2024
0352957
Merge branch 'colbura/1709/aps-logout' of https://github.com/Autodesk…
azaleacolburn Jul 17, 2024
534e727
Input selection of default and custom named schemes
LucaHaverty Jul 17, 2024
f1f48e6
More testing and cleaning
a-crowell Jul 17, 2024
b3230d5
Merge branch 'dev' into barclah/code-sim
HunterBarclay Jul 17, 2024
7afc125
Merge remote-tracking branch 'origin/dev' into crowela/1731/scoring-p…
a-crowell Jul 17, 2024
fec36d8
Linting and build errors
HunterBarclay Jul 17, 2024
502303c
Scoring Zones Configuration (#1021)
HunterBarclay Jul 17, 2024
d5b8a8e
Formatted
HunterBarclay Jul 17, 2024
ce8aac6
Changed implementation to use references & optimized to only run upda…
Dhruv-0-Arora Jul 17, 2024
b85b90f
Merge remote-tracking branch 'origin/dev' into dhruv/name-tags
Dhruv-0-Arora Jul 17, 2024
afa87f7
Formatted
Dhruv-0-Arora Jul 17, 2024
9d05c47
Bug handling
a-crowell Jul 17, 2024
bd64d9b
Merge remote-tracking branch 'origin/dev' into crowela/1731/scoring-p…
a-crowell Jul 17, 2024
497d35d
Added preference integration
Dhruv-0-Arora Jul 17, 2024
5268066
Save and load named controls
LucaHaverty Jul 17, 2024
897e438
Create new custom input schemes that are assigned a random name
LucaHaverty Jul 17, 2024
8c9c0ab
Nearly done with the animated loading bar
HunterBarclay Jul 17, 2024
4aa159e
Added lazy to satisfy linter
HunterBarclay Jul 18, 2024
717fe10
Formatted and removed comments
HunterBarclay Jul 18, 2024
93cee52
ScoringSceneObject made and partially gets changed by config panel
a-crowell Jul 18, 2024
b818c2b
I got the issue down to one frame, now it's back up at two
HunterBarclay Jul 18, 2024
5ad8fec
Solved frame delay issue
HunterBarclay Jul 18, 2024
9bebcfb
Formatted, removed comments
HunterBarclay Jul 18, 2024
ff7a067
Refactoring the event handlers
Dhruv-0-Arora Jul 18, 2024
4f50c17
Formatting
Dhruv-0-Arora Jul 18, 2024
9a35c0a
Fix: Reset select cursor back to normal after joint selection
BrandonPacewic Jul 18, 2024
28284d4
switched to using dropdownexportlocation instead of saved one
azaleacolburn Jul 18, 2024
fdfbfcc
Update fission/src/aps/APS.ts
azaleacolburn Jul 18, 2024
3b4ad2c
formatted with black
azaleacolburn Jul 18, 2024
2250a9c
Isort & black formatting
BrandonPacewic Jul 18, 2024
692bb1d
Made requested changes
Dhruv-0-Arora Jul 18, 2024
fc3eb0f
Scoring zone rotation not messed up by scale and scoring zone detects…
a-crowell Jul 18, 2024
a40469b
Merge branch 'dev' into barclah/1752/loading-notif
HunterBarclay Jul 18, 2024
2708e48
Little cleanup
Dhruv-0-Arora Jul 18, 2024
7357d36
Input saving and configuration fixes
LucaHaverty Jul 18, 2024
6e3dbad
Update works
a-crowell Jul 18, 2024
0b3704c
Positioning bug fix
a-crowell Jul 18, 2024
77480cc
Merge branch 'dev' into haverty/1755/named-control-schemes
LucaHaverty Jul 18, 2024
0b49cd2
added friction override to parsing
azaleacolburn Jul 18, 2024
2f8b640
Reset all inputs works and ejector + intake bindings
LucaHaverty Jul 18, 2024
e0e7b80
Integration with name tags
LucaHaverty Jul 18, 2024
dce6f72
lint fix and format
LucaHaverty Jul 18, 2024
4dc2100
Added comments
HunterBarclay Jul 18, 2024
ddfde70
Update EasingFunctions.ts
HunterBarclay Jul 18, 2024
0c4b510
Multiple scoring zones
a-crowell Jul 19, 2024
b496e77
APS File Upload (#1004)
HunterBarclay Jul 19, 2024
4d240ca
Prefs render scoring zones
a-crowell Jul 19, 2024
eb2421e
A start to persistent
a-crowell Jul 19, 2024
96068c3
Print clean up
a-crowell Jul 19, 2024
e8050ce
Intake key check
a-crowell Jul 19, 2024
aff8e03
Clean up
a-crowell Jul 19, 2024
cade5f0
UI improvements, bug fixes, comments, and cleanup for named inputs
LucaHaverty Jul 19, 2024
f7ca1c9
Initial Code Simulation Support: WebSocket Client (#1031)
HunterBarclay Jul 19, 2024
94839ef
Loading Notification (#1026)
HunterBarclay Jul 19, 2024
31ea4f7
Merge branch 'dev' into dhruv/name-tags
HunterBarclay Jul 19, 2024
55a2dde
Scene Tags (#1030)
HunterBarclay Jul 19, 2024
6ff5355
Merge branch 'dev' into haverty/1755/named-control-schemes
LucaHaverty Jul 19, 2024
beebc0c
Merge branch 'dev' into haverty/1755/named-control-schemes
LucaHaverty Jul 19, 2024
6d438c4
Merge `dev`
BrandonPacewic Jul 19, 2024
5285fad
Resolve merge conflict from `dev`
BrandonPacewic Jul 19, 2024
b4c074a
Persistent scoring
a-crowell Jul 19, 2024
de39f05
UI touchups and debug panel
HunterBarclay Jul 20, 2024
f400d77
Formatted
HunterBarclay Jul 20, 2024
11c7a54
AARD-1685: Joint Config Panel (#995)
HunterBarclay Jul 22, 2024
2bf3a68
Fixed this yet again
HunterBarclay Jul 22, 2024
4a4df5b
`requests` dependency missing (#1039)
HunterBarclay Jul 22, 2024
94c081f
Updated packaging workflow
HunterBarclay Jul 22, 2024
a65f377
Package Workflow Fix (#1040)
HunterBarclay Jul 22, 2024
c622a42
Merge branch 'dev' of https://github.com/Autodesk/synthesis into colb…
azaleacolburn Jul 22, 2024
7e945c3
Merge `dev`
BrandonPacewic Jul 22, 2024
bd1b57d
Fix merge conflicts
BrandonPacewic Jul 22, 2024
3f5daa2
PR suggestions for named inputs
LucaHaverty Jul 22, 2024
7b03ede
Fix merge conflicts
BrandonPacewic Jul 22, 2024
350f8e0
Scoreboard
a-crowell Jul 22, 2024
d187634
Persistent points bug fix
a-crowell Jul 22, 2024
b86386a
Scoreboard on start up
a-crowell Jul 22, 2024
bfa750d
Icon changes
LucaHaverty Jul 22, 2024
450560f
Refactoring and documentation
a-crowell Jul 22, 2024
064fed6
Merge remote-tracking branch 'origin/dev' into crowela/1731/scoring-p…
a-crowell Jul 22, 2024
052590a
Removed scoring zone panels from the modals array
LucaHaverty Jul 23, 2024
b2a5f58
Simple requested changes
a-crowell Jul 23, 2024
1b90a26
More simple requested changes
a-crowell Jul 23, 2024
ebdcbd3
Uncaught logging module thing
BrandonPacewic Jul 24, 2024
243e49f
AARD-1735: Logging module updates (#1010)
HunterBarclay Jul 24, 2024
9a6cbeb
Merge branch 'dev' of https://github.com/Autodesk/synthesis into colb…
azaleacolburn Jul 24, 2024
00dacf4
This is wayy better than before
BrandonPacewic Jul 24, 2024
abab679
Merge branch 'dev' of https://github.com/Autodesk/synthesis into colb…
azaleacolburn Jul 24, 2024
c0ad668
update token scope
azaleacolburn Jul 24, 2024
721940e
Types refactor
BrandonPacewic Jul 24, 2024
dcc9c28
Remove `configure.py`
BrandonPacewic Jul 24, 2024
94ed383
Named robot controls (#1034)
HunterBarclay Jul 24, 2024
42154ce
fixed double button and physical material misnaming
azaleacolburn Jul 24, 2024
c777ef9
ran formatter
azaleacolburn Jul 24, 2024
5b391db
Update fission/src/ui/panels/DebugPanel.tsx
HunterBarclay Jul 25, 2024
e351aee
Removed multi bot, fixed manage assemblies enough for now
HunterBarclay Jul 25, 2024
472d60d
Refactor: `Types/**/*` -> `Types.py` (#1045)
HunterBarclay Jul 25, 2024
216721f
Merge branch 'dev' into branp/remove-configure
BrandonPacewic Jul 25, 2024
3356487
Merge `dev`
BrandonPacewic Jul 25, 2024
b51a177
Merge branch `dev` into branp/exporter-options-refactor
BrandonPacewic Jul 25, 2024
75c5d10
Refactor with `Types.py`
BrandonPacewic Jul 25, 2024
3b17c5a
fix friction override
azaleacolburn Jul 25, 2024
5aa1ab0
Avoid throwing a message box error for not being signed in
BrandonPacewic Jul 25, 2024
2452917
Merge branch 'dev' into barclah/ui-cleanup
HunterBarclay Jul 25, 2024
68d8375
Re added configuration
HunterBarclay Jul 25, 2024
d6c91fa
Fixed build error
HunterBarclay Jul 25, 2024
a93ee93
UI Touchups (#1038)
HunterBarclay Jul 25, 2024
0b52f29
Refactor: Remove `configure.py` (#1046)
HunterBarclay Jul 25, 2024
eea6684
Merge branch 'dev' into crowela/1731/scoring-physics
HunterBarclay Jul 25, 2024
2bcc84c
Merge branch 'dev' into crowela/1731/scoring-physics
LucaHaverty Jul 25, 2024
370334f
Added actual intake and eject controls
LucaHaverty Jul 25, 2024
ee5e06f
Format and lint fix
LucaHaverty Jul 25, 2024
b2352e5
Now prompt for login before export start
BrandonPacewic Jul 25, 2024
78fab85
Fixed bug with fusion material overrides
BrandonPacewic Jul 25, 2024
361e25f
Merge `dev`
BrandonPacewic Jul 25, 2024
8c9bb18
General cleanups
BrandonPacewic Jul 25, 2024
b32c9f5
Did not mean to add this
BrandonPacewic Jul 25, 2024
705b748
Updated logging module usage and removed auth token log
BrandonPacewic Jul 25, 2024
bf4cdb4
Refactor: `ExporterOptions.py` (#1042)
HunterBarclay Jul 25, 2024
df36e28
APS Upload Pipeline Polish (#1048)
HunterBarclay Jul 25, 2024
d031348
Friction Data Export (#1014)
HunterBarclay Jul 25, 2024
bf61a33
At long last, persistent points
a-crowell Jul 25, 2024
8d63eea
Clean up and doc
a-crowell Jul 25, 2024
a638455
Commented out destroy gamepiece in config
a-crowell Jul 25, 2024
6aca4a5
Formatting
a-crowell Jul 25, 2024
16e300f
Removed scoring zone panels from the modals array (#1041)
HunterBarclay Jul 26, 2024
06b0cb3
APS Logout (#1016)
HunterBarclay Jul 26, 2024
7a5c888
Render scoreboard option and remove dispatch
a-crowell Jul 26, 2024
bfe788a
Saves after deleting zone and formatting
a-crowell Jul 26, 2024
f467f95
Intake/Scoring Collisions (#1035)
HunterBarclay Jul 26, 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
28 changes: 28 additions & 0 deletions .github/workflows/FissionBuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Fission - Build

on:
workflow_dispatch: {}
pull_request:
branches: [master, dev]

jobs:
buildFission:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: JavaScript Setup
uses: actions/setup-node@v2
with:
node-version: 20

- name: Install Dependencies
run: |
cd fission
npm install

- name: Build Fission
run: |
cd fission
npm run build && echo "Build Passed" || (echo "Build Failed" && exit 1)
29 changes: 22 additions & 7 deletions fission/src/Synthesis.tsx
Original file line number Diff line number Diff line change
@@ -41,19 +41,20 @@ import SpawnLocationsPanel from "@/panels/SpawnLocationPanel"
import ConfigureGamepiecePickupPanel from "@/panels/configuring/ConfigureGamepiecePickupPanel"
import ConfigureShotTrajectoryPanel from "@/panels/configuring/ConfigureShotTrajectoryPanel"
import ScoringZonesPanel from "@/panels/configuring/scoring/ScoringZonesPanel"
import ZoneConfigPanel from "@/panels/configuring/scoring/ZoneConfigPanel"
import ScoreboardPanel from "@/panels/information/ScoreboardPanel"
import DriverStationPanel from "@/panels/simulation/DriverStationPanel"
import PokerPanel from "@/panels/PokerPanel.tsx"
import ManageAssembliesModal from "@/modals/spawning/ManageAssembliesModal.tsx"
import World from "@/systems/World.ts"
import { AddRobotsModal, AddFieldsModal, SpawningModal } from "@/modals/spawning/SpawningModals.tsx"
import ImportLocalMirabufModal from "@/modals/mirabuf/ImportLocalMirabufModal.tsx"
import APS from "./aps/APS.ts"
import ImportMirabufPanel from "@/ui/panels/mirabuf/ImportMirabufPanel.tsx"
import Skybox from "./ui/components/Skybox.tsx"
import PokerPanel from "@/panels/PokerPanel.tsx"
import ChooseInputSchemePanel from "./ui/panels/configuring/ChooseInputSchemePanel.tsx"
import ConfigureRobotModal from "./ui/modals/configuring/ConfigureRobotModal.tsx"
import ResetAllInputsModal from "./ui/modals/configuring/ResetAllInputsModal.tsx"
import ZoneConfigPanel from "./ui/panels/configuring/scoring/ZoneConfigPanel.tsx"

const DEFAULT_MIRA_PATH = "/api/mira/Robots/Team 2471 (2018)_v7.mira"

@@ -101,7 +102,7 @@ function Synthesis() {
}
mainLoop()

World.SceneRenderer.updateSkyboxColors(defaultTheme)
World.SceneRenderer.UpdateSkyboxColors(defaultTheme)

// Cleanup
return () => {
@@ -137,6 +138,7 @@ function Synthesis() {
closePanel={(id: string) => {
closePanel(id)
}}
closeAllPanels={closeAllPanels}
>
<ToastProvider key="toast-provider">
<Scene useStats={true} key="scene-in-toast-provider" />
@@ -185,6 +187,9 @@ const initialModals = [
<ConfigMotorModal key="config-motor" modalId="config-motor" />,
<ManageAssembliesModal key="manage-assemblies" modalId="manage-assemblies" />,
<ImportLocalMirabufModal key="import-local-mirabuf" modalId="import-local-mirabuf" />,
<ConfigureRobotModal key="config-robot" modalId="config-robot" />,
<ScoringZonesPanel panelId="scoring-zones" openLocation="right" />,
<ZoneConfigPanel panelId="zone-config" openLocation="right" />,
<ResetAllInputsModal key="reset-inputs" modalId="reset-inputs" />,
]

@@ -193,10 +198,20 @@ const initialPanels: ReactElement[] = [
<DriverStationPanel key="driver-station" panelId="driver-station" />,
<SpawnLocationsPanel key="spawn-locations" panelId="spawn-locations" />,
<ScoreboardPanel key="scoreboard" panelId="scoreboard" />,
<ConfigureGamepiecePickupPanel key="config-gamepiece-pickup" panelId="config-gamepiece-pickup" />,
<ConfigureShotTrajectoryPanel key="config-shot-trajectory" panelId="config-shot-trajectory" />,
<ScoringZonesPanel key="scoring-zones" panelId="scoring-zones" />,
<ZoneConfigPanel key="zone-config" panelId="zone-config" />,
<ConfigureGamepiecePickupPanel
key="config-gamepiece-pickup"
panelId="config-gamepiece-pickup"
openLocation="right"
sidePadding={8}
/>,
<ConfigureShotTrajectoryPanel
key="config-shot-trajectory"
panelId="config-shot-trajectory"
openLocation="right"
sidePadding={8}
/>,
<ScoringZonesPanel key="scoring-zones" panelId="scoring-zones" openLocation="right" sidePadding={8} />,
<ZoneConfigPanel key="zone-config" panelId="zone-config" openLocation="right" sidePadding={8} />,
<ImportMirabufPanel key="import-mirabuf" panelId="import-mirabuf" />,
<PokerPanel key="poker" panelId="poker" />,
<ChooseInputSchemePanel key="choose-scheme" panelId="choose-scheme" />,
112 changes: 112 additions & 0 deletions fission/src/mirabuf/EjectableSceneObject.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
import SceneObject from "@/systems/scene/SceneObject"
import MirabufSceneObject from "./MirabufSceneObject"
import Jolt from "@barclah/jolt-physics"
import World from "@/systems/World"
import {
Array_ThreeMatrix4,
JoltMat44_ThreeMatrix4,
JoltQuat_ThreeQuaternion,
ThreeQuaternion_JoltQuat,
ThreeVector3_JoltVec3,
} from "@/util/TypeConversions"
import * as THREE from "three"

class EjectableSceneObject extends SceneObject {
private _parentAssembly: MirabufSceneObject
private _gamePieceBodyId?: Jolt.BodyID

private _parentBodyId?: Jolt.BodyID
private _deltaTransformation?: THREE.Matrix4
private _ejectVelocity?: number

public get gamePieceBodyId() {
return this._gamePieceBodyId
}

public constructor(parentAssembly: MirabufSceneObject, gamePieceBody: Jolt.BodyID) {
super()

console.debug("Trying to create ejectable...")

this._parentAssembly = parentAssembly
this._gamePieceBodyId = gamePieceBody
}

public Setup(): void {
if (this._parentAssembly.ejectorPreferences && this._gamePieceBodyId) {
this._parentBodyId = this._parentAssembly.mechanism.nodeToBody.get(
this._parentAssembly.ejectorPreferences.parentNode ?? this._parentAssembly.rootNodeId
)

this._deltaTransformation = Array_ThreeMatrix4(this._parentAssembly.ejectorPreferences.deltaTransformation)
this._ejectVelocity = this._parentAssembly.ejectorPreferences.ejectorVelocity

World.PhysicsSystem.DisablePhysicsForBody(this._gamePieceBodyId)

console.debug("Ejectable created successfully!")
}
}

public Update(): void {
if (this._parentBodyId && this._deltaTransformation && this._gamePieceBodyId) {
if (!World.PhysicsSystem.IsBodyAdded(this._gamePieceBodyId)) {
this._gamePieceBodyId = undefined
return
}

// I had a think and free wrote this matrix math on a whim. It worked first try and I honestly can't quite remember how it works... -Hunter
const gpBody = World.PhysicsSystem.GetBody(this._gamePieceBodyId)
const posToCOM = JoltMat44_ThreeMatrix4(gpBody.GetCenterOfMassTransform()).premultiply(
JoltMat44_ThreeMatrix4(gpBody.GetWorldTransform()).invert()
)

const body = World.PhysicsSystem.GetBody(this._parentBodyId)
const bodyTransform = posToCOM
.invert()
.premultiply(
this._deltaTransformation.clone().premultiply(JoltMat44_ThreeMatrix4(body.GetWorldTransform()))
)
const position = new THREE.Vector3(0, 0, 0)
const rotation = new THREE.Quaternion(0, 0, 0, 1)
bodyTransform.decompose(position, rotation, new THREE.Vector3(1, 1, 1))

World.PhysicsSystem.SetBodyPosition(this._gamePieceBodyId, ThreeVector3_JoltVec3(position), false)
World.PhysicsSystem.SetBodyRotation(this._gamePieceBodyId, ThreeQuaternion_JoltQuat(rotation), false)
}
}

public Eject() {
if (!this._parentBodyId || !this._ejectVelocity || !this._gamePieceBodyId) {
return
}

if (!World.PhysicsSystem.IsBodyAdded(this._gamePieceBodyId)) {
this._gamePieceBodyId = undefined
return
}

const parentBody = World.PhysicsSystem.GetBody(this._parentBodyId)
const gpBody = World.PhysicsSystem.GetBody(this._gamePieceBodyId)
const ejectDir = new THREE.Vector3(0, 0, 1)
.applyQuaternion(JoltQuat_ThreeQuaternion(gpBody.GetRotation()))
.normalize()

World.PhysicsSystem.EnablePhysicsForBody(this._gamePieceBodyId)
gpBody.SetLinearVelocity(
parentBody.GetLinearVelocity().Add(ThreeVector3_JoltVec3(ejectDir.multiplyScalar(this._ejectVelocity)))
)
gpBody.SetAngularVelocity(parentBody.GetAngularVelocity())

this._parentBodyId = undefined
}

public Dispose(): void {
console.debug("Destroying ejectable")

if (this._gamePieceBodyId) {
World.PhysicsSystem.EnablePhysicsForBody(this._gamePieceBodyId)
}
}
}

export default EjectableSceneObject
104 changes: 104 additions & 0 deletions fission/src/mirabuf/IntakeSensorSceneObject.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
import SceneObject from "@/systems/scene/SceneObject"
import MirabufSceneObject, { RigidNodeAssociate } from "./MirabufSceneObject"
import Jolt from "@barclah/jolt-physics"
import * as THREE from "three"
import World from "@/systems/World"
import JOLT from "@/util/loading/JoltSyncLoader"
import {
Array_ThreeMatrix4,
JoltMat44_ThreeMatrix4,
ThreeQuaternion_JoltQuat,
ThreeVector3_JoltVec3,
} from "@/util/TypeConversions"

class IntakeSensorSceneObject extends SceneObject {
private _parentAssembly: MirabufSceneObject
private _parentBodyId?: Jolt.BodyID
private _deltaTransformation?: THREE.Matrix4

private _joltBodyId?: Jolt.BodyID
private _mesh?: THREE.Mesh

public constructor(parentAssembly: MirabufSceneObject) {
super()

console.debug("Trying to create intake sensor...")

this._parentAssembly = parentAssembly
}

public Setup(): void {
if (this._parentAssembly.intakePreferences) {
this._parentBodyId = this._parentAssembly.mechanism.nodeToBody.get(
this._parentAssembly.intakePreferences.parentNode ?? this._parentAssembly.rootNodeId
)

this._deltaTransformation = Array_ThreeMatrix4(this._parentAssembly.intakePreferences.deltaTransformation)

this._joltBodyId = World.PhysicsSystem.CreateSensor(
new JOLT.SphereShapeSettings(this._parentAssembly.intakePreferences.zoneDiameter / 2.0)
)
if (!this._joltBodyId) {
console.error("Failed to create intake. No Jolt Body")
return
}

this._mesh = World.SceneRenderer.CreateSphere(
this._parentAssembly.intakePreferences.zoneDiameter / 2.0,
World.SceneRenderer.CreateToonMaterial(0x5eeb67)
)
World.SceneRenderer.scene.add(this._mesh)

console.debug("Intake sensor created successfully!")
}
}

public Update(): void {
if (this._joltBodyId && this._parentBodyId && this._deltaTransformation) {
const parentBody = World.PhysicsSystem.GetBody(this._parentBodyId)
const bodyTransform = this._deltaTransformation
.clone()
.premultiply(JoltMat44_ThreeMatrix4(parentBody.GetWorldTransform()))
const position = new THREE.Vector3(0, 0, 0)
const rotation = new THREE.Quaternion(0, 0, 0, 1)
bodyTransform.decompose(position, rotation, new THREE.Vector3(1, 1, 1))

World.PhysicsSystem.SetBodyPosition(this._joltBodyId, ThreeVector3_JoltVec3(position))
World.PhysicsSystem.SetBodyRotation(this._joltBodyId, ThreeQuaternion_JoltQuat(rotation))

if (this._mesh) {
this._mesh.position.setFromMatrixPosition(bodyTransform)
this._mesh.rotation.setFromRotationMatrix(bodyTransform)
}

if (!World.PhysicsSystem.isPaused) {
// TEMPORARY GAME PIECE DETECTION
const hitRes = World.PhysicsSystem.RayCast(ThreeVector3_JoltVec3(position), new JOLT.Vec3(0, 0, 3))
if (hitRes) {
const gpAssoc = <RigidNodeAssociate>World.PhysicsSystem.GetBodyAssociation(hitRes.data.mBodyID)
// This works, however the check for game piece is doing two checks.
if (gpAssoc?.isGamePiece) {
console.debug("Found game piece!")
this._parentAssembly.SetEjectable(hitRes.data.mBodyID, false)
}
}
}
}
}

public Dispose(): void {
console.debug("Destroying intake sensor")

if (this._joltBodyId) {
World.PhysicsSystem.DestroyBodyIds(this._joltBodyId)

if (this._mesh) {
this._mesh.geometry.dispose()
;(this._mesh.material as THREE.Material).dispose()
World.SceneRenderer.scene.remove(this._mesh)
}
}
}
}

export default IntakeSensorSceneObject
Loading