Skip to content

Commit 414ce9d

Browse files
authored
Merge branch 'dev' into alexey/102/export-some-mira
2 parents 35ced76 + 2aa9f81 commit 414ce9d

86 files changed

Lines changed: 4327 additions & 591 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/NixTest.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Test Nix
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
nix-flake-check:
9+
name: Nix Flake Check
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v7
13+
14+
- uses: cachix/install-nix-action@v31
15+
16+
- name: Nix Flake Check
17+
run: nix flake check
18+
19+
fission-playwright:
20+
name: Fission Playwright
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v7
24+
25+
- uses: cachix/install-nix-action@v31
26+
27+
- name: Cache Node Dependencies
28+
uses: actions/cache@v6
29+
with:
30+
key: "${{runner.os}}-npm-fission-${{hashFiles('fission/bun.lock')}}"
31+
path: "fission/node_modules"
32+
restore-keys: |
33+
${{runner.os}}-npm-fission-
34+
${{runner.os}}-npm
35+
36+
- name: Install Dependencies
37+
working-directory: "fission"
38+
run: nix develop .#fission --command bash -c "bun install --frozen-lockfile"
39+
40+
- name: Run Playwright Tests
41+
working-directory: "fission"
42+
run: |
43+
nix develop .#fission --command bash -c "bun run test run ./src/test/APSTesting.test.ts"

NOTICE.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,8 @@ This product bundles the following third-party sound assets:
1818

1919
For more information, contact FIRST Robotics or refer to your licensing agreement.
2020

21-
This product also includes Autodesk brand marks. See MARKS-LICENSE.md for more information.
21+
3. Files licensed from WPILib:
22+
- simulation/SyntheSimJava/src/main/java/com/autodesk/synthesis/cscore/CameraServer.java
23+
- simulation/SyntheSimJava/src/main/java/com/autodesk/synthesis/cscore/CvSink.java
24+
25+
This product also includes Autodesk brand marks. See MARKS-LICENSE.md for more information.

fission/biome.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.2.0/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.5.6/schema.json",
33
"vcs": {
44
"enabled": true,
55
"clientKind": "git",
@@ -26,7 +26,7 @@
2626
"react": "all"
2727
},
2828
"rules": {
29-
"recommended": false,
29+
"preset": "none",
3030
"complexity": {
3131
"noAdjacentSpacesInRegex": "error",
3232
"noBannedTypes": "error",
@@ -72,6 +72,7 @@
7272
"useAsConstAssertion": "error",
7373
"useComponentExportOnlyModules": "warn",
7474
"useImportType": "warn",
75+
"useConsistentArrayType": "error",
7576
"useNamingConvention": {
7677
"level": "error",
7778
"options": {
@@ -238,7 +239,8 @@
238239
"noUnsafeNegation": "error",
239240
"noWith": "error",
240241
"useGetterReturn": "error",
241-
"noTsIgnore": "error"
242+
"noTsIgnore": "error",
243+
"noArrayIndexKey": "warn"
242244
}
243245
},
244246
"includes": ["src/**/*.{ts,tsx,js,json}", "./*.{ts,js,json,html}"]
@@ -264,6 +266,11 @@
264266
"selfCloseVoidElements": "always"
265267
}
266268
},
269+
"css": {
270+
"parser": {
271+
"tailwindDirectives": true
272+
}
273+
},
267274
"overrides": [
268275
{
269276
"includes": ["*.json"],

fission/bun.lock

Lines changed: 14 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

fission/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"postinstall": "bun run lockfile:clean | bun x dev-null"
3232
},
3333
"dependencies": {
34-
"@biomejs/biome": "^2.2.0",
34+
"@biomejs/biome": "^2.5.6",
3535
"@haensl/google-analytics": "^1.2.2",
3636
"@mui/base": "^5.0.0-beta.70",
3737
"@mui/icons-material": "^5.18.0",
@@ -47,6 +47,7 @@
4747
"fuse.js": "^7.1.0",
4848
"jszip": "^3.10.1",
4949
"lygia": "^1.3.3",
50+
"meshoptimizer": "^1.2.0",
5051
"msw": "^2.10.5",
5152
"notistack": "^3.0.2",
5253
"peerjs": "^1.5.5",

fission/src/index.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@import "tailwindcss";
22

3-
@config '../tailwind.config.mjs';
3+
@config "../tailwind.config.mjs";
44

55
/*
66
The default border color has changed to `currentcolor` in Tailwind CSS v4,

fission/src/mirabuf/IntakeSensorSceneObject.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class IntakeSensorSceneObject extends SceneObject {
115115

116116
public dispose(): void {
117117
if (this._joltBodyId) {
118-
World.physicsSystem.destroyBodyIds(this._joltBodyId)
118+
World.physicsSystem.destroyBodiesById(this._joltBodyId)
119119
}
120120

121121
this._collisionUnsubscriber?.()

fission/src/mirabuf/MirabufInstance.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ const transformGeometry = (geometry: THREE.BufferGeometry, mesh: mirabuf.IMesh)
9393
class MirabufInstance {
9494
private _mirabufParser: MirabufParser
9595
private _materials: Map<string, THREE.Material>
96-
private _meshes: Map<MirabufPartInstanceGUID, Array<[THREE.BatchedMesh, number]>>
97-
private _batches: Array<THREE.BatchedMesh>
96+
private _meshes: Map<MirabufPartInstanceGUID, [THREE.BatchedMesh, number][]>
97+
private _batches: THREE.BatchedMesh[]
9898

9999
public get parser() {
100100
return this._mirabufParser
@@ -174,7 +174,7 @@ class MirabufInstance {
174174
maxIndices: number
175175
}
176176

177-
const batchMap = new Map<THREE.Material, Map<string, [mirabuf.IBody, Array<mirabuf.IPartInstance>]>>()
177+
const batchMap = new Map<THREE.Material, Map<string, [mirabuf.IBody, mirabuf.IPartInstance[]]>>()
178178
const countMap = new Map<THREE.Material, BatchCounts>()
179179

180180
// Filter all instances by first material, then body
@@ -194,7 +194,7 @@ class MirabufInstance {
194194

195195
let materialBodyMap = batchMap.get(material)
196196
if (!materialBodyMap) {
197-
materialBodyMap = new Map<string, [mirabuf.IBody, Array<mirabuf.IPartInstance>]>()
197+
materialBodyMap = new Map<string, [mirabuf.IBody, mirabuf.IPartInstance[]]>()
198198
batchMap.set(material, materialBodyMap)
199199
}
200200

fission/src/mirabuf/MirabufLoader.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import InitialConfigPanel from "@/panels/configuring/initial-config/InitialConfi
88
import { PAUSE_REF_ASSEMBLY_SPAWNING } from "@/systems/physics/PhysicsTypes.ts"
99
import { createMirabuf } from "@/mirabuf/MirabufSceneObject.ts"
1010
import { getTargetControls } from "@/systems/scene/CameraControls.ts"
11-
import type { EncodedAssembly, LocalSceneObjectId, Message, RemoteSceneObjectId } from "@/systems/multiplayer/types.ts"
11+
import type { EncodedAssembly, Message } from "@/systems/multiplayer/types.ts"
1212
import { ProgressHandle } from "@/components/ProgressNotificationData.ts"
1313

1414
const MIRABUF_LOCALSTORAGE_GENERATION_KEY = "Synthesis Nonce Key"
@@ -496,7 +496,7 @@ export async function spawnCachedMira(
496496
type: "newObject",
497497
timestamp: Date.now(),
498498
data: {
499-
sceneObjectKey: mirabufSceneObject.id as RemoteSceneObjectId,
499+
sceneObjectKey: mirabufSceneObject.id,
500500
assembly: encodedAssembly,
501501
assemblyHash: info.hash,
502502
miraType: info.miraType,
@@ -505,15 +505,15 @@ export async function spawnCachedMira(
505505
},
506506
}
507507
await World.multiplayerSystem?.broadcast(message)
508-
World.multiplayerSystem?.registerOwnSceneObject(mirabufSceneObject.id as LocalSceneObjectId)
508+
World.multiplayerSystem?.registerOwnSceneObject(mirabufSceneObject.id)
509509
}
510510

511511
if (targetControls && (info.miraType === MiraType.ROBOT || !targetControls.focusProvider)) {
512512
targetControls.focusProvider = mirabufSceneObject
513513
}
514514

515515
progressHandle.done()
516-
516+
World.physicsSystem.deactivateGamepieces()
517517
if (mirabufSceneObject.miraType == MiraType.ROBOT) {
518518
globalOpenPanel(InitialConfigPanel, undefined)
519519
}

fission/src/mirabuf/MirabufParser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ class MirabufParser {
2626
private _nodeNameCounter: number = 0
2727

2828
private _assembly: mirabuf.Assembly
29-
private _errors: Array<ParseError>
29+
private _errors: ParseError[]
3030
private _directedGraph: Graph
3131
private _rootNode: string
3232

3333
protected _partTreeValues: Map<string, number> = new Map()
3434
private _designHierarchyRoot: mirabuf.INode = new mirabuf.Node()
3535

3636
protected _partToNodeMap: Map<string, RigidNode> = new Map()
37-
protected _rigidNodes: Array<RigidNode> = []
37+
protected _rigidNodes: RigidNode[] = []
3838
private _globalTransforms: Map<string, THREE.Matrix4>
3939

4040
private _groundedNode: RigidNode | undefined

0 commit comments

Comments
 (0)