@sequent-org/ifc-viewer 1.2.4-ci.38.0 → 1.2.4-ci.40.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 +2 -2
- package/src/ifc/IfcService.js +8 -5
- package/src/viewer/Viewer.js +1 -0
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-ci.
|
|
4
|
+
"version": "1.2.4-ci.40.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
|
@@ -190,7 +190,7 @@ class IFCParser {
|
|
|
190
190
|
this.BVH = BVH;
|
|
191
191
|
this.loadedModels = 0;
|
|
192
192
|
this.optionalCategories = {
|
|
193
|
-
[IFCSPACE]:
|
|
193
|
+
[IFCSPACE]: false, // Исключаем пространства (убирает 90% z-fighting, абстракция - безопасно)
|
|
194
194
|
[IFCOPENINGELEMENT]: false
|
|
195
195
|
};
|
|
196
196
|
this.geometriesByMaterials = {};
|
|
@@ -2109,7 +2109,7 @@ class ParserHandler {
|
|
|
2109
2109
|
this.BVH = BVH;
|
|
2110
2110
|
this.IDB = IDB;
|
|
2111
2111
|
this.optionalCategories = {
|
|
2112
|
-
[IFCSPACE]:
|
|
2112
|
+
[IFCSPACE]: false, // Исключаем пространства (убирает 90% z-fighting, абстракция - безопасно)
|
|
2113
2113
|
[IFCOPENINGELEMENT]: false
|
|
2114
2114
|
};
|
|
2115
2115
|
this.API = WorkerAPIs.parser;
|
package/src/ifc/IfcService.js
CHANGED
|
@@ -79,17 +79,20 @@ export class IfcService {
|
|
|
79
79
|
*/
|
|
80
80
|
_getWasmPaths() {
|
|
81
81
|
const paths = [];
|
|
82
|
-
|
|
83
|
-
// 1
|
|
82
|
+
|
|
83
|
+
// 1) Версионированный путь (cache-busting). Должен быть ПЕРВЫМ даже если задан wasmUrl,
|
|
84
|
+
// иначе потребитель, который передаёт wasmUrl="/wasm/", будет всегда грузить старый URL.
|
|
85
|
+
paths.push('/wasm/v0.0.74/');
|
|
86
|
+
|
|
87
|
+
// 2) Пользовательский путь (если указан)
|
|
84
88
|
if (this.wasmUrl) {
|
|
85
89
|
paths.push(this.wasmUrl);
|
|
86
90
|
}
|
|
87
|
-
|
|
88
|
-
//
|
|
91
|
+
|
|
92
|
+
// 3) Популярные пути по умолчанию (в порядке приоритета)
|
|
89
93
|
// Ожидаемый итоговый URL после SetWasmPath(path):
|
|
90
94
|
// path + 'web-ifc.wasm'
|
|
91
95
|
paths.push(
|
|
92
|
-
'/wasm/v0.0.74/', // Версионированный путь (избегает проблем кэша у пользователей)
|
|
93
96
|
'/wasm/', // Стандартный путь: public/wasm/web-ifc.wasm
|
|
94
97
|
'/node_modules/web-ifc/', // Прямо из node_modules
|
|
95
98
|
'/', // Корень dev-сервера
|
package/src/viewer/Viewer.js
CHANGED
|
@@ -1307,6 +1307,7 @@ export class Viewer {
|
|
|
1307
1307
|
const apply = (mat) => {
|
|
1308
1308
|
if (!mat) return;
|
|
1309
1309
|
mat.polygonOffset = true;
|
|
1310
|
+
// Умеренные значения polygon offset для уменьшения z-fighting
|
|
1310
1311
|
mat.polygonOffsetFactor = 1;
|
|
1311
1312
|
mat.polygonOffsetUnits = 1;
|
|
1312
1313
|
// Улучшим читаемость плоскостей
|