From 12b55c724c3bc69a2d63b2db0788800a44977d1b Mon Sep 17 00:00:00 2001 From: Azalea Colburn Date: Tue, 25 Jun 2024 09:20:55 -0700 Subject: [PATCH 1/4] first attempt at windows assetpack download script --- fission/package.json | 142 +++++++++++++++++++++---------------------- 1 file changed, 71 insertions(+), 71 deletions(-) diff --git a/fission/package.json b/fission/package.json index 126efa86f7..d2cee3a8f5 100644 --- a/fission/package.json +++ b/fission/package.json @@ -1,73 +1,73 @@ { - "name": "synthesis-fission", - "private": false, - "version": "0.0.1", - "type": "module", - "scripts": { - "dev": "vite", - "build": "tsc && vite build", - "lint": "eslint . --ext ts,tsx --report-unused-disable-directives", - "preview": "vite preview --base=/fission/", - "test": "vitest", - "lint:fix": "npm run lint --fix", - "prettier": "npx prettier src --check", - "prettier:fix": "npm run prettier --write", - "format": "npm run prettier:fix && npm run lint:fix", - "build:prod": "tsc && vite build --base=/fission/", - "assetpack": "run-script-os", - "assetpack:nix": "curl -o public/assetpack.zip https://synthesis.autodesk.com/Downloadables/assetpack.zip && unzip -o public/assetpack.zip -d public/", - "assetpack:win32": "echo todo" - }, - "dependencies": { - "@barclah/jolt-physics": "^0.19.3", - "@mui/base": "^5.0.0-beta.40", - "@mui/icons-material": "^5.15.20", - "@mui/system": "^5.15.20", - "@react-three/drei": "^9.96.5", - "@react-three/fiber": "^8.15.15", - "@vitest/coverage-v8": "^1.6.0", - "async-mutex": "^0.5.0", - "colord": "^2.9.3", - "framer-motion": "^10.13.1", - "react": "^18.2.0", - "react-colorful": "^5.6.1", - "react-dom": "^18.2.0", - "react-icons": "^4.10.1", - "run-script-os": "^1.1.6", - "three": "^0.159.0", - "typescript-cookie": "^1.0.6" - }, - "devDependencies": { - "@emotion/react": "^11.11.3", - "@emotion/styled": "^11.11.0", - "@mui/material": "^5.15.6", - "@types/node": "^20.4.4", - "@types/pako": "^2.0.3", - "@types/react": "^18.2.47", - "@types/react-dom": "^18.2.18", - "@types/three": "^0.160.0", - "@typescript-eslint/eslint-plugin": "^7.0.2", - "@typescript-eslint/parser": "^7.0.2", - "@vitejs/plugin-react": "^4.0.3", - "@vitejs/plugin-react-swc": "^3.5.0", - "autoprefixer": "^10.4.14", - "cssnano": "^6.0.1", - "eslint": "^8.56.0", - "eslint-config-prettier": "^8.8.0", - "eslint-import-resolver-alias": "^1.1.2", - "eslint-plugin-react-hooks": "^4.6.0", - "eslint-plugin-react-refresh": "^0.4.5", - "jsdom": "^24.1.0", - "pako": "^2.1.0", - "postcss": "^8.4.26", - "prettier": "^3.0.0", - "protobufjs": "^7.2.6", - "protobufjs-cli": "^1.1.2", - "tailwindcss": "^3.3.3", - "tsconfig-paths": "^4.2.0", - "typescript": "^5.2.2", - "vite": "^5.1.4", - "vite-plugin-singlefile": "^0.13.5", - "vitest": "^1.3.1" - } + "name": "synthesis-fission", + "private": false, + "version": "0.0.1", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "lint": "eslint . --ext ts,tsx --report-unused-disable-directives", + "preview": "vite preview --base=/fission/", + "test": "vitest", + "lint:fix": "npm run lint --fix", + "prettier": "npx prettier src --check", + "prettier:fix": "npm run prettier --write", + "format": "npm run prettier:fix && npm run lint:fix", + "build:prod": "tsc && vite build --base=/fission/", + "assetpack": "run-script-os", + "assetpack:nix": "curl -o public/assetpack.zip https://synthesis.autodesk.com/Downloadables/assetpack.zip && unzip -o public/assetpack.zip -d public/", + "assetpack:win32": "curl -o public/assetpack.zip https://synthesis.autodesk.com/Downloadables/assetpack.zip && tar -xf public/assetpack.zip" + }, + "dependencies": { + "@barclah/jolt-physics": "^0.19.3", + "@mui/base": "^5.0.0-beta.40", + "@mui/icons-material": "^5.15.20", + "@mui/system": "^5.15.20", + "@react-three/drei": "^9.96.5", + "@react-three/fiber": "^8.15.15", + "@vitest/coverage-v8": "^1.6.0", + "async-mutex": "^0.5.0", + "colord": "^2.9.3", + "framer-motion": "^10.13.1", + "react": "^18.2.0", + "react-colorful": "^5.6.1", + "react-dom": "^18.2.0", + "react-icons": "^4.10.1", + "run-script-os": "^1.1.6", + "three": "^0.159.0", + "typescript-cookie": "^1.0.6" + }, + "devDependencies": { + "@emotion/react": "^11.11.3", + "@emotion/styled": "^11.11.0", + "@mui/material": "^5.15.6", + "@types/node": "^20.4.4", + "@types/pako": "^2.0.3", + "@types/react": "^18.2.47", + "@types/react-dom": "^18.2.18", + "@types/three": "^0.160.0", + "@typescript-eslint/eslint-plugin": "^7.0.2", + "@typescript-eslint/parser": "^7.0.2", + "@vitejs/plugin-react": "^4.0.3", + "@vitejs/plugin-react-swc": "^3.5.0", + "autoprefixer": "^10.4.14", + "cssnano": "^6.0.1", + "eslint": "^8.56.0", + "eslint-config-prettier": "^8.8.0", + "eslint-import-resolver-alias": "^1.1.2", + "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-react-refresh": "^0.4.5", + "jsdom": "^24.1.0", + "pako": "^2.1.0", + "postcss": "^8.4.26", + "prettier": "^3.0.0", + "protobufjs": "^7.2.6", + "protobufjs-cli": "^1.1.2", + "tailwindcss": "^3.3.3", + "tsconfig-paths": "^4.2.0", + "typescript": "^5.2.2", + "vite": "^5.1.4", + "vite-plugin-singlefile": "^0.13.5", + "vitest": "^1.3.1" + } } From 13ceea687e6237ac6fbfa75dbd5b4744d1531cde Mon Sep 17 00:00:00 2001 From: Azalea Colburn <62953415+Ewie21@users.noreply.github.com> Date: Tue, 25 Jun 2024 13:00:01 -0700 Subject: [PATCH 2/4] Update fission/package.json Co-authored-by: Brandon Pacewic --- fission/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fission/package.json b/fission/package.json index d2cee3a8f5..63cd896133 100644 --- a/fission/package.json +++ b/fission/package.json @@ -16,7 +16,7 @@ "build:prod": "tsc && vite build --base=/fission/", "assetpack": "run-script-os", "assetpack:nix": "curl -o public/assetpack.zip https://synthesis.autodesk.com/Downloadables/assetpack.zip && unzip -o public/assetpack.zip -d public/", - "assetpack:win32": "curl -o public/assetpack.zip https://synthesis.autodesk.com/Downloadables/assetpack.zip && tar -xf public/assetpack.zip" + "assetpack:win32": "curl -o public/assetpack.zip https://synthesis.autodesk.com/Downloadables/assetpack.zip && tar -xf public/assetpack.zip -C public/" }, "dependencies": { "@barclah/jolt-physics": "^0.19.3", From 11c77ec3c44c5e5b7e7ab182403f94ae62d6d2e5 Mon Sep 17 00:00:00 2001 From: Azalea Colburn Date: Tue, 25 Jun 2024 13:00:58 -0700 Subject: [PATCH 3/4] ran formatter --- fission/src/Synthesis.tsx | 20 +++++++++---------- fission/src/mirabuf/MirabufParser.ts | 2 +- fission/src/ui/ToastContext.tsx | 8 +------- fission/src/ui/components/Dropdown.tsx | 15 +++++++------- fission/src/ui/components/NumberInput.tsx | 2 +- fission/src/ui/components/Scene.tsx | 14 ++++++------- .../theme-editor/ThemeEditorModal.tsx | 6 +----- 7 files changed, 29 insertions(+), 38 deletions(-) diff --git a/fission/src/Synthesis.tsx b/fission/src/Synthesis.tsx index 261efc1615..c6d0fb9a39 100644 --- a/fission/src/Synthesis.tsx +++ b/fission/src/Synthesis.tsx @@ -1,9 +1,9 @@ -import Scene from '@/components/Scene.tsx'; -import MirabufSceneObject from './mirabuf/MirabufSceneObject.ts'; -import { LoadMirabufRemote } from './mirabuf/MirabufLoader.ts'; -import { mirabuf } from './proto/mirabuf'; -import MirabufParser, { ParseErrorSeverity } from './mirabuf/MirabufParser.ts'; -import MirabufInstance from './mirabuf/MirabufInstance.ts'; +import Scene from "@/components/Scene.tsx" +import MirabufSceneObject from "./mirabuf/MirabufSceneObject.ts" +import { LoadMirabufRemote } from "./mirabuf/MirabufLoader.ts" +import { mirabuf } from "./proto/mirabuf" +import MirabufParser, { ParseErrorSeverity } from "./mirabuf/MirabufParser.ts" +import MirabufInstance from "./mirabuf/MirabufInstance.ts" import { AnimatePresence } from "framer-motion" import { ReactElement, useEffect } from "react" import { ModalControlProvider, useModalManager } from "@/ui/ModalContext" @@ -49,10 +49,10 @@ 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 ManageAssembliesModal from '@/modals/spawning/ManageAssembliesModal.tsx'; -import World from '@/systems/World.ts'; -import { AddRobotsModal, AddFieldsModal, SpawningModal } from '@/modals/spawning/SpawningModals.tsx'; -import ImportMirabufModal from '@/modals/mirabuf/ImportMirabufModal.tsx'; +import ManageAssembliesModal from "@/modals/spawning/ManageAssembliesModal.tsx" +import World from "@/systems/World.ts" +import { AddRobotsModal, AddFieldsModal, SpawningModal } from "@/modals/spawning/SpawningModals.tsx" +import ImportMirabufModal from "@/modals/mirabuf/ImportMirabufModal.tsx" const DEFAULT_MIRA_PATH = "/api/mira/Robots/Team 2471 (2018)_v7.mira" diff --git a/fission/src/mirabuf/MirabufParser.ts b/fission/src/mirabuf/MirabufParser.ts index 7936f8ca44..1d503f5623 100644 --- a/fission/src/mirabuf/MirabufParser.ts +++ b/fission/src/mirabuf/MirabufParser.ts @@ -191,7 +191,7 @@ class MirabufParser { // Build undirected graph const graph = new Graph() graph.AddNode(rootNode ? rootNode.id : this._rigidNodes[0].id) - const jointInstances = (Object.values(assembly.data!.joints!.jointInstances!) as mirabuf.joint.JointInstance[]) + const jointInstances = Object.values(assembly.data!.joints!.jointInstances!) as mirabuf.joint.JointInstance[] jointInstances.forEach((x: mirabuf.joint.JointInstance) => { const rA = this._partToNodeMap.get(x.parentPart) const rB = this._partToNodeMap.get(x.childPart) diff --git a/fission/src/ui/ToastContext.tsx b/fission/src/ui/ToastContext.tsx index 2730f7001f..a6ee866b88 100644 --- a/fission/src/ui/ToastContext.tsx +++ b/fission/src/ui/ToastContext.tsx @@ -1,10 +1,4 @@ -import React, { - createContext, - useState, - useContext, - useCallback, - ReactNode, -} from "react" +import React, { createContext, useState, useContext, useCallback, ReactNode } from "react" import Toast from "@/components/Toast" import { AnimatePresence, motion } from "framer-motion" diff --git a/fission/src/ui/components/Dropdown.tsx b/fission/src/ui/components/Dropdown.tsx index ab26a92236..05b684d4a0 100644 --- a/fission/src/ui/components/Dropdown.tsx +++ b/fission/src/ui/components/Dropdown.tsx @@ -39,9 +39,10 @@ const Dropdown: React.FC = ({ label, options, onSelect }) => {