auto-git:

[change] src/runtime-three/runtime-scene-build.ts
 [change] src/viewport-three/transform-surface-snap.ts
 [change] src/viewport-three/viewport-host.ts
 [change] tests/domain/runtime-interaction-system.test.ts
 [change] tests/domain/transform-session.command.test.ts
 [change] tests/serialization/scene-document-json.test.ts
 [change] tests/unit/runtime-interaction-system.test.ts
 [change] tests/unit/transform-foundation.integration.test.tsx
This commit is contained in:
2026-05-11 14:15:15 +02:00
parent 01ef204dcc
commit 4b76f1a719
8 changed files with 214 additions and 158 deletions

View File

@@ -159,7 +159,7 @@ function createRuntimeSceneFixture(): RuntimeSceneDefinition {
prompt: "Disabled Prompt",
interactionEnabled: false
}
],
]
},
interactionLinks: [],
control: createEmptyRuntimeControlSurfaceDefinition(),
@@ -288,7 +288,7 @@ describe("RuntimeInteractionSystem", () => {
playAnimation: () => {},
stopAnimation: () => {},
playSound: () => {},
stopSound: () => {},
stopSound: () => {}
}
);
interactionSystem.updatePlayerPosition(
@@ -309,7 +309,7 @@ describe("RuntimeInteractionSystem", () => {
playAnimation: () => {},
stopAnimation: () => {},
playSound: () => {},
stopSound: () => {},
stopSound: () => {}
}
);
@@ -423,7 +423,7 @@ describe("RuntimeInteractionSystem", () => {
dispatches.push(`${link.id}:${instanceId}`);
},
playSound: () => {},
stopSound: () => {},
stopSound: () => {}
}
);
@@ -462,7 +462,9 @@ describe("RuntimeInteractionSystem", () => {
throw new Error("Expected a camera rig entity control target.");
}
dispatches.push(`${link.id}:${effect.type}:${effect.target.entityId}`);
dispatches.push(
`${link.id}:${effect.type}:${effect.target.entityId}`
);
}
})
);
@@ -480,7 +482,9 @@ describe("RuntimeInteractionSystem", () => {
throw new Error("Expected a camera rig entity control target.");
}
dispatches.push(`${link.id}:${effect.type}:${effect.target.entityId}`);
dispatches.push(
`${link.id}:${effect.type}:${effect.target.entityId}`
);
}
})
);
@@ -515,7 +519,9 @@ describe("RuntimeInteractionSystem", () => {
throw new Error("Expected a camera rig entity control target.");
}
dispatches.push(`${link.id}:${effect.type}:${effect.target.entityId}`);
dispatches.push(
`${link.id}:${effect.type}:${effect.target.entityId}`
);
}
})
);
@@ -564,7 +570,7 @@ describe("RuntimeInteractionSystem", () => {
playAnimation: () => {},
stopAnimation: () => {},
playSound: () => {},
stopSound: () => {},
stopSound: () => {}
}
);
interactionSystem.updatePlayerPosition(
@@ -590,7 +596,7 @@ describe("RuntimeInteractionSystem", () => {
playAnimation: () => {},
stopAnimation: () => {},
playSound: () => {},
stopSound: () => {},
stopSound: () => {}
}
);
@@ -728,7 +734,7 @@ describe("RuntimeInteractionSystem", () => {
playAnimation: () => {},
stopAnimation: () => {},
playSound: () => {},
stopSound: () => {},
stopSound: () => {}
}
);
@@ -779,7 +785,7 @@ describe("RuntimeInteractionSystem", () => {
},
stopSound: (soundEmitterId, link) => {
dispatches.push(`${link.id}:${soundEmitterId}`);
},
}
}
);
@@ -1402,7 +1408,9 @@ describe("RuntimeInteractionSystem", () => {
runtimeScene,
{
teleportPlayer: () => {
throw new Error("Teleport should not dispatch for a scene transition.");
throw new Error(
"Teleport should not dispatch for a scene transition."
);
},
startSceneTransition: (request) => {
dispatches.push(
@@ -1410,12 +1418,14 @@ describe("RuntimeInteractionSystem", () => {
);
},
toggleBrushVisibility: () => {
throw new Error("Visibility should not dispatch for a scene transition.");
throw new Error(
"Visibility should not dispatch for a scene transition."
);
},
playAnimation: () => {},
stopAnimation: () => {},
playSound: () => {},
stopSound: () => {},
stopSound: () => {}
}
);

View File

@@ -248,19 +248,25 @@ describe("transform session commit commands", () => {
expect(
supportsTransformOperation(
pathPointResolved.target as NonNullable<typeof pathPointResolved.target>,
pathPointResolved.target as NonNullable<
typeof pathPointResolved.target
>,
"translate"
)
).toBe(true);
expect(
supportsTransformOperation(
pathPointResolved.target as NonNullable<typeof pathPointResolved.target>,
pathPointResolved.target as NonNullable<
typeof pathPointResolved.target
>,
"rotate"
)
).toBe(false);
expect(
supportsTransformOperation(
pathPointResolved.target as NonNullable<typeof pathPointResolved.target>,
pathPointResolved.target as NonNullable<
typeof pathPointResolved.target
>,
"scale"
)
).toBe(false);
@@ -1343,12 +1349,13 @@ describe("transform session commit commands", () => {
};
store.executeCommand(
createCommitTransformSessionCommand(store.getState().document, scaleSession)
createCommitTransformSessionCommand(
store.getState().document,
scaleSession
)
);
expect(
store.getState().document.entities[triggerVolume.id]
).toMatchObject({
expect(store.getState().document.entities[triggerVolume.id]).toMatchObject({
position: {
x: 1,
y: 1,
@@ -1367,9 +1374,7 @@ describe("transform session commit commands", () => {
});
expect(store.undo()).toBe(true);
expect(
store.getState().document.entities[triggerVolume.id]
).toMatchObject({
expect(store.getState().document.entities[triggerVolume.id]).toMatchObject({
rotationDegrees: {
x: 0,
y: 45,
@@ -1379,9 +1384,7 @@ describe("transform session commit commands", () => {
});
expect(store.redo()).toBe(true);
expect(
store.getState().document.entities[triggerVolume.id]
).toMatchObject({
expect(store.getState().document.entities[triggerVolume.id]).toMatchObject({
size: {
x: 4,
y: 3,
@@ -1726,7 +1729,9 @@ describe("transform session commit commands", () => {
createCommitTransformSessionCommand(store.getState().document, session)
);
expect(store.getState().document.modelInstances[modelInstanceA.id]).toMatchObject({
expect(
store.getState().document.modelInstances[modelInstanceA.id]
).toMatchObject({
position: {
x: -2,
y: 0,
@@ -1738,7 +1743,9 @@ describe("transform session commit commands", () => {
z: 2
}
});
expect(store.getState().document.modelInstances[modelInstanceB.id]).toMatchObject({
expect(
store.getState().document.modelInstances[modelInstanceB.id]
).toMatchObject({
position: {
x: 2,
y: 0,
@@ -1760,7 +1767,9 @@ describe("transform session commit commands", () => {
);
expect(store.redo()).toBe(true);
expect(store.getState().document.modelInstances[modelInstanceA.id]).toMatchObject({
expect(
store.getState().document.modelInstances[modelInstanceA.id]
).toMatchObject({
position: {
x: -2,
y: 0,