auto-git:

[change] tests/domain/scene-document-validation.test.ts
 [change] tests/unit/entity-instances.test.ts
 [change] tests/unit/viewport-canvas.test.tsx
This commit is contained in:
2026-04-27 15:46:11 +02:00
parent 1032dcdbde
commit 80226aa362
3 changed files with 23 additions and 7 deletions

View File

@@ -76,7 +76,9 @@ describe("entity registry defaults", () => {
moveRight: "KeyD",
jump: "Space",
sprint: "ShiftLeft",
crouch: "ControlLeft"
crouch: "ControlLeft",
interact: "MouseLeft",
pauseTime: "KeyP"
},
gamepad: {
moveForward: "leftStickUp",
@@ -86,6 +88,8 @@ describe("entity registry defaults", () => {
jump: "buttonSouth",
sprint: "leftStickPress",
crouch: "buttonEast",
interact: "buttonWest",
pauseTime: "buttonMenu",
cameraLook: "rightStick"
}
}

View File

@@ -335,16 +335,20 @@ describe("ViewportCanvas", () => {
it("pushes editor simulation scene state into the viewport host", async () => {
const sceneDocument = createEmptySceneDocument();
const editorSimulationScene = buildRuntimeSceneFromDocument(sceneDocument);
const editorSimulationClock = createRuntimeClockState(sceneDocument.time);
const editorSimulationController = new EditorSimulationController();
editorSimulationController.updateInputs({
document: sceneDocument,
loadedModelAssets: {}
});
const editorSimulationFrame =
editorSimulationController.getFrameSnapshot();
render(
<ViewportCanvas
panelId="topLeft"
world={sceneDocument.world}
sceneDocument={sceneDocument}
editorSimulationScene={editorSimulationScene}
editorSimulationClock={editorSimulationClock}
editorSimulationController={editorSimulationController}
projectAssets={sceneDocument.assets}
loadedModelAssets={{}}
loadedImageAssets={{}}
@@ -379,8 +383,8 @@ describe("ViewportCanvas", () => {
await waitFor(() => {
expect(viewportHostInstances).toHaveLength(1);
expect(viewportHostInstances[0].updateSimulation).toHaveBeenCalledWith(
editorSimulationScene,
editorSimulationClock
editorSimulationFrame.runtimeScene,
editorSimulationFrame.clock
);
});
});