Skip to content

Commit 1981929

Browse files
Merge remote-tracking branch 'origin/dev' into ryan/1925/camera-implementation
2 parents 1a6b417 + ef8121a commit 1981929

File tree

265 files changed

+8243
-8069
lines changed

Some content is hidden

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

265 files changed

+8243
-8069
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
.vscode/
33
build/
44
dist/
5+
out/
6+
renderer/
57
*.log
68
.DS_Store
79
*.pkg

fission/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@ dist-ssr
2828
*.sw?
2929

3030
yarn.lock
31+
32+
test-results
33+
src/test/**/__screenshots__

fission/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ npm run test
7676

7777
## Packaging
7878

79+
### Web Packaging
80+
7981
We have two packaging commands: one for compiling dev for attachment to the in-development endpoint, and another for the release endpoint.
8082

8183
Release:
@@ -94,6 +96,16 @@ You can alternatively run the default build command for your own hosting:
9496
npm run build
9597
```
9698

99+
### Electron Packaging
100+
101+
We also give you the option to package Synthesis with electron. This will not give a performance boost, but it will allow Synthesis to work offline (make sure to also launch the app and download all the robot/field files you want to use).
102+
103+
To package the app run:
104+
```bash
105+
npm run electron:publish
106+
```
107+
The packaged app will be located at synthesis/fission/out.
108+
97109
## Core Systems
98110

99111
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

fission/biome.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.1.2/schema.json",
3-
"vcs": { "enabled": false, "clientKind": "git", "useIgnoreFile": false },
2+
"$schema": "https://biomejs.dev/schemas/2.1.3/schema.json",
3+
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true, "defaultBranch": "dev" },
44
"files": { "ignoreUnknown": false },
55
"formatter": {
66
"enabled": true,
@@ -66,6 +66,7 @@
6666
"useArrayLiterals": "error",
6767
"useAsConstAssertion": "error",
6868
"useComponentExportOnlyModules": "warn",
69+
"useImportType": "warn",
6970
"useNamingConvention": {
7071
"level": "warn",
7172
"options": {
@@ -170,7 +171,7 @@
170171
"attributePosition": "auto",
171172
"bracketSpacing": true
172173
},
173-
"globals": ["COMMIT_HASH"]
174+
"globals": ["COMMIT_HASH", "MAIN_WINDOW_VITE_DEV_SERVER_URL", "MAIN_WINDOW_VITE_NAME"]
174175
},
175176
"html": { "formatter": { "selfCloseVoidElements": "always" } },
176177
"overrides": [

fission/bun.lock

Lines changed: 1045 additions & 198 deletions
Large diffs are not rendered by default.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { defineConfig } from "vite"
2+
3+
// https://vitejs.dev/config
4+
export default defineConfig({
5+
build: {
6+
lib: {
7+
entry: "src/main.ts",
8+
formats: ["cjs"],
9+
fileName: () => "main.cjs",
10+
},
11+
rollupOptions: {
12+
external: ["electron"],
13+
},
14+
},
15+
resolve: {
16+
// Some libs that can run in both Web and Node.js, we need to tell Vite to build them in Node.js.
17+
conditions: ["node"],
18+
mainFields: ["module", "jsnext:main", "jsnext"],
19+
},
20+
})
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { defineConfig } from "vite"
2+
3+
// https://vitejs.dev/config
4+
export default defineConfig({
5+
build: {
6+
lib: {
7+
entry: "src/preload.ts",
8+
formats: ["cjs"],
9+
fileName: () => "preload.cjs",
10+
},
11+
rollupOptions: {
12+
external: ["electron"],
13+
},
14+
},
15+
})
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { defineConfig, mergeConfig } from "vite"
2+
import baseConfig from "../vite.config"
3+
4+
// https://vitejs.dev/config
5+
export default defineConfig((env) => mergeConfig(baseConfig(env), {}))

fission/forge.config.ts

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
import type { ForgeConfig } from "@electron-forge/shared-types"
2+
import { MakerSquirrel } from "@electron-forge/maker-squirrel"
3+
import { MakerZIP } from "@electron-forge/maker-zip"
4+
import { VitePlugin } from "@electron-forge/plugin-vite"
5+
import { FusesPlugin } from "@electron-forge/plugin-fuses"
6+
import { FuseV1Options, FuseVersion } from "@electron/fuses"
7+
import path from "path"
8+
9+
const config: ForgeConfig = {
10+
packagerConfig: {
11+
asar: true,
12+
name: "Synthesis",
13+
executableName: "Synthesis",
14+
icon: path.resolve(__dirname, "src/assets/icons/synthesis-logo"),
15+
},
16+
rebuildConfig: {},
17+
makers: [
18+
new MakerSquirrel({
19+
setupIcon: path.resolve(__dirname, "src/assets/icons/synthesis-logo.ico"),
20+
}),
21+
new MakerZIP({}, ["darwin", "linux"]),
22+
],
23+
plugins: [
24+
new VitePlugin({
25+
build: [
26+
{
27+
entry: "src/main.ts",
28+
config: "electron/vite.main.config.ts",
29+
target: "main",
30+
},
31+
{
32+
entry: "src/preload.ts",
33+
config: "electron/vite.preload.config.ts",
34+
target: "preload",
35+
},
36+
],
37+
renderer: [
38+
{
39+
name: "main_window",
40+
config: "electron/vite.renderer.config.ts",
41+
},
42+
],
43+
}),
44+
// Fuses are used to enable/disable various Electron functionality
45+
// at package time, before code signing the application
46+
new FusesPlugin({
47+
version: FuseVersion.V1,
48+
[FuseV1Options.RunAsNode]: false,
49+
[FuseV1Options.EnableCookieEncryption]: true,
50+
[FuseV1Options.EnableNodeOptionsEnvironmentVariable]: false,
51+
[FuseV1Options.EnableNodeCliInspectArguments]: false,
52+
[FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true,
53+
[FuseV1Options.OnlyLoadAppFromAsar]: true,
54+
}),
55+
],
56+
}
57+
58+
export default config

fission/package.json

Lines changed: 43 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,110 @@
11
{
22
"name": "synthesis-fission",
33
"private": false,
4-
"version": "0.0.1",
4+
"version": "7.1.0",
55
"type": "module",
6+
"main": ".vite/build/main.cjs",
7+
"author": "Autodesk",
8+
"description": "Synthesis",
69
"scripts": {
710
"init": "(bun run assetpack && bun run playwright:install) || (npm run assetpack && npm run playwright:install)",
811
"host": "vite --open --host",
912
"dev": "vite --open",
13+
"test": "vitest",
1014
"build": "tsc && vite build",
1115
"build:prod": "tsc && vite build --base=/fission/ --outDir dist/prod",
1216
"build:dev": "tsc && vite build --base=/fission-closed/ --outDir dist/dev",
1317
"preview": "vite preview --base=/fission/",
14-
"test": "vitest",
1518
"lint": "bunx --bun biome lint",
1619
"lint:fix": "bunx --bun biome lint --fix",
1720
"fmt": "bunx --bun biome format src",
1821
"fmt:fix": "bunx --bun biome format src --write",
1922
"style": "bun run fmt && bun run lint",
2023
"style:fix": "bun run fmt:fix && bun run lint:fix",
2124
"assetpack": "git lfs pull && tar -xf public/assetpack.zip -C public/",
22-
"playwright:install": "bun x playwright install"
25+
"playwright:install": "bun x playwright install",
26+
"electron:start": "electron-forge start",
27+
"electron:package": "electron-forge package",
28+
"electron:make": "electron-forge make",
29+
"electron:publish": "electron-forge publish"
2330
},
2431
"dependencies": {
2532
"@azaleacolburn/jolt-physics": "^0.31.2",
26-
"@biomejs/biome": "^2.1.2",
33+
"@biomejs/biome": "^2.1.3",
2734
"@haensl/google-analytics": "^1.2.2",
2835
"@mui/base": "^5.0.0-dev.20240529-082515-213b5e33ab",
29-
"@mui/icons-material": "^5.17.1",
30-
"@mui/system": "^5.17.1",
36+
"@mui/icons-material": "^5.18.0",
37+
"@mui/system": "^5.18.0",
3138
"@react-three/drei": "^9.122.0",
3239
"@react-three/fiber": "^8.18.0",
3340
"@vitest/browser": "^3.2.4",
3441
"@vitest/coverage-v8": "^3.2.4",
35-
"@xyflow/react": "^12.7.0",
42+
"@xyflow/react": "^12.8.2",
3643
"async-mutex": "^0.5.0",
3744
"colord": "^2.9.3",
45+
"electron-squirrel-startup": "^1.0.1",
3846
"framer-motion": "^10.18.0",
3947
"lygia": "^1.3.3",
40-
"playwright": "^1.54.0",
48+
"msw": "^2.10.4",
49+
"notistack": "^3.0.2",
50+
"playwright": "^1.54.2",
4151
"postprocessing": "^6.37.6",
4252
"react": "^18.3.1",
4353
"react-colorful": "^5.6.1",
4454
"react-dom": "^18.3.1",
55+
"react-draggable": "^4.5.0",
4556
"react-icons": "^4.12.0",
4657
"three": "^0.178.0",
4758
"typescript-cookie": "^1.0.6",
48-
"vitest-browser-react": "^1.0.0"
59+
"uuid": "^11.1.0",
60+
"vitest-browser-react": "^1.0.1"
4961
},
5062
"devDependencies": {
63+
"@electron-forge/cli": "^7.8.1",
64+
"@electron-forge/maker-deb": "^7.8.1",
65+
"@electron-forge/maker-rpm": "^7.8.1",
66+
"@electron-forge/maker-squirrel": "^7.8.1",
67+
"@electron-forge/maker-zip": "^7.8.1",
68+
"@electron-forge/plugin-auto-unpack-natives": "^7.8.1",
69+
"@electron-forge/plugin-fuses": "^7.8.1",
70+
"@electron-forge/plugin-vite": "^7.8.1",
71+
"@electron/fuses": "^1.8.0",
5172
"@emotion/react": "^11.14.0",
52-
"@emotion/styled": "^11.14.0",
53-
"@mui/material": "^5.17.1",
54-
"@testing-library/dom": "^10.4.0",
73+
"@emotion/styled": "^11.14.1",
74+
"@mui/material": "^5.18.0",
75+
"@testing-library/dom": "^10.4.1",
5576
"@testing-library/react": "^16.3.0",
5677
"@testing-library/user-event": "^14.6.1",
57-
"@types/node": "^20.19.1",
78+
"@types/node": "^20.19.9",
5879
"@types/pako": "^2.0.3",
5980
"@types/react": "^18.3.23",
6081
"@types/react-dom": "^18.3.7",
61-
"@types/three": "^0.178.0",
82+
"@types/three": "^0.178.1",
6283
"@typescript-eslint/eslint-plugin": "^7.18.0",
6384
"@typescript-eslint/parser": "^7.18.0",
6485
"@vitejs/plugin-basic-ssl": "^1.2.0",
65-
"@vitejs/plugin-react": "^4.5.2",
66-
"@vitejs/plugin-react-swc": "^3.10.2",
86+
"@vitejs/plugin-react": "^4.7.0",
87+
"@vitejs/plugin-react-swc": "^3.11.0",
6788
"autoprefixer": "^10.4.21",
6889
"cssnano": "^6.1.2",
69-
"eslint-config-prettier": "^8.10.0",
90+
"electron": "^37.2.4",
91+
"eslint-config-prettier": "^8.10.2",
7092
"eslint-import-resolver-alias": "^1.1.2",
71-
"eslint-plugin-import": "^2.31.0",
93+
"eslint-plugin-import": "^2.32.0",
7294
"eslint-plugin-react-hooks": "^4.6.2",
7395
"eslint-plugin-react-refresh": "^0.4.20",
7496
"jsdom": "^24.1.3",
7597
"pako": "^2.1.0",
7698
"postcss": "^8.5.6",
7799
"protobufjs": "^7.5.3",
78100
"protobufjs-cli": "^1.1.3",
79-
"rollup": "^4.44.0",
101+
"rollup": "^4.46.2",
80102
"sirv": "^3.0.1",
81103
"tailwindcss": "^3.4.17",
82104
"tsconfig-paths": "^4.2.0",
83-
"typescript": "^5.8.3",
105+
"typescript": "^5.9.2",
84106
"vite": "^6.3.5",
85-
"vite-plugin-glsl": "^1.5.0",
107+
"vite-plugin-glsl": "^1.5.1",
86108
"vite-plugin-singlefile": "^0.13.5",
87109
"vitest": "^3.2.4"
88110
},

0 commit comments

Comments
 (0)