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:
@@ -26,7 +26,9 @@ function createClickLink(sourceEntityId: string): InteractionLink {
|
||||
};
|
||||
}
|
||||
|
||||
function createNpc(overrides: Partial<RuntimeNpc> & { entityId: string }): RuntimeNpc {
|
||||
function createNpc(
|
||||
overrides: Partial<RuntimeNpc> & { entityId: string }
|
||||
): RuntimeNpc {
|
||||
return {
|
||||
entityId: overrides.entityId,
|
||||
actorId: overrides.actorId ?? "",
|
||||
@@ -38,13 +40,12 @@ function createNpc(overrides: Partial<RuntimeNpc> & { entityId: string }): Runti
|
||||
modelAssetId: overrides.modelAssetId ?? null,
|
||||
dialogues: overrides.dialogues ?? [],
|
||||
defaultDialogueId: overrides.defaultDialogueId ?? null,
|
||||
collider:
|
||||
overrides.collider ?? {
|
||||
mode: "capsule",
|
||||
radius: 0.35,
|
||||
height: 1.8,
|
||||
eyeHeight: 1.6
|
||||
},
|
||||
collider: overrides.collider ?? {
|
||||
mode: "capsule",
|
||||
radius: 0.35,
|
||||
height: 1.8,
|
||||
eyeHeight: 1.6
|
||||
},
|
||||
activeRoutineTitle: overrides.activeRoutineTitle ?? null,
|
||||
animationClipName: overrides.animationClipName ?? null,
|
||||
animationLoop: overrides.animationLoop,
|
||||
@@ -102,7 +103,10 @@ describe("runtime interaction targeting", () => {
|
||||
const scene = createRuntimeSceneFixture({
|
||||
npcs: [centerNpc],
|
||||
interactables: [sideInteractable],
|
||||
links: [createClickLink(centerNpc.entityId), createClickLink(sideInteractable.entityId)]
|
||||
links: [
|
||||
createClickLink(centerNpc.entityId),
|
||||
createClickLink(sideInteractable.entityId)
|
||||
]
|
||||
});
|
||||
|
||||
const candidates = resolveRuntimeTargetCandidates({
|
||||
|
||||
@@ -9,9 +9,7 @@ import {
|
||||
createProjectAssetStorageKey,
|
||||
type ModelAssetRecord
|
||||
} from "../../src/assets/project-assets";
|
||||
import type {
|
||||
ActiveTransformSession
|
||||
} from "../../src/core/transform-session";
|
||||
import type { ActiveTransformSession } from "../../src/core/transform-session";
|
||||
import { createBoxBrush } from "../../src/document/brushes";
|
||||
import { createEmptySceneDocument } from "../../src/document/scene-document";
|
||||
import { createPlayerStartEntity } from "../../src/entities/entity-instances";
|
||||
@@ -275,7 +273,9 @@ async function renderMultiSelectionFixtureApp() {
|
||||
|
||||
await waitFor(() => {
|
||||
expect(viewportHostInstances.length).toBeGreaterThan(0);
|
||||
expect(getTopLeftViewportHost().setBrushSelectionChangeHandler).toHaveBeenCalled();
|
||||
expect(
|
||||
getTopLeftViewportHost().setBrushSelectionChangeHandler
|
||||
).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
return {
|
||||
@@ -611,9 +611,10 @@ describe("transform foundation integration", () => {
|
||||
});
|
||||
|
||||
expect(store.getState().whiteboxSelectionMode).toBe("edge");
|
||||
expect(
|
||||
screen.getByTestId("whitebox-selection-mode-edge")
|
||||
).toHaveAttribute("aria-pressed", "true");
|
||||
expect(screen.getByTestId("whitebox-selection-mode-edge")).toHaveAttribute(
|
||||
"aria-pressed",
|
||||
"true"
|
||||
);
|
||||
|
||||
fireEvent.keyDown(window, {
|
||||
key: "3",
|
||||
@@ -635,7 +636,9 @@ describe("transform foundation integration", () => {
|
||||
expect(
|
||||
screen.getByTestId("whitebox-selection-mode-object")
|
||||
).toHaveAttribute("aria-pressed", "true");
|
||||
expect(screen.getByText(/selection mode set to object/i)).toBeInTheDocument();
|
||||
expect(
|
||||
screen.getByText(/selection mode set to object/i)
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("keeps outliner and viewport selection state synchronized for same-kind multi-selection", async () => {
|
||||
@@ -660,9 +663,10 @@ describe("transform foundation integration", () => {
|
||||
expect(screen.getByText("2 selected")).toBeInTheDocument();
|
||||
expect(screen.getByText("Brush Multi B")).toBeInTheDocument();
|
||||
|
||||
const selectionHandler = viewportHost.setBrushSelectionChangeHandler.mock.calls.at(
|
||||
-1
|
||||
)?.[0] as ((selection: { kind: "entities"; ids: string[] }) => void);
|
||||
const selectionHandler =
|
||||
viewportHost.setBrushSelectionChangeHandler.mock.calls.at(
|
||||
-1
|
||||
)?.[0] as (selection: { kind: "entities"; ids: string[] }) => void;
|
||||
|
||||
act(() => {
|
||||
selectionHandler({
|
||||
|
||||
Reference in New Issue
Block a user