Skip to content

Commit dde4243

Browse files
committed
Merge Fix
1 parent 4837d34 commit dde4243

3 files changed

Lines changed: 37 additions & 95 deletions

File tree

fission/src/test/PhysicsSystem.test.ts

Lines changed: 0 additions & 81 deletions
This file was deleted.

fission/src/test/physics/PhysicsSystem.test.ts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { test, expect, describe, assert, beforeEach, afterEach } from "vitest"
1+
import { test, expect, describe, assert, beforeEach, afterEach, vi } from "vitest"
22
import PhysicsSystem, { LayerReserve, BodyAssociate } from "../../systems/physics/PhysicsSystem"
33
import MirabufParser from "@/mirabuf/MirabufParser"
44
import MirabufCachingService, { MiraType } from "@/mirabuf/MirabufLoader"
@@ -698,16 +698,3 @@ describe("Update Loop", () => {
698698
expect(body.GetPosition().GetY()).toBeLessThanOrEqual(10)
699699
})
700700
})
701-
702-
describe("Mirabuf Physics Loading", () => {
703-
test("Body Loading (Dozer)", async () => {
704-
const assembly = await MirabufCachingService.cacheRemote("/api/mira/robots/Dozer_v9.mira", MiraType.ROBOT).then(
705-
x => MirabufCachingService.get(x!.id, MiraType.ROBOT)
706-
)
707-
const parser = new MirabufParser(assembly!)
708-
const physSystem = new PhysicsSystem()
709-
const mapping = physSystem.createBodiesFromParser(parser, new LayerReserve())
710-
711-
expect(mapping.size).toBe(7)
712-
})
713-
})
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import { describe, test, expect } from "vitest"
2+
import MirabufParser from "@/mirabuf/MirabufParser"
3+
import MirabufCachingService, { MiraType } from "@/mirabuf/MirabufLoader"
4+
import PhysicsSystem, { LayerReserve } from "@/systems/physics/PhysicsSystem"
5+
6+
describe("Mirabuf Physics Loading", () => {
7+
test("Body Loading (Dozer)", async () => {
8+
const assembly = await MirabufCachingService.cacheRemote("/api/mira/robots/Dozer_v9.mira", MiraType.ROBOT).then(
9+
x => MirabufCachingService.get(x!.id, MiraType.ROBOT)
10+
)
11+
const parser = new MirabufParser(assembly!)
12+
const physSystem = new PhysicsSystem()
13+
const mapping = physSystem.createBodiesFromParser(parser, new LayerReserve())
14+
15+
expect(mapping.size).toBe(7)
16+
})
17+
18+
/*
19+
* Multi-Joint Wheels robot contains
20+
* - 4 wheels (4 revolute joints)
21+
* - 2 additional revolute joints
22+
* - 2 slider joints
23+
* Mira File: https://synthesis.autodesk.com/api/mira/private/Multi-Joint_Wheels_v0.mira
24+
*/
25+
test("Body Loading (Multi-Joint Wheels)", async () => {
26+
const assembly = await MirabufCachingService.cacheRemote(
27+
"/api/mira/private/Multi-Joint_Wheels_v0.mira",
28+
MiraType.ROBOT
29+
).then(x => MirabufCachingService.get(x!.id, MiraType.ROBOT))
30+
const parser = new MirabufParser(assembly!)
31+
const physSystem = new PhysicsSystem()
32+
const mapping = physSystem.createBodiesFromParser(parser, new LayerReserve())
33+
34+
expect(mapping.size).toBe(9)
35+
})
36+
})

0 commit comments

Comments
 (0)