auto-git:
[change] src/viewport-three/viewport-host.ts [change] tests/domain/build-runtime-scene.test.ts [change] tests/domain/custom-material.command.test.ts [change] tests/domain/delete-project-asset.test.ts [change] tests/domain/scene-document-validation.test.ts [change] tests/serialization/project-document-json.test.ts [change] tests/serialization/project-package.test.ts [change] tests/serialization/scene-document-json.test.ts [change] tests/unit/whitebox-material-inspector.integration.test.tsx
This commit is contained in:
@@ -218,9 +218,9 @@ describe("project document JSON", () => {
|
||||
|
||||
document.scenes[document.activeSceneId]!.foliageLayers[layer.id] = layer;
|
||||
|
||||
expect(parseProjectDocumentJson(serializeProjectDocument(document))).toEqual(
|
||||
document
|
||||
);
|
||||
expect(
|
||||
parseProjectDocumentJson(serializeProjectDocument(document))
|
||||
).toEqual(document);
|
||||
});
|
||||
|
||||
it("round-trips terrain foliage masks in project scenes", () => {
|
||||
@@ -256,9 +256,9 @@ describe("project document JSON", () => {
|
||||
scene.foliageLayers[layer.id] = layer;
|
||||
scene.terrains[terrain.id] = terrain;
|
||||
|
||||
expect(parseProjectDocumentJson(serializeProjectDocument(document))).toEqual(
|
||||
document
|
||||
);
|
||||
expect(
|
||||
parseProjectDocumentJson(serializeProjectDocument(document))
|
||||
).toEqual(document);
|
||||
});
|
||||
|
||||
it("round-trips NPC dialogue references in project scenes", () => {
|
||||
|
||||
@@ -316,9 +316,7 @@ describe("project package serialization", () => {
|
||||
kind: "image",
|
||||
sourceName: "custom-material-map.png",
|
||||
mimeType: "image/png",
|
||||
storageKey: createProjectAssetStorageKey(
|
||||
"asset-image-material-package"
|
||||
),
|
||||
storageKey: createProjectAssetStorageKey("asset-image-material-package"),
|
||||
byteLength: 4,
|
||||
metadata: {
|
||||
kind: "image",
|
||||
@@ -373,7 +371,9 @@ describe("project package serialization", () => {
|
||||
"assets/asset-image-material-package/custom-material-map.png"
|
||||
])
|
||||
);
|
||||
await expect(restoredStorage.getAsset(imageAsset.storageKey)).resolves.toEqual({
|
||||
await expect(
|
||||
restoredStorage.getAsset(imageAsset.storageKey)
|
||||
).resolves.toEqual({
|
||||
files: {
|
||||
[imageAsset.sourceName]: {
|
||||
bytes: expect.any(ArrayBuffer),
|
||||
|
||||
@@ -186,22 +186,7 @@ describe("scene document JSON", () => {
|
||||
}
|
||||
],
|
||||
paintWeights: [
|
||||
0.2,
|
||||
0.3,
|
||||
0.1,
|
||||
0,
|
||||
0.4,
|
||||
0.1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0.5,
|
||||
0,
|
||||
0,
|
||||
0.25,
|
||||
0.25,
|
||||
0.25,
|
||||
0
|
||||
0.2, 0.3, 0.1, 0, 0.4, 0.1, 0, 0, 0, 0.5, 0, 0, 0.25, 0.25, 0.25, 0
|
||||
]
|
||||
});
|
||||
const document = createEmptySceneDocument({
|
||||
@@ -1073,9 +1058,9 @@ describe("scene document JSON", () => {
|
||||
expect(
|
||||
migratedDocument.paths[path.id]?.road.edges.right.collisionEnabled
|
||||
).toBe(false);
|
||||
expect(migratedDocument.paths[path.id]?.repeaters[0]?.collisionEnabled).toBe(
|
||||
false
|
||||
);
|
||||
expect(
|
||||
migratedDocument.paths[path.id]?.repeaters[0]?.collisionEnabled
|
||||
).toBe(false);
|
||||
expect(SPLINE_CORRIDOR_COLLISION_SCENE_DOCUMENT_VERSION).toBe(106);
|
||||
});
|
||||
|
||||
@@ -1175,7 +1160,8 @@ describe("scene document JSON", () => {
|
||||
splineCorridorJunctions: Record<string, { shapeMode?: unknown }>;
|
||||
};
|
||||
|
||||
legacyDocument.version = SPLINE_CORRIDOR_JUNCTION_EDGE_SCENE_DOCUMENT_VERSION;
|
||||
legacyDocument.version =
|
||||
SPLINE_CORRIDOR_JUNCTION_EDGE_SCENE_DOCUMENT_VERSION;
|
||||
delete legacyDocument.splineCorridorJunctions[junction.id]?.shapeMode;
|
||||
|
||||
const migratedDocument = migrateSceneDocument(legacyDocument);
|
||||
@@ -3276,12 +3262,13 @@ describe("scene document JSON", () => {
|
||||
document.brushes[targetBrush.id] = targetBrush;
|
||||
document.entities[linkedNpc.id] = linkedNpc;
|
||||
document.entities[silentNpc.id] = silentNpc;
|
||||
document.interactionLinks["link-npc-toggle"] = createToggleVisibilityInteractionLink({
|
||||
id: "link-npc-toggle",
|
||||
sourceEntityId: linkedNpc.id,
|
||||
trigger: "click",
|
||||
targetBrushId: targetBrush.id
|
||||
});
|
||||
document.interactionLinks["link-npc-toggle"] =
|
||||
createToggleVisibilityInteractionLink({
|
||||
id: "link-npc-toggle",
|
||||
sourceEntityId: linkedNpc.id,
|
||||
trigger: "click",
|
||||
targetBrushId: targetBrush.id
|
||||
});
|
||||
|
||||
const legacyDocument = JSON.parse(
|
||||
serializeSceneDocument(document)
|
||||
|
||||
Reference in New Issue
Block a user