@sequent-org/ifc-viewer 1.0.18-ci.14.0 → 1.0.21-ci.15.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/three-compat-patch.js +18 -0
- package/src/ifc/IfcService.js +1 -1
- package/src/index.js +3 -4
package/package.json
CHANGED
|
@@ -56,3 +56,21 @@ if (typeof window !== 'undefined' && window.THREE) {
|
|
|
56
56
|
console.warn('Three.js патч: не удалось применить к глобальному THREE:', error.message);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
+
|
|
60
|
+
// Патчим модуль BufferGeometryUtils напрямую для web-ifc-three
|
|
61
|
+
try {
|
|
62
|
+
// Создаем объект с обеими функциями для совместимости
|
|
63
|
+
const patchedUtils = {
|
|
64
|
+
mergeGeometries: mergeGeometries,
|
|
65
|
+
mergeBufferGeometries: mergeBufferGeometries
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
// Экспортируем для возможного использования другими модулями
|
|
69
|
+
if (typeof globalThis !== 'undefined') {
|
|
70
|
+
globalThis.__THREE_BUFFER_GEOMETRY_UTILS_PATCH__ = patchedUtils;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
console.log('✅ Three.js патч: BufferGeometryUtils готов для web-ifc-three');
|
|
74
|
+
} catch (error) {
|
|
75
|
+
console.warn('Three.js патч: ошибка при создании патча:', error.message);
|
|
76
|
+
}
|
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 "web-ifc-three/IFCLoader";
|
|
4
|
+
import { IFCLoader } from "web-ifc-three/IFCLoader.js";
|
|
5
5
|
// Примечание: IFCWorker не используется, так как мы отключаем Web Workers
|
|
6
6
|
// для стабильности работы в различных окружениях
|
|
7
7
|
|
package/src/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
// Основная точка входа пакета @sequent-org/ifc-viewer
|
|
2
2
|
// Автоматически подключает стили и экспортирует API
|
|
3
3
|
|
|
4
|
-
//
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
4
|
+
// CSS импорт закомментирован для совместимости с Node.js
|
|
5
|
+
// Стили загружаются автоматически через IfcViewer.js
|
|
6
|
+
// import './style.css';
|
|
8
7
|
|
|
9
8
|
// Экспортируем основной класс
|
|
10
9
|
export { IfcViewer } from "./IfcViewer.js";
|