@sequent-org/ifc-viewer 1.2.2-ci.21.0 → 1.2.3-ci.22.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 +1 -1
- package/src/compat/IFCLoader.js +3 -3
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sequent-org/ifc-viewer",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.3-ci.22.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "IFC 3D model viewer component for web applications - fully self-contained with local IFCLoader",
|
|
7
7
|
"main": "src/index.js",
|
package/src/compat/IFCLoader.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as WebIFC from 'web-ifc';
|
|
2
2
|
import { IFCSPACE, IFCOPENINGELEMENT, IFCPRODUCTDEFINITIONSHAPE, IFCRELAGGREGATES, IFCRELCONTAINEDINSPATIALSTRUCTURE, IFCRELDEFINESBYPROPERTIES, IFCRELASSOCIATESMATERIAL, IFCRELDEFINESBYTYPE, IFCPROJECT, IFCBUILDING } from 'web-ifc';
|
|
3
3
|
import { Mesh, Color, MeshLambertMaterial, DoubleSide, Matrix4, BufferGeometry, BufferAttribute, Loader, FileLoader } from 'three';
|
|
4
|
-
import {
|
|
4
|
+
import { mergeBufferGeometries } from 'three/examples/jsm/utils/BufferGeometryUtils.js';
|
|
5
5
|
|
|
6
6
|
const nullIfcManagerErrorMessage = 'IfcManager is null!';
|
|
7
7
|
|
|
@@ -171,11 +171,11 @@ class IFCParser {
|
|
|
171
171
|
const materials = [];
|
|
172
172
|
Object.keys(this.geometriesByMaterials).forEach((key) => {
|
|
173
173
|
const geometriesByMaterial = this.geometriesByMaterials[key].geometries;
|
|
174
|
-
const merged =
|
|
174
|
+
const merged = mergeBufferGeometries(geometriesByMaterial);
|
|
175
175
|
materials.push(this.geometriesByMaterials[key].material);
|
|
176
176
|
geometries.push(merged);
|
|
177
177
|
});
|
|
178
|
-
const combinedGeometry =
|
|
178
|
+
const combinedGeometry = mergeBufferGeometries(geometries, true);
|
|
179
179
|
this.cleanUpGeometryMemory(geometries);
|
|
180
180
|
if (this.BVH)
|
|
181
181
|
this.BVH.applyThreeMeshBVH(combinedGeometry);
|