Update tests for thirdPerson navigation mode
This commit is contained in:
@@ -127,6 +127,7 @@ function createRuntimeSceneFixture(): RuntimeSceneDefinition {
|
||||
height: 1.8,
|
||||
eyeHeight: 1.6
|
||||
},
|
||||
navigationMode: "thirdPerson",
|
||||
spawn: {
|
||||
source: "fallback",
|
||||
entityId: null,
|
||||
|
||||
@@ -28,7 +28,7 @@ describe("validateRuntimeSceneBuild", () => {
|
||||
}
|
||||
},
|
||||
{
|
||||
navigationMode: "orbitVisitor",
|
||||
navigationMode: "thirdPerson",
|
||||
loadedModelAssets: {}
|
||||
}
|
||||
);
|
||||
@@ -57,7 +57,7 @@ describe("validateRuntimeSceneBuild", () => {
|
||||
}
|
||||
},
|
||||
{
|
||||
navigationMode: "orbitVisitor",
|
||||
navigationMode: "thirdPerson",
|
||||
loadedModelAssets: {
|
||||
[asset.id]: loadedAsset
|
||||
}
|
||||
@@ -88,7 +88,7 @@ describe("validateRuntimeSceneBuild", () => {
|
||||
}
|
||||
},
|
||||
{
|
||||
navigationMode: "orbitVisitor",
|
||||
navigationMode: "thirdPerson",
|
||||
loadedModelAssets: {
|
||||
[asset.id]: loadedAsset
|
||||
}
|
||||
|
||||
@@ -115,6 +115,7 @@ describe("validateSceneDocument", () => {
|
||||
z: 0
|
||||
},
|
||||
yawDegrees: Number.NaN,
|
||||
navigationMode: "firstPerson",
|
||||
collider: {
|
||||
mode: "capsule",
|
||||
eyeHeight: 3,
|
||||
|
||||
@@ -33,6 +33,9 @@ function createRuntimeControllerContext() {
|
||||
inWater: false,
|
||||
inFog: false
|
||||
}),
|
||||
resolveThirdPersonCameraCollision: (_pivot, desiredCameraPosition) => ({
|
||||
...desiredCameraPosition
|
||||
}),
|
||||
setRuntimeMessage: vi.fn(),
|
||||
setFirstPersonTelemetry: vi.fn()
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ describe("RuntimeHost", () => {
|
||||
});
|
||||
|
||||
host.loadScene(runtimeScene);
|
||||
host.setNavigationMode("orbitVisitor");
|
||||
host.setNavigationMode("thirdPerson");
|
||||
|
||||
expect(sceneLoadStates).toEqual([
|
||||
{
|
||||
@@ -77,7 +77,7 @@ describe("RuntimeHost", () => {
|
||||
message: null
|
||||
});
|
||||
expect(runtimeMessages).toContain(
|
||||
"Orbit Visitor active. Drag to orbit around the scene and use the mouse wheel to zoom."
|
||||
"Third Person active. Drag to orbit the camera, use WASD to move, and scroll to zoom."
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user