@sequent-org/ifc-viewer 1.2.3-ci.22.0 → 1.2.4-ci.24.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/IfcViewer.js +19 -57
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.4-ci.24.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/IfcViewer.js
CHANGED
|
@@ -292,66 +292,34 @@ export class IfcViewer {
|
|
|
292
292
|
_createInterface() {
|
|
293
293
|
// Основная разметка просмотрщика
|
|
294
294
|
const html = `
|
|
295
|
-
<div class="ifc-viewer-container" style="width: 100%; height: 100%; position: relative; display: flex; flex-direction: column;">
|
|
296
|
-
|
|
297
|
-
<div id="
|
|
298
|
-
<div class="
|
|
299
|
-
<span class="
|
|
295
|
+
<div class="ifc-viewer-container" style="width: 100%; height: 100%; position: relative; display: flex; flex-direction: column; border:0px red solid;">
|
|
296
|
+
<!-- Прелоадер -->
|
|
297
|
+
<div id="ifcPreloader" class="absolute inset-0 bg-base-100 flex items-center justify-center z-50">
|
|
298
|
+
<div class="text-center">
|
|
299
|
+
<span class="loading loading-spinner loading-lg"></span>
|
|
300
|
+
<div class="mt-2 text-sm opacity-70">Загрузка модели...</div>
|
|
300
301
|
</div>
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
</div>
|
|
302
|
+
</div>
|
|
303
|
+
|
|
304
|
+
<!-- Верхняя панель управления -->
|
|
305
|
+
<div id="ifcToolbar" class="d-flex px-4" style="border:0px red solid; width: 250px; position: absolute; z-index: 1000; justify-content:space-between; bottom: 10px; left: calc(50% - 125px); ">
|
|
306
|
+
|
|
307
|
+
<div class="navbar-end flex gap-2">
|
|
308
308
|
|
|
309
309
|
<!-- Стили отображения -->
|
|
310
310
|
<div class="join">
|
|
311
|
-
<button class="btn btn-sm join-item btn-active" id="ifcToggleEdges"
|
|
312
|
-
<button class="btn btn-sm join-item btn-active" id="ifcToggleShading">Flat</button>
|
|
311
|
+
<button class="btn btn-sm join-item btn-active" id="ifcToggleEdges"><svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" class="c-tree__icon c-tree__icon--3d"><g fill="#252A3F" fill-rule="nonzero"><path d="M12.5 5L6.005 8.75v7.5L12.5 20l6.495-3.75v-7.5L12.5 5zm0-1.155l7.495 4.328v8.654L12.5 21.155l-7.495-4.328V8.173L12.5 3.845z"></path><path d="M12 12v8.059h1V12z"></path><path d="M5.641 9.157l7.045 4.025.496-.868-7.045-4.026z"></path><path d="M18.863 8.288l-7.045 4.026.496.868 7.045-4.025z"></path></g></svg></button>
|
|
313
312
|
</div>
|
|
314
313
|
|
|
315
314
|
<!-- Секущие плоскости -->
|
|
316
315
|
<div class="join">
|
|
317
|
-
<button class="btn btn-sm join-item" id="ifcClipX"
|
|
318
|
-
<button class="btn btn-sm join-item" id="
|
|
319
|
-
<button class="btn btn-sm join-item" id="
|
|
316
|
+
<button class="btn btn-sm join-item" id="ifcClipX" style="margin-right:2px"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="MuiSvgIcon-root MuiSvgIcon-fontSizeLarge" focusable="false" viewBox="0 0 24 24" aria-hidden="true"><path d="M9.6 3v9.07l3.87-1.72a2 2 0 01.81-.17 2.08 2.08 0 011.77 3.09 1.09 1.09 0 01-.56.56l-4.36 1.94L21.6 21V9z"></path><path d="M4.74 15.33l9.14-4.07a1 1 0 011.32.51 1 1 0 01-.51 1.32l-9.14 4.07 4 1.52L9 20l-6.6-2.53 2.53-6.6 1.32.51z"></path></svg></button>
|
|
317
|
+
<button class="btn btn-sm join-item" id="ifcClipZ" style="margin-right:2px"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="MuiSvgIcon-root MuiSvgIcon-fontSizeLarge" focusable="false" viewBox="0 0 24 24" aria-hidden="true"><path d="M8 13.82a1.09 1.09 0 01-.56-.56 2.08 2.08 0 011.78-3.09 2 2 0 01.81.17l3.87 1.72V3l-11 6v12l9.54-5.2z"></path><path d="M17.24 11.37l1.32-.51 2.53 6.6L14.5 20l-.5-1.32 4-1.52-9.18-4.07a1 1 0 01-.51-1.32 1 1 0 011.32-.51l9.14 4.07z"></path></svg></button>
|
|
318
|
+
<button class="btn btn-sm join-item" id="ifcClipY" style="margin-right:2px"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="MuiSvgIcon-root MuiSvgIcon-fontSizeLarge" focusable="false" viewBox="0 0 24 24" aria-hidden="true"><path d="M14.25 11.18v3.52A1.87 1.87 0 0111 15.88a1 1 0 01-.32-.72V11.1l-9 4.5L12.45 21l9.9-5.4z"></path><path d="M8.85 8.4L8 7.5 12.45 3 17 7.5l-.9.9-2.7-2.7v9a.9.9 0 01-.9.9.9.9 0 01-.9-.9v-9z"></path></svg></button>
|
|
320
319
|
</div>
|
|
321
|
-
|
|
322
|
-
<!-- Кнопка загрузки файла -->
|
|
323
|
-
<button id="ifcUploadBtnTop" class="btn btn-sm bg-white text-black">📁 Загрузить</button>
|
|
320
|
+
|
|
324
321
|
</div>
|
|
325
|
-
</div>
|
|
326
|
-
|
|
327
|
-
<!-- Слайдеры секущих плоскостей (изначально скрыты) -->
|
|
328
|
-
<div id="ifcClipControls" class="bg-base-200 px-4 py-2 border-b border-base-300" style="display: ${this.options.showToolbar ? 'none' : 'none'};">
|
|
329
|
-
<div class="flex items-center gap-4 text-sm">
|
|
330
|
-
<!-- Слайдер X -->
|
|
331
|
-
<div id="ifcClipXControl" class="flex items-center gap-2" style="display: none;">
|
|
332
|
-
<span class="w-12">Clip X:</span>
|
|
333
|
-
<input type="range" id="ifcClipXRange" class="range range-sm flex-1" min="0" max="1" step="0.01" value="0.5">
|
|
334
|
-
</div>
|
|
335
|
-
<!-- Слайдер Y -->
|
|
336
|
-
<div id="ifcClipYControl" class="flex items-center gap-2" style="display: none;">
|
|
337
|
-
<span class="w-12">Clip Y:</span>
|
|
338
|
-
<input type="range" id="ifcClipYRange" class="range range-sm flex-1" min="0" max="1" step="0.01" value="0.5">
|
|
339
|
-
</div>
|
|
340
|
-
<!-- Слайдер Z -->
|
|
341
|
-
<div id="ifcClipZControl" class="flex items-center gap-2" style="display: none;">
|
|
342
|
-
<span class="w-12">Clip Z:</span>
|
|
343
|
-
<input type="range" id="ifcClipZRange" class="range range-sm flex-1" min="0" max="1" step="0.01" value="0.5">
|
|
344
|
-
</div>
|
|
345
|
-
</div>
|
|
346
|
-
</div>
|
|
347
|
-
|
|
348
|
-
<!-- Прелоадер -->
|
|
349
|
-
<div id="ifcPreloader" class="absolute inset-0 bg-base-100 flex items-center justify-center z-50">
|
|
350
|
-
<div class="text-center">
|
|
351
|
-
<span class="loading loading-spinner loading-lg"></span>
|
|
352
|
-
<div class="mt-2 text-sm opacity-70">Загрузка модели...</div>
|
|
353
|
-
</div>
|
|
354
|
-
</div>
|
|
322
|
+
</div>
|
|
355
323
|
|
|
356
324
|
<!-- Основной контейнер просмотрщика -->
|
|
357
325
|
<div id="ifcViewerMain" class="w-full flex-1 relative"></div>
|
|
@@ -389,13 +357,7 @@ export class IfcViewer {
|
|
|
389
357
|
<div id="ifcSidebarToggleContainer" class="absolute top-4 left-4 z-30" style="display: none;">
|
|
390
358
|
<button id="ifcSidebarToggle" class="btn btn-primary btn-sm">☰</button>
|
|
391
359
|
</div>
|
|
392
|
-
|
|
393
|
-
<!-- Панель управления (дополнительные кнопки) -->
|
|
394
|
-
<div id="ifcControls" class="absolute top-4 left-4 z-30" style="${this.options.showControls ? 'margin-top: 3rem;' : 'display: none;'}">
|
|
395
|
-
<!-- Кнопка загрузки -->
|
|
396
|
-
<button id="ifcUploadBtn" class="btn btn-secondary btn-sm">📁</button>
|
|
397
|
-
<input type="file" id="ifcFileInput" accept=".ifc,.ifczip,.zip" style="display: none;">
|
|
398
|
-
</div>
|
|
360
|
+
|
|
399
361
|
|
|
400
362
|
<!-- Панель зума (будет создана Viewer'ом) -->
|
|
401
363
|
<div id="ifcZoomPanel" class="absolute bottom-4 right-4 z-30"></div>
|