architwin 1.14.12 → 1.14.14
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/lib/architwin.js +1 -1
- package/lib/atwinui/components/toolbar/i18n.js +10 -2
- package/lib/atwinui/components/toolbar/screenSharePane.js +2 -2
- package/lib/atwinui/components/toolbar/spacePartition/roomFormPane.js +83 -20
- package/lib/atwinui/components/toolbar/spacePartition/roomTreePane.d.ts +9 -1
- package/lib/atwinui/components/toolbar/spacePartition/roomTreePane.js +219 -57
- package/lib/atwinui/events.d.ts +2 -1
- package/lib/atwinui/events.js +53 -8
- package/lib/loaders/polydrawerLoader.d.ts +3 -0
- package/lib/loaders/polydrawerLoader.js +26 -22
- package/lib/types.d.ts +5 -0
- package/package.json +1 -1
- package/static/atwinui.css +41 -8
- package/static/utility.css +1 -1
|
@@ -40,6 +40,8 @@ export class TubeLine {
|
|
|
40
40
|
polygonData: undefined,
|
|
41
41
|
renderPolygonOnAdd: true,
|
|
42
42
|
targetUUID: undefined,
|
|
43
|
+
isWindowEditing: false,
|
|
44
|
+
objectIndex: undefined
|
|
43
45
|
};
|
|
44
46
|
//@ts-expect-error
|
|
45
47
|
this.outputs = {
|
|
@@ -87,7 +89,9 @@ export class TubeLine {
|
|
|
87
89
|
drawingMode: this.inputs.drawingMode,
|
|
88
90
|
targetIndex: this.inputs.targetIndex,
|
|
89
91
|
polygonData: this.inputs.polygonData,
|
|
90
|
-
targetUUID: this.inputs.targetUUID
|
|
92
|
+
targetUUID: this.inputs.targetUUID,
|
|
93
|
+
isWindowEditing: this.inputs.isWindowEditing,
|
|
94
|
+
objectIndex: this.inputs.objectIndex,
|
|
91
95
|
};
|
|
92
96
|
renderPolygon(this.inputs.path, options);
|
|
93
97
|
}
|
|
@@ -496,8 +500,7 @@ export class BufferGeometry {
|
|
|
496
500
|
floorName: '',
|
|
497
501
|
floorColor: 0x0000ff,
|
|
498
502
|
wallColor: 0xffd150,
|
|
499
|
-
|
|
500
|
-
windowColor: 0xC09672,
|
|
503
|
+
windowColor: 0x275c8b,
|
|
501
504
|
floorOpacity: 0.3,
|
|
502
505
|
wallOpacity: 0.6,
|
|
503
506
|
visible: true,
|
|
@@ -512,7 +515,8 @@ export class BufferGeometry {
|
|
|
512
515
|
targetIndex: undefined,
|
|
513
516
|
targetUUID: undefined,
|
|
514
517
|
deductWindowFromWallArea: true,
|
|
515
|
-
windowOutlineColor:
|
|
518
|
+
windowOutlineColor: 0x65BBE9,
|
|
519
|
+
isWindowEditing: false
|
|
516
520
|
};
|
|
517
521
|
this.emits = {
|
|
518
522
|
changed: true,
|
|
@@ -694,22 +698,17 @@ export class BufferGeometry {
|
|
|
694
698
|
const windowsPolyData = polyData.walls.reduce((acc, wall, index) => {
|
|
695
699
|
if (wall.windows && wall.windows.length > 0) {
|
|
696
700
|
acc = [...acc, ...wall.windows];
|
|
697
|
-
wallDataArray[index].windows = wall.windows
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
// if (wall.windows && wall.windows.length > 0) {
|
|
702
|
-
// totalWindowArea = wall.windows.reduce((sum, window) => {
|
|
703
|
-
// return sum + (window.area || 0);
|
|
704
|
-
// }, 0);
|
|
705
|
-
// }
|
|
706
|
-
// // Subtract window area from wall area
|
|
707
|
-
// wallDataArray[index].area = Math.max(0, wallDataArray[index].area - totalWindowArea);
|
|
708
|
-
// }
|
|
701
|
+
wallDataArray[index].windows = wall.windows.map(window => {
|
|
702
|
+
window.wall_uuid = wall.uuid;
|
|
703
|
+
return window;
|
|
704
|
+
});
|
|
709
705
|
}
|
|
710
706
|
return acc;
|
|
711
707
|
}, []);
|
|
712
|
-
this.renderWindows(windowsPolyData)
|
|
708
|
+
//this.renderWindows(windowsPolyData)
|
|
709
|
+
for (let i = 0; i < polyData.walls.length; i++) {
|
|
710
|
+
this.renderWindows(polyData.walls[i].windows);
|
|
711
|
+
}
|
|
713
712
|
}
|
|
714
713
|
}
|
|
715
714
|
catch (error) {
|
|
@@ -755,7 +754,7 @@ export class BufferGeometry {
|
|
|
755
754
|
};
|
|
756
755
|
windowDataArray.push(windowEdges);
|
|
757
756
|
}
|
|
758
|
-
let windowName =
|
|
757
|
+
let windowName = `Window ${this.inputs.targetIndex + 1}`;
|
|
759
758
|
let windowMaterial = undefined;
|
|
760
759
|
if (polyData.walls[targetWallIndex] && polyData.walls[targetWallIndex].windows[this.inputs.targetIndex]) {
|
|
761
760
|
const currWindow = polyData.walls[targetWallIndex].windows[this.inputs.targetIndex];
|
|
@@ -768,6 +767,7 @@ export class BufferGeometry {
|
|
|
768
767
|
path: this.inputs.path,
|
|
769
768
|
name: windowName,
|
|
770
769
|
index: this.inputs.targetIndex,
|
|
770
|
+
wall_uuid: this.inputs.targetUUID,
|
|
771
771
|
options: {
|
|
772
772
|
color: this.inputs.windowColor,
|
|
773
773
|
is_visible: true,
|
|
@@ -792,7 +792,7 @@ export class BufferGeometry {
|
|
|
792
792
|
return sum + (window.area || 0);
|
|
793
793
|
}, 0);
|
|
794
794
|
}
|
|
795
|
-
polyData.walls[targetWallIndex].
|
|
795
|
+
polyData.walls[targetWallIndex].netArea = Math.max(0, polyData.walls[targetWallIndex].area - totalWindowArea);
|
|
796
796
|
}
|
|
797
797
|
partitionData = polyData;
|
|
798
798
|
}
|
|
@@ -965,6 +965,7 @@ export class BufferGeometry {
|
|
|
965
965
|
wallMesh.name = this.inputs.uuid != '' ? `${this.inputs.uuid}_wall-${i}` : `wall-${i}`;
|
|
966
966
|
const wallLength = new THREE.Vector3(endPoint.x - startPoint.x, endPoint.y - startPoint.y, endPoint.z - startPoint.z).length();
|
|
967
967
|
let wallArea = wallLength * WALL_HEIGHT;
|
|
968
|
+
let netWallArea = wallArea;
|
|
968
969
|
if (this.inputs.deductWindowFromWallArea && metadata) {
|
|
969
970
|
const currentWallIndex = wallDataArray.length == 0 ? wallDataArray.length : wallDataArray.length - 1;
|
|
970
971
|
let totalWindowArea = 0;
|
|
@@ -975,7 +976,7 @@ export class BufferGeometry {
|
|
|
975
976
|
}, 0);
|
|
976
977
|
}
|
|
977
978
|
// Subtract window area from wall area
|
|
978
|
-
|
|
979
|
+
netWallArea = Math.max(0, wallArea - totalWindowArea);
|
|
979
980
|
}
|
|
980
981
|
// Create wall label
|
|
981
982
|
let wallMaterial;
|
|
@@ -1083,6 +1084,7 @@ export class BufferGeometry {
|
|
|
1083
1084
|
},
|
|
1084
1085
|
index: i,
|
|
1085
1086
|
area: wallArea,
|
|
1087
|
+
netArea: netWallArea,
|
|
1086
1088
|
width: wallDimensions.width,
|
|
1087
1089
|
perimeter: wallDimensions.perimeter,
|
|
1088
1090
|
wall_height: WALL_HEIGHT,
|
|
@@ -1151,10 +1153,11 @@ export class BufferGeometry {
|
|
|
1151
1153
|
transparent: true,
|
|
1152
1154
|
depthWrite: false
|
|
1153
1155
|
}));
|
|
1154
|
-
windowMesh.name = windows[i].
|
|
1156
|
+
windowMesh.name = windows[i].wall_uuid ? `${windows[i].wall_uuid}_window-${i}` : `window-${i}`;
|
|
1155
1157
|
const outlineGeometry = new THREE.EdgesGeometry(windowGeometry);
|
|
1156
1158
|
const outlineMaterial = new THREE.LineBasicMaterial({ color: this.inputs.windowOutlineColor, linewidth: 3 });
|
|
1157
1159
|
const outlineMesh = new THREE.LineSegments(outlineGeometry, outlineMaterial);
|
|
1160
|
+
outlineMesh.name = windowMesh.name;
|
|
1158
1161
|
windowMesh.add(outlineMesh);
|
|
1159
1162
|
// Add window center label if material is defined
|
|
1160
1163
|
if (windows[i].material || windows[i].name) {
|
|
@@ -1205,8 +1208,9 @@ export class BufferGeometry {
|
|
|
1205
1208
|
.add(p0);
|
|
1206
1209
|
const labelOffset = 0.01;
|
|
1207
1210
|
windowCenterLabel.position.copy(center3D).addScaledVector(normal.clone().negate(), labelOffset);
|
|
1211
|
+
windowCenterLabel.name = windowMesh.name;
|
|
1208
1212
|
windowCenterLabel.lookAt(windowCenterLabel.position.clone().add(normal.clone().negate()));
|
|
1209
|
-
windowCenterLabel.name = windows[i].uuid ? `${windows[i].uuid}_windowLabel` : `windowLabel-${i}`;
|
|
1213
|
+
//windowCenterLabel.name = windows[i].uuid ? `${windows[i].uuid}_windowLabel` : `windowLabel-${i}`;
|
|
1210
1214
|
this.groupedMesh.add(windowCenterLabel);
|
|
1211
1215
|
}
|
|
1212
1216
|
catch (e) {
|
package/lib/types.d.ts
CHANGED
|
@@ -266,6 +266,7 @@ export interface IObjectData {
|
|
|
266
266
|
node?: Scene.INode;
|
|
267
267
|
type?: string;
|
|
268
268
|
index?: number;
|
|
269
|
+
wallUUID?: string;
|
|
269
270
|
}[];
|
|
270
271
|
}
|
|
271
272
|
export interface IObjectFilters {
|
|
@@ -462,6 +463,8 @@ export interface ComponentOptions {
|
|
|
462
463
|
targetIndex?: number | undefined;
|
|
463
464
|
targetUUID?: string | undefined;
|
|
464
465
|
deductWindowFromWallArea?: boolean | undefined;
|
|
466
|
+
isWindowEditing?: boolean | undefined;
|
|
467
|
+
objectIndex?: number | undefined;
|
|
465
468
|
}
|
|
466
469
|
export interface VectorCoords {
|
|
467
470
|
object_position: Vector3;
|
|
@@ -1110,6 +1113,7 @@ export interface WallPolyData {
|
|
|
1110
1113
|
};
|
|
1111
1114
|
material?: string | undefined;
|
|
1112
1115
|
area: number;
|
|
1116
|
+
netArea?: number | undefined;
|
|
1113
1117
|
perimeter: number | undefined;
|
|
1114
1118
|
width: number | undefined;
|
|
1115
1119
|
wall_height: number;
|
|
@@ -1119,6 +1123,7 @@ export interface WallPolyData {
|
|
|
1119
1123
|
export interface WindowPolyData {
|
|
1120
1124
|
path: Array<Vector3>;
|
|
1121
1125
|
uuid?: string | undefined;
|
|
1126
|
+
wall_uuid?: string | undefined;
|
|
1122
1127
|
name?: string | undefined;
|
|
1123
1128
|
index?: number | undefined;
|
|
1124
1129
|
options?: {
|
package/package.json
CHANGED
package/static/atwinui.css
CHANGED
|
@@ -1460,11 +1460,6 @@
|
|
|
1460
1460
|
padding: 10px 10px 5px 10px !important;
|
|
1461
1461
|
}
|
|
1462
1462
|
|
|
1463
|
-
.at_disabled {
|
|
1464
|
-
pointer-events: none;
|
|
1465
|
-
opacity: 0.4;
|
|
1466
|
-
}
|
|
1467
|
-
|
|
1468
1463
|
/* Basic styling for the tree */
|
|
1469
1464
|
/* .at_tree {
|
|
1470
1465
|
list-style-type: none;
|
|
@@ -1545,7 +1540,7 @@
|
|
|
1545
1540
|
|
|
1546
1541
|
.at_room_tree_child li {
|
|
1547
1542
|
margin: 5px 0;
|
|
1548
|
-
|
|
1543
|
+
margin-left: 30px;
|
|
1549
1544
|
padding-right: 5px;
|
|
1550
1545
|
display: flex;
|
|
1551
1546
|
justify-content: space-between;
|
|
@@ -2295,10 +2290,16 @@ dialog#at-screen-share-request-modal::backdrop {
|
|
|
2295
2290
|
}
|
|
2296
2291
|
|
|
2297
2292
|
.at_dropdown_item .at_subitem_right {
|
|
2298
|
-
cursor:
|
|
2293
|
+
cursor: default;
|
|
2299
2294
|
display: flex;
|
|
2300
2295
|
}
|
|
2301
2296
|
|
|
2297
|
+
.at_dropdown_item .at_subitem_right .mdi-check,
|
|
2298
|
+
.at_dropdown_item .at_subitem_right .mdi-pencil,
|
|
2299
|
+
.at_dropdown_item .at_subitem_right .mdi-delete-outline {
|
|
2300
|
+
cursor: pointer;
|
|
2301
|
+
}
|
|
2302
|
+
|
|
2302
2303
|
.at_dropdown_item .at_subitem_right span:hover{
|
|
2303
2304
|
color: var(--bg-accent-azusa)
|
|
2304
2305
|
}
|
|
@@ -2405,8 +2406,40 @@ dialog#at-screen-share-request-modal::backdrop {
|
|
|
2405
2406
|
|
|
2406
2407
|
.at_partition_wall_row_item {
|
|
2407
2408
|
cursor: pointer;
|
|
2409
|
+
display: flex;
|
|
2410
|
+
flex-direction: column;
|
|
2411
|
+
}
|
|
2412
|
+
|
|
2413
|
+
.at_partition_child_header {
|
|
2414
|
+
width: 100%;
|
|
2415
|
+
padding-left: 5px;
|
|
2416
|
+
padding-right: 5px;
|
|
2417
|
+
display: flex;
|
|
2418
|
+
flex-direction: row;
|
|
2419
|
+
justify-content: space-between;
|
|
2408
2420
|
}
|
|
2409
2421
|
|
|
2410
2422
|
.at_partition_floor_row_item {
|
|
2411
|
-
|
|
2423
|
+
cursor: pointer;
|
|
2424
|
+
}
|
|
2425
|
+
|
|
2426
|
+
.at_partition_child_expand_icon {
|
|
2427
|
+
padding: unset !important;
|
|
2428
|
+
}
|
|
2429
|
+
|
|
2430
|
+
li.at_partition_floor_row_item,
|
|
2431
|
+
li.at_partition_wall_row_item {
|
|
2432
|
+
padding-right: unset !important;
|
|
2433
|
+
}
|
|
2434
|
+
|
|
2435
|
+
.at_partition_child_header.selected {
|
|
2436
|
+
padding-right: 5px !important;
|
|
2437
|
+
}
|
|
2438
|
+
|
|
2439
|
+
.at_hidden {
|
|
2440
|
+
display: none;
|
|
2441
|
+
}
|
|
2442
|
+
|
|
2443
|
+
.at_wall_window_row_item.selected {
|
|
2444
|
+
padding-left: 5px;
|
|
2412
2445
|
}
|