@sequent-org/ifc-viewer 1.1.1-ci.20.0 → 1.2.2-ci.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -10
- package/src/compat/IFCLoader.js +2657 -0
- package/src/ifc/IfcService.js +1 -1
- package/patches/web-ifc-three+0.0.126.patch +0 -27
package/src/ifc/IfcService.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Сервис загрузки IFC моделей и добавления их в сцену three.js
|
|
2
2
|
// Требует three@^0.149 и web-ifc-three совместимой версии
|
|
3
3
|
|
|
4
|
-
import { IFCLoader } from "
|
|
4
|
+
import { IFCLoader } from "../compat/IFCLoader.js";
|
|
5
5
|
// Примечание: IFCWorker не используется, так как мы отключаем Web Workers
|
|
6
6
|
// для стабильности работы в различных окружениях
|
|
7
7
|
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
diff --git a/node_modules/web-ifc-three/IFCLoader.js b/node_modules/web-ifc-three/IFCLoader.js
|
|
2
|
-
index 1e86ae7..6ad6212 100644
|
|
3
|
-
--- a/node_modules/web-ifc-three/IFCLoader.js
|
|
4
|
-
+++ b/node_modules/web-ifc-three/IFCLoader.js
|
|
5
|
-
@@ -1,7 +1,7 @@
|
|
6
|
-
import * as WebIFC from 'web-ifc';
|
|
7
|
-
import { IFCSPACE, IFCOPENINGELEMENT, IFCPRODUCTDEFINITIONSHAPE, IFCRELAGGREGATES, IFCRELCONTAINEDINSPATIALSTRUCTURE, IFCRELDEFINESBYPROPERTIES, IFCRELASSOCIATESMATERIAL, IFCRELDEFINESBYTYPE, IFCPROJECT, IFCBUILDING } from 'web-ifc';
|
|
8
|
-
import { Mesh, Color, MeshLambertMaterial, DoubleSide, Matrix4, BufferGeometry, BufferAttribute, Loader, FileLoader } from 'three';
|
|
9
|
-
-import { mergeGeometries } from 'three/examples/jsm/utils/BufferGeometryUtils';
|
|
10
|
-
+import { mergeBufferGeometries } from 'three/examples/jsm/utils/BufferGeometryUtils.js';
|
|
11
|
-
|
|
12
|
-
const nullIfcManagerErrorMessage = 'IfcManager is null!';
|
|
13
|
-
|
|
14
|
-
@@ -171,11 +171,11 @@ class IFCParser {
|
|
15
|
-
const materials = [];
|
|
16
|
-
Object.keys(this.geometriesByMaterials).forEach((key) => {
|
|
17
|
-
const geometriesByMaterial = this.geometriesByMaterials[key].geometries;
|
|
18
|
-
- const merged = mergeGeometries(geometriesByMaterial);
|
|
19
|
-
+ const merged = mergeBufferGeometries(geometriesByMaterial);
|
|
20
|
-
materials.push(this.geometriesByMaterials[key].material);
|
|
21
|
-
geometries.push(merged);
|
|
22
|
-
});
|
|
23
|
-
- const combinedGeometry = mergeGeometries(geometries, true);
|
|
24
|
-
+ const combinedGeometry = mergeBufferGeometries(geometries, true);
|
|
25
|
-
this.cleanUpGeometryMemory(geometries);
|
|
26
|
-
if (this.BVH)
|
|
27
|
-
this.BVH.applyThreeMeshBVH(combinedGeometry);
|