Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into jwrigh/1699/aps-refres…
Browse files Browse the repository at this point in the history
…h-token
  • Loading branch information
PepperLola committed Jul 9, 2024
2 parents fb390de + f3f7325 commit f429e64
Show file tree
Hide file tree
Showing 42 changed files with 1,925 additions and 686 deletions.
14 changes: 13 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
# This file is used to auto request reviews for a pull request
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

* @autodesk/synthesis-devs
/exporter/ @autodesk/fusion [email protected]

/fission/src/aps/ @autodesk/fusion [email protected]
/fission/src/mirabuf/ @autodesk/fusion [email protected]
/fission/src/proto/ @autodesk/fusion [email protected]

/fission/src/ui/components/ [email protected] [email protected] [email protected]
/fission/**/*.css [email protected] [email protected] [email protected]

/fission/ @autodesk/fission [email protected]
/installer/ @autodesk/fusion [email protected]

* @autodesk/synthesis-devs [email protected]
17 changes: 13 additions & 4 deletions .github/workflows/FissionESLintFormat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,26 @@ jobs:
cd fission
npm run lint
continue-on-error: true
- name: Check EsLint
run: |
if [ ${{ steps.linter-validation.outcome }} == "success" ]; then
echo "EsLint Validation Passed"
else
echo "EsLint Validation Failed"
exit 1
fi
- name: Prettier
id: prettier-validation
run: |
cd fission
npx prettier --version
npm run prettier
continue-on-error: true
- name: Check Success
- name: Check Prettier
run: |
if [ ${{ steps.linter-validation.outcome }} == "success" ]; then
echo "Format Validation Passed"
if [ ${{ steps.prettier-validation.outcome }} == "success" ]; then
echo "Prettier Validation Passed"
else
echo "Format Validation Failed"
echo "Prettier Validation Failed"
exit 1
fi
15 changes: 12 additions & 3 deletions .github/workflows/FissionPackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
- name: Install Dependencies
run: |
cd fission
rm package-lock.json
npm install
- name: Get package info
Expand All @@ -37,11 +38,19 @@ jobs:
id: build
run: |
cd fission
npm run build
npm run build:prod
npm run build:dev
- name: Upload Artifact
uses: actions/upload-artifact@v4
id: upload-artifact
id: upload-artifact-prod
with:
name: "${{ steps.info.outputs.name }}@${{ steps.info.outputs.version }}[${{ steps.date.outputs.timestamp }}]"
path: fission/dist/
path: fission/dist/prod/

- name: Upload Artifact
uses: actions/upload-artifact@v4
id: upload-artifact-dev
with:
name: "${{ steps.info.outputs.name }}-dev@${{ steps.info.outputs.version }}[${{ steps.date.outputs.timestamp }}]"
path: fission/dist/dev/
Binary file modified fission/bun.lockb
Binary file not shown.
54 changes: 52 additions & 2 deletions fission/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions fission/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
"scripts": {
"dev": "vite --open",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives",
"build:prod": "tsc && vite build --base=/fission/ --outDir dist/prod",
"build:dev": "tsc && vite build --base=/fission-closed/ --outDir dist/dev",
"preview": "vite preview --base=/fission/",
"test": "vitest",
"lint:fix": "bun run lint --fix || npm run lint --fix",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives",
"lint:fix": "eslint . --ext ts,tsx --report-unused-disable-directives --fix",
"prettier": "bun x prettier src --check || npx prettier src --check",
"prettier:fix": "bun run prettier --write || npm run prettier --write",
"prettier:fix": "bun x prettier src --write || npx prettier src --write",
"format": "(bun run prettier:fix && bun run lint:fix) || (npm run prettier:fix && npm run lint:fix)",
"build:prod": "tsc && vite build --base=/fission/",
"assetpack": "curl -o public/assetpack.zip https://synthesis.autodesk.com/Downloadables/assetpack.zip && tar -xf public/assetpack.zip -C public/",
"playwright:install": "bun x playwright install || npx playwright install"
},
Expand All @@ -30,6 +31,7 @@
"colord": "^2.9.3",
"framer-motion": "^10.13.1",
"playwright": "^1.45.0",
"lygia": "^1.1.3",
"react": "^18.2.0",
"react-colorful": "^5.6.1",
"react-dom": "^18.2.0",
Expand Down Expand Up @@ -65,8 +67,9 @@
"protobufjs-cli": "^1.1.2",
"tailwindcss": "^3.3.3",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.2.2",
"typescript": "^5.4.5",
"vite": "^5.1.4",
"vite-plugin-glsl": "^1.3.0",
"vite-plugin-singlefile": "^0.13.5",
"vitest": "^1.5.3"
}
Expand Down
1 change: 1 addition & 0 deletions fission/prettier.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const config = {
},
},
],
endOfLine: "lf",
}

export default config
17 changes: 12 additions & 5 deletions fission/src/Synthesis.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Scene from "@/components/Scene.tsx"
import MirabufSceneObject from "./mirabuf/MirabufSceneObject.ts"
import { LoadMirabufRemote } from "./mirabuf/MirabufLoader.ts"
import MirabufCachingService, { MiraType } from "./mirabuf/MirabufLoader.ts"
import { mirabuf } from "./proto/mirabuf"
import MirabufParser, { ParseErrorSeverity } from "./mirabuf/MirabufParser.ts"
import MirabufInstance from "./mirabuf/MirabufInstance.ts"
Expand All @@ -25,7 +25,7 @@ import UpdateAvailableModal from "@/modals/UpdateAvailableModal"
import ViewModal from "@/modals/ViewModal"
import ConnectToMultiplayerModal from "@/modals/aether/ConnectToMultiplayerModal"
import ServerHostingModal from "@/modals/aether/ServerHostingModal"
import ChangeInputsModal from "@/modals/configuring/ChangeInputsModal"
import ChangeInputsModal from "@/ui/modals/configuring/ChangeInputsModal.tsx"
import ChooseMultiplayerModeModal from "@/modals/configuring/ChooseMultiplayerModeModal"
import ChooseSingleplayerModeModal from "@/modals/configuring/ChooseSingleplayerModeModal"
import ConfigMotorModal from "@/modals/configuring/ConfigMotorModal"
Expand Down Expand Up @@ -55,6 +55,8 @@ import { AddRobotsModal, AddFieldsModal, SpawningModal } from "@/modals/spawning
import ImportMirabufModal from "@/modals/mirabuf/ImportMirabufModal.tsx"
import ImportLocalMirabufModal from "@/modals/mirabuf/ImportLocalMirabufModal.tsx"
import APS, { ENDPOINT_SYNTHESIS_CHALLENGE } from "./aps/APS.ts"

Check warning on line 57 in fission/src/Synthesis.tsx

View workflow job for this annotation

GitHub Actions / ESLint Format Validation

'ENDPOINT_SYNTHESIS_CHALLENGE' is defined but never used. Allowed unused vars must match /^_/u

Check warning on line 57 in fission/src/Synthesis.tsx

View workflow job for this annotation

GitHub Actions / ESLint Format Validation

'ENDPOINT_SYNTHESIS_CHALLENGE' is defined but never used. Allowed unused vars must match /^_/u
import ResetAllInputsModal from "./ui/modals/configuring/ResetAllInputsModal.tsx"
import Skybox from './ui/components/Skybox.tsx';

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

Expand Down Expand Up @@ -95,10 +97,12 @@ function Synthesis() {
}

const setup = async () => {
const miraAssembly = await LoadMirabufRemote(mira_path)
.catch(_ => LoadMirabufRemote(DEFAULT_MIRA_PATH))
const info = await MirabufCachingService.CacheRemote(mira_path, MiraType.ROBOT)
.catch(_ => MirabufCachingService.CacheRemote(DEFAULT_MIRA_PATH, MiraType.ROBOT))
.catch(console.error)

const miraAssembly = await MirabufCachingService.Get(info!.id, MiraType.ROBOT)

await (async () => {
if (!miraAssembly || !(miraAssembly instanceof mirabuf.Assembly)) {
return
Expand All @@ -110,10 +114,11 @@ function Synthesis() {
return
}

const mirabufSceneObject = new MirabufSceneObject(new MirabufInstance(parser))
const mirabufSceneObject = new MirabufSceneObject(new MirabufInstance(parser), miraAssembly.info!.name!)
World.SceneRenderer.RegisterSceneObject(mirabufSceneObject)
})()
}

setup()

let mainLoopHandle = 0
Expand All @@ -134,6 +139,7 @@ function Synthesis() {

return (
<AnimatePresence>
<Skybox key="123"/>
<TooltipControlProvider
showTooltip={(type: TooltipType, controls?: TooltipControl[], duration: number = TOOLTIP_DURATION) => {
showTooltip(type, controls, duration)
Expand Down Expand Up @@ -182,6 +188,7 @@ const initialModals = [
<ConnectToMultiplayerModal modalId="connect-to-multiplayer" />,
<ServerHostingModal modalId="server-hosting" />,
<ChangeInputsModal modalId="change-inputs" />,
<ResetAllInputsModal modalId="reset-inputs" />,
<ChooseMultiplayerModeModal modalId="multiplayer-mode" />,
<ChooseSingleplayerModeModal modalId="singleplayer-mode" />,
<PracticeSettingsModal modalId="practice-settings" />,
Expand Down
9 changes: 0 additions & 9 deletions fission/src/mirabuf/MirabufInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,6 @@ class MirabufInstance {
const assembly = this._mirabufParser.assembly
const instances = assembly.data!.parts!.partInstances!

let totalMeshCount = 0

for (const instance of Object.values(instances) /* .filter(x => x.info!.name!.startsWith('EyeBall')) */) {
const definition = assembly.data!.parts!.partDefinitions![instance.partDefinitionReference!]!
const bodies = definition.bodies
Expand All @@ -170,10 +168,6 @@ class MirabufInstance {
? this._materials.get(appearanceOverride)!
: fillerMaterials[nextFillerMaterial++ % fillerMaterials.length]

// if (NORMAL_MATERIALS) {
// material = new THREE.MeshNormalMaterial();
// }

const threeMesh = new THREE.Mesh(geometry, material)
threeMesh.receiveShadow = true
threeMesh.castShadow = true
Expand All @@ -186,11 +180,8 @@ class MirabufInstance {
}
}
}
totalMeshCount += meshes.length
this._meshes.set(instance.info!.GUID!, meshes)
}

console.debug(`Created '${totalMeshCount}' meshes for mira file '${this._mirabufParser.assembly.info!.name!}'`)
}

/**
Expand Down
Loading

0 comments on commit f429e64

Please sign in to comment.