diff --git a/__test__/FileSystem/__snapshots__/wblockClone.test.ts.snap b/__test__/FileSystem/__snapshots__/wblockClone.test.ts.snap index 2cea6e3fb..4fb13d25c 100644 --- a/__test__/FileSystem/__snapshots__/wblockClone.test.ts.snap +++ b/__test__/FileSystem/__snapshots__/wblockClone.test.ts.snap @@ -62,7 +62,7 @@ Array [ 3, 1, "材质1", - 10, + 11, "#ffffff", false, 0.2, @@ -114,6 +114,7 @@ Array [ 0, 1, 0, + false, 0, 0, 0, @@ -257,7 +258,7 @@ Array [ 3, 1, "材质1", - 10, + 11, "#ffffff", false, 0.2, @@ -309,6 +310,7 @@ Array [ 0, 1, 0, + false, "PhysicalMaterialRecord", 2, 103, @@ -316,7 +318,7 @@ Array [ 3, 1, "材质1(1)", - 10, + 11, "#ffffff", false, 0.2, @@ -368,6 +370,7 @@ Array [ 0, 1, 0, + false, 0, 0, 0, @@ -495,7 +498,7 @@ Array [ 3, 1, "材质1", - 10, + 11, "#ffffff", false, 0, @@ -547,6 +550,7 @@ Array [ 0, 1, 0, + false, 0, 0, 0, diff --git a/package.json b/package.json index 1b82e9d54..5ea9ebb14 100644 --- a/package.json +++ b/package.json @@ -159,6 +159,7 @@ "ts", "tsx", "js" - ] + ], + "testEnvironment": "jsdom" } } diff --git a/src/Common/InterfereUtil.ts b/src/Common/InterfereUtil.ts index 37e4cd50c..2b3fb5215 100644 --- a/src/Common/InterfereUtil.ts +++ b/src/Common/InterfereUtil.ts @@ -176,7 +176,7 @@ export class CheckInterfereTool let planeSet = new Set(); let f = new FuzzyFactory; for (let polygon of interCsg.polygons) - planeSet.add(f.lookupOrCreate(polygon.plane, polygon.plane)); + planeSet.add(f.lookupOrCreate((polygon as any).plane, (polygon as any).plane));//防止TS类型检测错误 if (planeSet.size >= 4)//最少4个面围成一个三维实体 {