Update tests to reflect new collider expectations

This commit is contained in:
2026-04-13 17:31:04 +02:00
parent e1d1994342
commit 2338adcae4

View File

@@ -355,7 +355,7 @@ describe("buildRuntimeSceneFromDocument", () => {
z: 0
});
expect(runtimeScene.brushes[0].faces.posY.material?.id).toBe("starter-concrete-checker");
expect(runtimeScene.colliders).toHaveLength(1);
expect(runtimeScene.colliders).toHaveLength(2);
expect(runtimeScene.colliders[0]).toMatchObject({
kind: "trimesh",
source: "brush",
@@ -467,7 +467,13 @@ describe("buildRuntimeSceneFromDocument", () => {
z: -2
},
yawDegrees: 45,
modelAssetId: modelAsset.id
modelAssetId: modelAsset.id,
collider: {
mode: "capsule",
radius: 0.35,
height: 1.8,
eyeHeight: 1.6
}
}
],
soundEmitters: [
@@ -637,6 +643,39 @@ describe("buildRuntimeSceneFromDocument", () => {
}
}
});
expect(runtimeScene.colliders[1]).toMatchObject({
kind: "character",
source: "npc",
entityId: "entity-npc-guide",
position: {
x: -1,
y: 0,
z: -2
},
rotationDegrees: {
x: 0,
y: 45,
z: 0
},
shape: {
mode: "capsule",
radius: 0.35,
height: 1.8,
eyeHeight: 1.6
},
worldBounds: {
min: {
x: -1.35,
y: 0,
z: -2.35
},
max: {
x: -0.65,
y: 1.8,
z: -1.65
}
}
});
expect(runtimeScene.playerCollider).toEqual({
mode: "box",
eyeHeight: 1.4,