From 9dcb32003b5a6865672136f6456e607a94fdc9fa Mon Sep 17 00:00:00 2001 From: cvillagrasa Date: Fri, 26 Jan 2024 11:10:36 +0100 Subject: [PATCH 1/2] Use GetNameFromTypeCode instead of constructor.name --- src/plugins/WebIFCLoaderPlugin/WebIFCLoaderPlugin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/WebIFCLoaderPlugin/WebIFCLoaderPlugin.js b/src/plugins/WebIFCLoaderPlugin/WebIFCLoaderPlugin.js index 738c6eab2f..6a204f096d 100644 --- a/src/plugins/WebIFCLoaderPlugin/WebIFCLoaderPlugin.js +++ b/src/plugins/WebIFCLoaderPlugin/WebIFCLoaderPlugin.js @@ -750,7 +750,7 @@ class WebIFCLoaderPlugin extends Plugin { } _parseSpatialChildren(ctx, ifcElement, parentMetaObjectId) { - const metaObjectType = ifcElement.__proto__.constructor.name; + const metaObjectType = this._ifcAPI.GetNameFromTypeCode(ifcElement.type); if (ctx.includeTypes && (!ctx.includeTypes[metaObjectType])) { return; } @@ -765,7 +765,7 @@ class WebIFCLoaderPlugin extends Plugin { _createMetaObject(ctx, ifcElement, parentMetaObjectId) { const id = ifcElement.GlobalId.value; - const metaObjectType = ifcElement.__proto__.constructor.name; + const metaObjectType = this._ifcAPI.GetNameFromTypeCode(ifcElement.type); const metaObjectName = (ifcElement.Name && ifcElement.Name.value !== "") ? ifcElement.Name.value : metaObjectType; const metaObject = { id: id, From b9fd086fb7c7003081375fd4e07fa694f1508414 Mon Sep 17 00:00:00 2001 From: cvillagrasa Date: Fri, 26 Jan 2024 11:21:29 +0100 Subject: [PATCH 2/2] bump web-ifc to upcoming version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d09272dc2d..fd4821573d 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "@loaders.gl/gltf": "^3.2.6", "@loaders.gl/las": "^3.2.6", "html2canvas": "^1.4.1", - "web-ifc": "^0.0.41" + "web-ifc": "^0.0.51" }, "devDependencies": { "@babel/core": "^7.18.6",