@2112-lab/central-plant 0.1.93 → 0.1.94
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/dist/bundle/index.js +111 -40
- package/dist/cjs/src/core/centralPlant.js +1 -1
- package/dist/cjs/src/managers/controls/transformControlsManager.js +73 -29
- package/dist/cjs/src/managers/scene/sceneExportManager.js +34 -10
- package/dist/cjs/src/managers/scene/sceneOperationsManager.js +3 -0
- package/dist/esm/src/core/centralPlant.js +1 -1
- package/dist/esm/src/managers/controls/transformControlsManager.js +73 -29
- package/dist/esm/src/managers/scene/sceneExportManager.js +34 -10
- package/dist/esm/src/managers/scene/sceneOperationsManager.js +3 -0
- package/package.json +1 -1
package/dist/bundle/index.js
CHANGED
|
@@ -3957,6 +3957,17 @@ var TransformControlsManager = /*#__PURE__*/function () {
|
|
|
3957
3957
|
obj.userData._multiSelectOriginalRotation = obj.rotation.clone();
|
|
3958
3958
|
obj.userData._multiSelectOriginalScale = obj.scale.clone();
|
|
3959
3959
|
});
|
|
3960
|
+
|
|
3961
|
+
// Snapshot group position and helper geometry vertices so we can do
|
|
3962
|
+
// cheap per-frame bbox translation without re-traversing the mesh hierarchy.
|
|
3963
|
+
_this2._dragStartGroupPosition = _this2.multiSelectionGroup.position.clone();
|
|
3964
|
+
_this2.boundingBoxHelpers.forEach(function (helper) {
|
|
3965
|
+
var _helper$geometry;
|
|
3966
|
+
var posAttr = (_helper$geometry = helper.geometry) === null || _helper$geometry === void 0 || (_helper$geometry = _helper$geometry.attributes) === null || _helper$geometry === void 0 ? void 0 : _helper$geometry.position;
|
|
3967
|
+
if (posAttr) {
|
|
3968
|
+
helper.userData._dragStartPositions = new Float32Array(posAttr.array);
|
|
3969
|
+
}
|
|
3970
|
+
});
|
|
3960
3971
|
}
|
|
3961
3972
|
|
|
3962
3973
|
// Disable orbit controls during transformation
|
|
@@ -4021,6 +4032,13 @@ var TransformControlsManager = /*#__PURE__*/function () {
|
|
|
4021
4032
|
}
|
|
4022
4033
|
}
|
|
4023
4034
|
case 3:
|
|
4035
|
+
// Ensure the bounding box reflects the final post-drag object position.
|
|
4036
|
+
// applyMultiSelectionTransform calls _finalizeMultiSelectionTransform →
|
|
4037
|
+
// createMultiBoundingBox for moves above the threshold. Call updateBoundingBox
|
|
4038
|
+
// here as a safety net for sub-threshold moves or rotation mode, where
|
|
4039
|
+
// _finalizeMultiSelectionTransform is not triggered.
|
|
4040
|
+
_this2.updateBoundingBox();
|
|
4041
|
+
|
|
4024
4042
|
// Dispatch custom scene update event after transform completes
|
|
4025
4043
|
if (typeof window !== 'undefined') {
|
|
4026
4044
|
console.log('📡 Dispatching sceneUpdateComplete event after transform');
|
|
@@ -4034,6 +4052,12 @@ var TransformControlsManager = /*#__PURE__*/function () {
|
|
|
4034
4052
|
});
|
|
4035
4053
|
window.dispatchEvent(sceneCompleteEvent);
|
|
4036
4054
|
}
|
|
4055
|
+
|
|
4056
|
+
// Clean up per-drag snapshots
|
|
4057
|
+
_this2._dragStartGroupPosition = null;
|
|
4058
|
+
_this2.boundingBoxHelpers.forEach(function (helper) {
|
|
4059
|
+
delete helper.userData._dragStartPositions;
|
|
4060
|
+
});
|
|
4037
4061
|
console.log("\u2705 Transform completed: ".concat(_this2.currentMode, " mode"));
|
|
4038
4062
|
case 4:
|
|
4039
4063
|
return _context.a(2);
|
|
@@ -4042,33 +4066,16 @@ var TransformControlsManager = /*#__PURE__*/function () {
|
|
|
4042
4066
|
}));
|
|
4043
4067
|
// Transform changing event
|
|
4044
4068
|
this.eventHandlers.transforming = function () {
|
|
4045
|
-
// Apply real-time visual transformation to objects during drag
|
|
4069
|
+
// Apply real-time visual transformation to objects during drag.
|
|
4046
4070
|
if (_this2.selectedObjects.length > 0 && _this2.multiSelectionGroup) {
|
|
4047
4071
|
_this2.applyRealtimeTransform();
|
|
4048
4072
|
}
|
|
4049
4073
|
|
|
4050
|
-
//
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
});
|
|
4056
|
-
|
|
4057
|
-
// Update bounding box during transformation
|
|
4058
|
-
_this2.updateBoundingBox();
|
|
4059
|
-
|
|
4060
|
-
// Dispatch custom scene update event during transform (optional - fires continuously)
|
|
4061
|
-
if (typeof window !== 'undefined') {
|
|
4062
|
-
var _this2$selectedObject2;
|
|
4063
|
-
var sceneCompleteEvent = new CustomEvent('sceneUpdateComplete', {
|
|
4064
|
-
detail: {
|
|
4065
|
-
timestamp: Date.now(),
|
|
4066
|
-
transformType: _this2.currentMode,
|
|
4067
|
-
objectName: ((_this2$selectedObject2 = _this2.selectedObjects[0]) === null || _this2$selectedObject2 === void 0 ? void 0 : _this2$selectedObject2.name) || 'unknown',
|
|
4068
|
-
isTransforming: true
|
|
4069
|
-
}
|
|
4070
|
-
});
|
|
4071
|
-
window.dispatchEvent(sceneCompleteEvent);
|
|
4074
|
+
// Per-frame bbox tracking: during translate we can cheaply shift the
|
|
4075
|
+
// pre-snapshotted helper geometry vertices by the drag delta instead of
|
|
4076
|
+
// re-traversing the full mesh hierarchy every pointermove.
|
|
4077
|
+
if (_this2.currentMode === 'translate') {
|
|
4078
|
+
_this2._applyDeltaToBoundingBoxHelpers();
|
|
4072
4079
|
}
|
|
4073
4080
|
};
|
|
4074
4081
|
// First remove any existing listeners to prevent duplicates
|
|
@@ -4821,6 +4828,43 @@ var TransformControlsManager = /*#__PURE__*/function () {
|
|
|
4821
4828
|
}
|
|
4822
4829
|
}
|
|
4823
4830
|
|
|
4831
|
+
/**
|
|
4832
|
+
* Cheap per-frame bounding box update during translation drag.
|
|
4833
|
+
* Shifts the 8 pre-snapshotted geometry vertices of every helper by the
|
|
4834
|
+
* current drag delta. O(8 additions per helper) — no mesh traversal.
|
|
4835
|
+
* Only valid for translate mode where the box shape is invariant.
|
|
4836
|
+
* @private
|
|
4837
|
+
*/
|
|
4838
|
+
}, {
|
|
4839
|
+
key: "_applyDeltaToBoundingBoxHelpers",
|
|
4840
|
+
value: function _applyDeltaToBoundingBoxHelpers() {
|
|
4841
|
+
if (!this._dragStartGroupPosition || this.boundingBoxHelpers.length === 0) return;
|
|
4842
|
+
var delta = this.multiSelectionGroup.position.clone().sub(this._dragStartGroupPosition);
|
|
4843
|
+
var _iterator3 = _createForOfIteratorHelper(this.boundingBoxHelpers),
|
|
4844
|
+
_step3;
|
|
4845
|
+
try {
|
|
4846
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
4847
|
+
var _helper$geometry2;
|
|
4848
|
+
var helper = _step3.value;
|
|
4849
|
+
var startPositions = helper.userData._dragStartPositions;
|
|
4850
|
+
var posAttr = (_helper$geometry2 = helper.geometry) === null || _helper$geometry2 === void 0 || (_helper$geometry2 = _helper$geometry2.attributes) === null || _helper$geometry2 === void 0 ? void 0 : _helper$geometry2.position;
|
|
4851
|
+
if (!startPositions || !posAttr) continue;
|
|
4852
|
+
var arr = posAttr.array;
|
|
4853
|
+
// 8 vertices × 3 floats (x, y, z)
|
|
4854
|
+
for (var i = 0; i < 24; i += 3) {
|
|
4855
|
+
arr[i] = startPositions[i] + delta.x;
|
|
4856
|
+
arr[i + 1] = startPositions[i + 1] + delta.y;
|
|
4857
|
+
arr[i + 2] = startPositions[i + 2] + delta.z;
|
|
4858
|
+
}
|
|
4859
|
+
posAttr.needsUpdate = true;
|
|
4860
|
+
}
|
|
4861
|
+
} catch (err) {
|
|
4862
|
+
_iterator3.e(err);
|
|
4863
|
+
} finally {
|
|
4864
|
+
_iterator3.f();
|
|
4865
|
+
}
|
|
4866
|
+
}
|
|
4867
|
+
|
|
4824
4868
|
/**
|
|
4825
4869
|
* Set the transformation mode
|
|
4826
4870
|
* @param {'translate' | 'rotate' | 'scale'} mode - The transformation mode
|
|
@@ -5195,11 +5239,11 @@ var TransformControlsManager = /*#__PURE__*/function () {
|
|
|
5195
5239
|
var objectFilter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
5196
5240
|
var objectsWithBounds = this.getSelectableObjectsWithBounds(objectFilter);
|
|
5197
5241
|
var intersections = [];
|
|
5198
|
-
var
|
|
5199
|
-
|
|
5242
|
+
var _iterator4 = _createForOfIteratorHelper(objectsWithBounds),
|
|
5243
|
+
_step4;
|
|
5200
5244
|
try {
|
|
5201
|
-
for (
|
|
5202
|
-
var item =
|
|
5245
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
5246
|
+
var item = _step4.value;
|
|
5203
5247
|
var object = item.object,
|
|
5204
5248
|
boundingBox = item.boundingBox;
|
|
5205
5249
|
|
|
@@ -5219,9 +5263,9 @@ var TransformControlsManager = /*#__PURE__*/function () {
|
|
|
5219
5263
|
|
|
5220
5264
|
// Sort by distance (closest first)
|
|
5221
5265
|
} catch (err) {
|
|
5222
|
-
|
|
5266
|
+
_iterator4.e(err);
|
|
5223
5267
|
} finally {
|
|
5224
|
-
|
|
5268
|
+
_iterator4.f();
|
|
5225
5269
|
}
|
|
5226
5270
|
intersections.sort(function (a, b) {
|
|
5227
5271
|
return a.distance - b.distance;
|
|
@@ -11457,11 +11501,35 @@ var SceneExportManager = /*#__PURE__*/function () {
|
|
|
11457
11501
|
// For connectors/gateways: no children (they're leaf nodes)
|
|
11458
11502
|
if (threeObject.children && threeObject.children.length > 0) {
|
|
11459
11503
|
var exportableChildren = [];
|
|
11460
|
-
if (threeObject.userData.objectType === 'component')
|
|
11461
|
-
//
|
|
11504
|
+
if (threeObject.userData.objectType === 'component') {
|
|
11505
|
+
// Export connector children (skip mesh geometry - it lives in the component dictionary GLB)
|
|
11462
11506
|
threeObject.children.forEach(function (child) {
|
|
11463
11507
|
var _child$userData;
|
|
11464
|
-
if (((_child$userData = child.userData) === null || _child$userData === void 0 ? void 0 : _child$userData.objectType) === '
|
|
11508
|
+
if (((_child$userData = child.userData) === null || _child$userData === void 0 ? void 0 : _child$userData.objectType) === 'connector') {
|
|
11509
|
+
var connectorJson = {
|
|
11510
|
+
// Use the raw Three.js UUID — connections in currentSceneData reference this exact value
|
|
11511
|
+
uuid: child.uuid,
|
|
11512
|
+
userData: _objectSpread2(_objectSpread2({
|
|
11513
|
+
objectType: 'connector'
|
|
11514
|
+
}, child.userData.direction ? {
|
|
11515
|
+
direction: child.userData.direction
|
|
11516
|
+
} : {}), child.userData.group ? {
|
|
11517
|
+
group: child.userData.group
|
|
11518
|
+
} : {}),
|
|
11519
|
+
position: {
|
|
11520
|
+
x: roundIfClose(child.position.x),
|
|
11521
|
+
y: roundIfClose(child.position.y),
|
|
11522
|
+
z: roundIfClose(child.position.z)
|
|
11523
|
+
}
|
|
11524
|
+
};
|
|
11525
|
+
exportableChildren.push(connectorJson);
|
|
11526
|
+
}
|
|
11527
|
+
});
|
|
11528
|
+
} else if (isManualSegment) {
|
|
11529
|
+
// For manual segments, export their connector children
|
|
11530
|
+
threeObject.children.forEach(function (child) {
|
|
11531
|
+
var _child$userData2;
|
|
11532
|
+
if (((_child$userData2 = child.userData) === null || _child$userData2 === void 0 ? void 0 : _child$userData2.objectType) === 'segment-connector') {
|
|
11465
11533
|
// Call the class method using bound reference
|
|
11466
11534
|
var connectorJson = convertSegmentConnectorToJson(child, threeObject);
|
|
11467
11535
|
if (connectorJson) {
|
|
@@ -11487,9 +11555,9 @@ var SceneExportManager = /*#__PURE__*/function () {
|
|
|
11487
11555
|
var findManualSegments = function findManualSegments(object) {
|
|
11488
11556
|
var manualSegments = [];
|
|
11489
11557
|
object.traverse(function (child) {
|
|
11490
|
-
var _child$
|
|
11558
|
+
var _child$userData3;
|
|
11491
11559
|
// Check if this is a manual segment
|
|
11492
|
-
if (((_child$
|
|
11560
|
+
if (((_child$userData3 = child.userData) === null || _child$userData3 === void 0 ? void 0 : _child$userData3.objectType) === 'segment') {
|
|
11493
11561
|
manualSegments.push(child);
|
|
11494
11562
|
}
|
|
11495
11563
|
});
|
|
@@ -11689,14 +11757,14 @@ var SceneExportManager = /*#__PURE__*/function () {
|
|
|
11689
11757
|
BufferGeometryUtils$1 = BufferGeometryUtilsModule.BufferGeometryUtils || BufferGeometryUtilsModule.default || BufferGeometryUtilsModule; // Create a new scene for export instead of cloning
|
|
11690
11758
|
exportScene = new _THREE.Scene(); // Helper function to check if an object should be exported
|
|
11691
11759
|
shouldExport = function shouldExport(child) {
|
|
11692
|
-
var _child$name2, _child$
|
|
11760
|
+
var _child$name2, _child$userData4, _child$userData5, _child$userData6, _child$userData7;
|
|
11693
11761
|
if ((_child$name2 = child.name) !== null && _child$name2 !== void 0 && _child$name2.includes('Polyline')) return false; // Will handle separately
|
|
11694
11762
|
if (child.name === 'fogPlane') return false; // Skip fog plane
|
|
11695
|
-
if ((_child$
|
|
11696
|
-
if ((_child$
|
|
11697
|
-
if ((_child$
|
|
11763
|
+
if ((_child$userData4 = child.userData) !== null && _child$userData4 !== void 0 && _child$userData4.isBrickWall) return false; // Skip environment
|
|
11764
|
+
if ((_child$userData5 = child.userData) !== null && _child$userData5 !== void 0 && _child$userData5.isBaseGround) return false; // Skip environment
|
|
11765
|
+
if ((_child$userData6 = child.userData) !== null && _child$userData6 !== void 0 && _child$userData6.isBaseGrid) return false; // Skip environment
|
|
11698
11766
|
if (child.isLight) return false; // Skip lights
|
|
11699
|
-
if ((_child$
|
|
11767
|
+
if ((_child$userData7 = child.userData) !== null && _child$userData7 !== void 0 && _child$userData7.isTransformControls) return false; // Skip transform controls
|
|
11700
11768
|
if (child.isTransformControls) return false; // Skip transform controls
|
|
11701
11769
|
if (child.type && child.type.includes('TransformControls')) return false;
|
|
11702
11770
|
if (child.type && child.type.includes('Helper')) return false; // Skip helpers
|
|
@@ -30706,6 +30774,9 @@ var SceneOperationsManager = /*#__PURE__*/function () {
|
|
|
30706
30774
|
// Phase 6: Load behaviors (after GLB models are present so output objects can be resolved)
|
|
30707
30775
|
this._processBehaviors(data);
|
|
30708
30776
|
console.log('✅ Scene loaded successfully');
|
|
30777
|
+
|
|
30778
|
+
// Notify UI components (e.g. SceneHierarchy) that the scene is fully loaded
|
|
30779
|
+
this.sceneViewer.emit('scene-loaded');
|
|
30709
30780
|
_context4.n = 7;
|
|
30710
30781
|
break;
|
|
30711
30782
|
case 6:
|
|
@@ -37110,7 +37181,7 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
|
|
|
37110
37181
|
* Initialize the CentralPlant manager
|
|
37111
37182
|
*
|
|
37112
37183
|
* @constructor
|
|
37113
|
-
* @version 0.1.
|
|
37184
|
+
* @version 0.1.94
|
|
37114
37185
|
* @updated 2025-10-22
|
|
37115
37186
|
*
|
|
37116
37187
|
* @description Creates a new CentralPlant instance and initializes internal managers and utilities.
|
|
@@ -19,7 +19,7 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
|
|
|
19
19
|
* Initialize the CentralPlant manager
|
|
20
20
|
*
|
|
21
21
|
* @constructor
|
|
22
|
-
* @version 0.1.
|
|
22
|
+
* @version 0.1.94
|
|
23
23
|
* @updated 2025-10-22
|
|
24
24
|
*
|
|
25
25
|
* @description Creates a new CentralPlant instance and initializes internal managers and utilities.
|
|
@@ -257,6 +257,17 @@ var TransformControlsManager = /*#__PURE__*/function () {
|
|
|
257
257
|
obj.userData._multiSelectOriginalRotation = obj.rotation.clone();
|
|
258
258
|
obj.userData._multiSelectOriginalScale = obj.scale.clone();
|
|
259
259
|
});
|
|
260
|
+
|
|
261
|
+
// Snapshot group position and helper geometry vertices so we can do
|
|
262
|
+
// cheap per-frame bbox translation without re-traversing the mesh hierarchy.
|
|
263
|
+
_this2._dragStartGroupPosition = _this2.multiSelectionGroup.position.clone();
|
|
264
|
+
_this2.boundingBoxHelpers.forEach(function (helper) {
|
|
265
|
+
var _helper$geometry;
|
|
266
|
+
var posAttr = (_helper$geometry = helper.geometry) === null || _helper$geometry === void 0 || (_helper$geometry = _helper$geometry.attributes) === null || _helper$geometry === void 0 ? void 0 : _helper$geometry.position;
|
|
267
|
+
if (posAttr) {
|
|
268
|
+
helper.userData._dragStartPositions = new Float32Array(posAttr.array);
|
|
269
|
+
}
|
|
270
|
+
});
|
|
260
271
|
}
|
|
261
272
|
|
|
262
273
|
// Disable orbit controls during transformation
|
|
@@ -321,6 +332,13 @@ var TransformControlsManager = /*#__PURE__*/function () {
|
|
|
321
332
|
}
|
|
322
333
|
}
|
|
323
334
|
case 3:
|
|
335
|
+
// Ensure the bounding box reflects the final post-drag object position.
|
|
336
|
+
// applyMultiSelectionTransform calls _finalizeMultiSelectionTransform →
|
|
337
|
+
// createMultiBoundingBox for moves above the threshold. Call updateBoundingBox
|
|
338
|
+
// here as a safety net for sub-threshold moves or rotation mode, where
|
|
339
|
+
// _finalizeMultiSelectionTransform is not triggered.
|
|
340
|
+
_this2.updateBoundingBox();
|
|
341
|
+
|
|
324
342
|
// Dispatch custom scene update event after transform completes
|
|
325
343
|
if (typeof window !== 'undefined') {
|
|
326
344
|
console.log('📡 Dispatching sceneUpdateComplete event after transform');
|
|
@@ -334,6 +352,12 @@ var TransformControlsManager = /*#__PURE__*/function () {
|
|
|
334
352
|
});
|
|
335
353
|
window.dispatchEvent(sceneCompleteEvent);
|
|
336
354
|
}
|
|
355
|
+
|
|
356
|
+
// Clean up per-drag snapshots
|
|
357
|
+
_this2._dragStartGroupPosition = null;
|
|
358
|
+
_this2.boundingBoxHelpers.forEach(function (helper) {
|
|
359
|
+
delete helper.userData._dragStartPositions;
|
|
360
|
+
});
|
|
337
361
|
console.log("\u2705 Transform completed: ".concat(_this2.currentMode, " mode"));
|
|
338
362
|
case 4:
|
|
339
363
|
return _context.a(2);
|
|
@@ -342,33 +366,16 @@ var TransformControlsManager = /*#__PURE__*/function () {
|
|
|
342
366
|
}));
|
|
343
367
|
// Transform changing event
|
|
344
368
|
this.eventHandlers.transforming = function () {
|
|
345
|
-
// Apply real-time visual transformation to objects during drag
|
|
369
|
+
// Apply real-time visual transformation to objects during drag.
|
|
346
370
|
if (_this2.selectedObjects.length > 0 && _this2.multiSelectionGroup) {
|
|
347
371
|
_this2.applyRealtimeTransform();
|
|
348
372
|
}
|
|
349
373
|
|
|
350
|
-
//
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
});
|
|
356
|
-
|
|
357
|
-
// Update bounding box during transformation
|
|
358
|
-
_this2.updateBoundingBox();
|
|
359
|
-
|
|
360
|
-
// Dispatch custom scene update event during transform (optional - fires continuously)
|
|
361
|
-
if (typeof window !== 'undefined') {
|
|
362
|
-
var _this2$selectedObject2;
|
|
363
|
-
var sceneCompleteEvent = new CustomEvent('sceneUpdateComplete', {
|
|
364
|
-
detail: {
|
|
365
|
-
timestamp: Date.now(),
|
|
366
|
-
transformType: _this2.currentMode,
|
|
367
|
-
objectName: ((_this2$selectedObject2 = _this2.selectedObjects[0]) === null || _this2$selectedObject2 === void 0 ? void 0 : _this2$selectedObject2.name) || 'unknown',
|
|
368
|
-
isTransforming: true
|
|
369
|
-
}
|
|
370
|
-
});
|
|
371
|
-
window.dispatchEvent(sceneCompleteEvent);
|
|
374
|
+
// Per-frame bbox tracking: during translate we can cheaply shift the
|
|
375
|
+
// pre-snapshotted helper geometry vertices by the drag delta instead of
|
|
376
|
+
// re-traversing the full mesh hierarchy every pointermove.
|
|
377
|
+
if (_this2.currentMode === 'translate') {
|
|
378
|
+
_this2._applyDeltaToBoundingBoxHelpers();
|
|
372
379
|
}
|
|
373
380
|
};
|
|
374
381
|
// First remove any existing listeners to prevent duplicates
|
|
@@ -1121,6 +1128,43 @@ var TransformControlsManager = /*#__PURE__*/function () {
|
|
|
1121
1128
|
}
|
|
1122
1129
|
}
|
|
1123
1130
|
|
|
1131
|
+
/**
|
|
1132
|
+
* Cheap per-frame bounding box update during translation drag.
|
|
1133
|
+
* Shifts the 8 pre-snapshotted geometry vertices of every helper by the
|
|
1134
|
+
* current drag delta. O(8 additions per helper) — no mesh traversal.
|
|
1135
|
+
* Only valid for translate mode where the box shape is invariant.
|
|
1136
|
+
* @private
|
|
1137
|
+
*/
|
|
1138
|
+
}, {
|
|
1139
|
+
key: "_applyDeltaToBoundingBoxHelpers",
|
|
1140
|
+
value: function _applyDeltaToBoundingBoxHelpers() {
|
|
1141
|
+
if (!this._dragStartGroupPosition || this.boundingBoxHelpers.length === 0) return;
|
|
1142
|
+
var delta = this.multiSelectionGroup.position.clone().sub(this._dragStartGroupPosition);
|
|
1143
|
+
var _iterator3 = _rollupPluginBabelHelpers.createForOfIteratorHelper(this.boundingBoxHelpers),
|
|
1144
|
+
_step3;
|
|
1145
|
+
try {
|
|
1146
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
1147
|
+
var _helper$geometry2;
|
|
1148
|
+
var helper = _step3.value;
|
|
1149
|
+
var startPositions = helper.userData._dragStartPositions;
|
|
1150
|
+
var posAttr = (_helper$geometry2 = helper.geometry) === null || _helper$geometry2 === void 0 || (_helper$geometry2 = _helper$geometry2.attributes) === null || _helper$geometry2 === void 0 ? void 0 : _helper$geometry2.position;
|
|
1151
|
+
if (!startPositions || !posAttr) continue;
|
|
1152
|
+
var arr = posAttr.array;
|
|
1153
|
+
// 8 vertices × 3 floats (x, y, z)
|
|
1154
|
+
for (var i = 0; i < 24; i += 3) {
|
|
1155
|
+
arr[i] = startPositions[i] + delta.x;
|
|
1156
|
+
arr[i + 1] = startPositions[i + 1] + delta.y;
|
|
1157
|
+
arr[i + 2] = startPositions[i + 2] + delta.z;
|
|
1158
|
+
}
|
|
1159
|
+
posAttr.needsUpdate = true;
|
|
1160
|
+
}
|
|
1161
|
+
} catch (err) {
|
|
1162
|
+
_iterator3.e(err);
|
|
1163
|
+
} finally {
|
|
1164
|
+
_iterator3.f();
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1124
1168
|
/**
|
|
1125
1169
|
* Set the transformation mode
|
|
1126
1170
|
* @param {'translate' | 'rotate' | 'scale'} mode - The transformation mode
|
|
@@ -1495,11 +1539,11 @@ var TransformControlsManager = /*#__PURE__*/function () {
|
|
|
1495
1539
|
var objectFilter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
1496
1540
|
var objectsWithBounds = this.getSelectableObjectsWithBounds(objectFilter);
|
|
1497
1541
|
var intersections = [];
|
|
1498
|
-
var
|
|
1499
|
-
|
|
1542
|
+
var _iterator4 = _rollupPluginBabelHelpers.createForOfIteratorHelper(objectsWithBounds),
|
|
1543
|
+
_step4;
|
|
1500
1544
|
try {
|
|
1501
|
-
for (
|
|
1502
|
-
var item =
|
|
1545
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
1546
|
+
var item = _step4.value;
|
|
1503
1547
|
var object = item.object,
|
|
1504
1548
|
boundingBox = item.boundingBox;
|
|
1505
1549
|
|
|
@@ -1519,9 +1563,9 @@ var TransformControlsManager = /*#__PURE__*/function () {
|
|
|
1519
1563
|
|
|
1520
1564
|
// Sort by distance (closest first)
|
|
1521
1565
|
} catch (err) {
|
|
1522
|
-
|
|
1566
|
+
_iterator4.e(err);
|
|
1523
1567
|
} finally {
|
|
1524
|
-
|
|
1568
|
+
_iterator4.f();
|
|
1525
1569
|
}
|
|
1526
1570
|
intersections.sort(function (a, b) {
|
|
1527
1571
|
return a.distance - b.distance;
|
|
@@ -242,11 +242,35 @@ var SceneExportManager = /*#__PURE__*/function () {
|
|
|
242
242
|
// For connectors/gateways: no children (they're leaf nodes)
|
|
243
243
|
if (threeObject.children && threeObject.children.length > 0) {
|
|
244
244
|
var exportableChildren = [];
|
|
245
|
-
if (threeObject.userData.objectType === 'component')
|
|
246
|
-
//
|
|
245
|
+
if (threeObject.userData.objectType === 'component') {
|
|
246
|
+
// Export connector children (skip mesh geometry - it lives in the component dictionary GLB)
|
|
247
247
|
threeObject.children.forEach(function (child) {
|
|
248
248
|
var _child$userData;
|
|
249
|
-
if (((_child$userData = child.userData) === null || _child$userData === void 0 ? void 0 : _child$userData.objectType) === '
|
|
249
|
+
if (((_child$userData = child.userData) === null || _child$userData === void 0 ? void 0 : _child$userData.objectType) === 'connector') {
|
|
250
|
+
var connectorJson = {
|
|
251
|
+
// Use the raw Three.js UUID — connections in currentSceneData reference this exact value
|
|
252
|
+
uuid: child.uuid,
|
|
253
|
+
userData: _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({
|
|
254
|
+
objectType: 'connector'
|
|
255
|
+
}, child.userData.direction ? {
|
|
256
|
+
direction: child.userData.direction
|
|
257
|
+
} : {}), child.userData.group ? {
|
|
258
|
+
group: child.userData.group
|
|
259
|
+
} : {}),
|
|
260
|
+
position: {
|
|
261
|
+
x: roundIfClose(child.position.x),
|
|
262
|
+
y: roundIfClose(child.position.y),
|
|
263
|
+
z: roundIfClose(child.position.z)
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
exportableChildren.push(connectorJson);
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
} else if (isManualSegment) {
|
|
270
|
+
// For manual segments, export their connector children
|
|
271
|
+
threeObject.children.forEach(function (child) {
|
|
272
|
+
var _child$userData2;
|
|
273
|
+
if (((_child$userData2 = child.userData) === null || _child$userData2 === void 0 ? void 0 : _child$userData2.objectType) === 'segment-connector') {
|
|
250
274
|
// Call the class method using bound reference
|
|
251
275
|
var connectorJson = convertSegmentConnectorToJson(child, threeObject);
|
|
252
276
|
if (connectorJson) {
|
|
@@ -272,9 +296,9 @@ var SceneExportManager = /*#__PURE__*/function () {
|
|
|
272
296
|
var findManualSegments = function findManualSegments(object) {
|
|
273
297
|
var manualSegments = [];
|
|
274
298
|
object.traverse(function (child) {
|
|
275
|
-
var _child$
|
|
299
|
+
var _child$userData3;
|
|
276
300
|
// Check if this is a manual segment
|
|
277
|
-
if (((_child$
|
|
301
|
+
if (((_child$userData3 = child.userData) === null || _child$userData3 === void 0 ? void 0 : _child$userData3.objectType) === 'segment') {
|
|
278
302
|
manualSegments.push(child);
|
|
279
303
|
}
|
|
280
304
|
});
|
|
@@ -474,14 +498,14 @@ var SceneExportManager = /*#__PURE__*/function () {
|
|
|
474
498
|
BufferGeometryUtils = BufferGeometryUtilsModule.BufferGeometryUtils || BufferGeometryUtilsModule.default || BufferGeometryUtilsModule; // Create a new scene for export instead of cloning
|
|
475
499
|
exportScene = new _THREE.Scene(); // Helper function to check if an object should be exported
|
|
476
500
|
shouldExport = function shouldExport(child) {
|
|
477
|
-
var _child$name2, _child$
|
|
501
|
+
var _child$name2, _child$userData4, _child$userData5, _child$userData6, _child$userData7;
|
|
478
502
|
if ((_child$name2 = child.name) !== null && _child$name2 !== void 0 && _child$name2.includes('Polyline')) return false; // Will handle separately
|
|
479
503
|
if (child.name === 'fogPlane') return false; // Skip fog plane
|
|
480
|
-
if ((_child$
|
|
481
|
-
if ((_child$
|
|
482
|
-
if ((_child$
|
|
504
|
+
if ((_child$userData4 = child.userData) !== null && _child$userData4 !== void 0 && _child$userData4.isBrickWall) return false; // Skip environment
|
|
505
|
+
if ((_child$userData5 = child.userData) !== null && _child$userData5 !== void 0 && _child$userData5.isBaseGround) return false; // Skip environment
|
|
506
|
+
if ((_child$userData6 = child.userData) !== null && _child$userData6 !== void 0 && _child$userData6.isBaseGrid) return false; // Skip environment
|
|
483
507
|
if (child.isLight) return false; // Skip lights
|
|
484
|
-
if ((_child$
|
|
508
|
+
if ((_child$userData7 = child.userData) !== null && _child$userData7 !== void 0 && _child$userData7.isTransformControls) return false; // Skip transform controls
|
|
485
509
|
if (child.isTransformControls) return false; // Skip transform controls
|
|
486
510
|
if (child.type && child.type.includes('TransformControls')) return false;
|
|
487
511
|
if (child.type && child.type.includes('Helper')) return false; // Skip helpers
|
|
@@ -796,6 +796,9 @@ var SceneOperationsManager = /*#__PURE__*/function () {
|
|
|
796
796
|
// Phase 6: Load behaviors (after GLB models are present so output objects can be resolved)
|
|
797
797
|
this._processBehaviors(data);
|
|
798
798
|
console.log('✅ Scene loaded successfully');
|
|
799
|
+
|
|
800
|
+
// Notify UI components (e.g. SceneHierarchy) that the scene is fully loaded
|
|
801
|
+
this.sceneViewer.emit('scene-loaded');
|
|
799
802
|
_context4.n = 7;
|
|
800
803
|
break;
|
|
801
804
|
case 6:
|
|
@@ -15,7 +15,7 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
|
|
|
15
15
|
* Initialize the CentralPlant manager
|
|
16
16
|
*
|
|
17
17
|
* @constructor
|
|
18
|
-
* @version 0.1.
|
|
18
|
+
* @version 0.1.94
|
|
19
19
|
* @updated 2025-10-22
|
|
20
20
|
*
|
|
21
21
|
* @description Creates a new CentralPlant instance and initializes internal managers and utilities.
|
|
@@ -233,6 +233,17 @@ var TransformControlsManager = /*#__PURE__*/function () {
|
|
|
233
233
|
obj.userData._multiSelectOriginalRotation = obj.rotation.clone();
|
|
234
234
|
obj.userData._multiSelectOriginalScale = obj.scale.clone();
|
|
235
235
|
});
|
|
236
|
+
|
|
237
|
+
// Snapshot group position and helper geometry vertices so we can do
|
|
238
|
+
// cheap per-frame bbox translation without re-traversing the mesh hierarchy.
|
|
239
|
+
_this2._dragStartGroupPosition = _this2.multiSelectionGroup.position.clone();
|
|
240
|
+
_this2.boundingBoxHelpers.forEach(function (helper) {
|
|
241
|
+
var _helper$geometry;
|
|
242
|
+
var posAttr = (_helper$geometry = helper.geometry) === null || _helper$geometry === void 0 || (_helper$geometry = _helper$geometry.attributes) === null || _helper$geometry === void 0 ? void 0 : _helper$geometry.position;
|
|
243
|
+
if (posAttr) {
|
|
244
|
+
helper.userData._dragStartPositions = new Float32Array(posAttr.array);
|
|
245
|
+
}
|
|
246
|
+
});
|
|
236
247
|
}
|
|
237
248
|
|
|
238
249
|
// Disable orbit controls during transformation
|
|
@@ -297,6 +308,13 @@ var TransformControlsManager = /*#__PURE__*/function () {
|
|
|
297
308
|
}
|
|
298
309
|
}
|
|
299
310
|
case 3:
|
|
311
|
+
// Ensure the bounding box reflects the final post-drag object position.
|
|
312
|
+
// applyMultiSelectionTransform calls _finalizeMultiSelectionTransform →
|
|
313
|
+
// createMultiBoundingBox for moves above the threshold. Call updateBoundingBox
|
|
314
|
+
// here as a safety net for sub-threshold moves or rotation mode, where
|
|
315
|
+
// _finalizeMultiSelectionTransform is not triggered.
|
|
316
|
+
_this2.updateBoundingBox();
|
|
317
|
+
|
|
300
318
|
// Dispatch custom scene update event after transform completes
|
|
301
319
|
if (typeof window !== 'undefined') {
|
|
302
320
|
console.log('📡 Dispatching sceneUpdateComplete event after transform');
|
|
@@ -310,6 +328,12 @@ var TransformControlsManager = /*#__PURE__*/function () {
|
|
|
310
328
|
});
|
|
311
329
|
window.dispatchEvent(sceneCompleteEvent);
|
|
312
330
|
}
|
|
331
|
+
|
|
332
|
+
// Clean up per-drag snapshots
|
|
333
|
+
_this2._dragStartGroupPosition = null;
|
|
334
|
+
_this2.boundingBoxHelpers.forEach(function (helper) {
|
|
335
|
+
delete helper.userData._dragStartPositions;
|
|
336
|
+
});
|
|
313
337
|
console.log("\u2705 Transform completed: ".concat(_this2.currentMode, " mode"));
|
|
314
338
|
case 4:
|
|
315
339
|
return _context.a(2);
|
|
@@ -318,33 +342,16 @@ var TransformControlsManager = /*#__PURE__*/function () {
|
|
|
318
342
|
}));
|
|
319
343
|
// Transform changing event
|
|
320
344
|
this.eventHandlers.transforming = function () {
|
|
321
|
-
// Apply real-time visual transformation to objects during drag
|
|
345
|
+
// Apply real-time visual transformation to objects during drag.
|
|
322
346
|
if (_this2.selectedObjects.length > 0 && _this2.multiSelectionGroup) {
|
|
323
347
|
_this2.applyRealtimeTransform();
|
|
324
348
|
}
|
|
325
349
|
|
|
326
|
-
//
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
});
|
|
332
|
-
|
|
333
|
-
// Update bounding box during transformation
|
|
334
|
-
_this2.updateBoundingBox();
|
|
335
|
-
|
|
336
|
-
// Dispatch custom scene update event during transform (optional - fires continuously)
|
|
337
|
-
if (typeof window !== 'undefined') {
|
|
338
|
-
var _this2$selectedObject2;
|
|
339
|
-
var sceneCompleteEvent = new CustomEvent('sceneUpdateComplete', {
|
|
340
|
-
detail: {
|
|
341
|
-
timestamp: Date.now(),
|
|
342
|
-
transformType: _this2.currentMode,
|
|
343
|
-
objectName: ((_this2$selectedObject2 = _this2.selectedObjects[0]) === null || _this2$selectedObject2 === void 0 ? void 0 : _this2$selectedObject2.name) || 'unknown',
|
|
344
|
-
isTransforming: true
|
|
345
|
-
}
|
|
346
|
-
});
|
|
347
|
-
window.dispatchEvent(sceneCompleteEvent);
|
|
350
|
+
// Per-frame bbox tracking: during translate we can cheaply shift the
|
|
351
|
+
// pre-snapshotted helper geometry vertices by the drag delta instead of
|
|
352
|
+
// re-traversing the full mesh hierarchy every pointermove.
|
|
353
|
+
if (_this2.currentMode === 'translate') {
|
|
354
|
+
_this2._applyDeltaToBoundingBoxHelpers();
|
|
348
355
|
}
|
|
349
356
|
};
|
|
350
357
|
// First remove any existing listeners to prevent duplicates
|
|
@@ -1097,6 +1104,43 @@ var TransformControlsManager = /*#__PURE__*/function () {
|
|
|
1097
1104
|
}
|
|
1098
1105
|
}
|
|
1099
1106
|
|
|
1107
|
+
/**
|
|
1108
|
+
* Cheap per-frame bounding box update during translation drag.
|
|
1109
|
+
* Shifts the 8 pre-snapshotted geometry vertices of every helper by the
|
|
1110
|
+
* current drag delta. O(8 additions per helper) — no mesh traversal.
|
|
1111
|
+
* Only valid for translate mode where the box shape is invariant.
|
|
1112
|
+
* @private
|
|
1113
|
+
*/
|
|
1114
|
+
}, {
|
|
1115
|
+
key: "_applyDeltaToBoundingBoxHelpers",
|
|
1116
|
+
value: function _applyDeltaToBoundingBoxHelpers() {
|
|
1117
|
+
if (!this._dragStartGroupPosition || this.boundingBoxHelpers.length === 0) return;
|
|
1118
|
+
var delta = this.multiSelectionGroup.position.clone().sub(this._dragStartGroupPosition);
|
|
1119
|
+
var _iterator3 = _createForOfIteratorHelper(this.boundingBoxHelpers),
|
|
1120
|
+
_step3;
|
|
1121
|
+
try {
|
|
1122
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
1123
|
+
var _helper$geometry2;
|
|
1124
|
+
var helper = _step3.value;
|
|
1125
|
+
var startPositions = helper.userData._dragStartPositions;
|
|
1126
|
+
var posAttr = (_helper$geometry2 = helper.geometry) === null || _helper$geometry2 === void 0 || (_helper$geometry2 = _helper$geometry2.attributes) === null || _helper$geometry2 === void 0 ? void 0 : _helper$geometry2.position;
|
|
1127
|
+
if (!startPositions || !posAttr) continue;
|
|
1128
|
+
var arr = posAttr.array;
|
|
1129
|
+
// 8 vertices × 3 floats (x, y, z)
|
|
1130
|
+
for (var i = 0; i < 24; i += 3) {
|
|
1131
|
+
arr[i] = startPositions[i] + delta.x;
|
|
1132
|
+
arr[i + 1] = startPositions[i + 1] + delta.y;
|
|
1133
|
+
arr[i + 2] = startPositions[i + 2] + delta.z;
|
|
1134
|
+
}
|
|
1135
|
+
posAttr.needsUpdate = true;
|
|
1136
|
+
}
|
|
1137
|
+
} catch (err) {
|
|
1138
|
+
_iterator3.e(err);
|
|
1139
|
+
} finally {
|
|
1140
|
+
_iterator3.f();
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1100
1144
|
/**
|
|
1101
1145
|
* Set the transformation mode
|
|
1102
1146
|
* @param {'translate' | 'rotate' | 'scale'} mode - The transformation mode
|
|
@@ -1471,11 +1515,11 @@ var TransformControlsManager = /*#__PURE__*/function () {
|
|
|
1471
1515
|
var objectFilter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
1472
1516
|
var objectsWithBounds = this.getSelectableObjectsWithBounds(objectFilter);
|
|
1473
1517
|
var intersections = [];
|
|
1474
|
-
var
|
|
1475
|
-
|
|
1518
|
+
var _iterator4 = _createForOfIteratorHelper(objectsWithBounds),
|
|
1519
|
+
_step4;
|
|
1476
1520
|
try {
|
|
1477
|
-
for (
|
|
1478
|
-
var item =
|
|
1521
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
1522
|
+
var item = _step4.value;
|
|
1479
1523
|
var object = item.object,
|
|
1480
1524
|
boundingBox = item.boundingBox;
|
|
1481
1525
|
|
|
@@ -1495,9 +1539,9 @@ var TransformControlsManager = /*#__PURE__*/function () {
|
|
|
1495
1539
|
|
|
1496
1540
|
// Sort by distance (closest first)
|
|
1497
1541
|
} catch (err) {
|
|
1498
|
-
|
|
1542
|
+
_iterator4.e(err);
|
|
1499
1543
|
} finally {
|
|
1500
|
-
|
|
1544
|
+
_iterator4.f();
|
|
1501
1545
|
}
|
|
1502
1546
|
intersections.sort(function (a, b) {
|
|
1503
1547
|
return a.distance - b.distance;
|
|
@@ -220,11 +220,35 @@ var SceneExportManager = /*#__PURE__*/function () {
|
|
|
220
220
|
// For connectors/gateways: no children (they're leaf nodes)
|
|
221
221
|
if (threeObject.children && threeObject.children.length > 0) {
|
|
222
222
|
var exportableChildren = [];
|
|
223
|
-
if (threeObject.userData.objectType === 'component')
|
|
224
|
-
//
|
|
223
|
+
if (threeObject.userData.objectType === 'component') {
|
|
224
|
+
// Export connector children (skip mesh geometry - it lives in the component dictionary GLB)
|
|
225
225
|
threeObject.children.forEach(function (child) {
|
|
226
226
|
var _child$userData;
|
|
227
|
-
if (((_child$userData = child.userData) === null || _child$userData === void 0 ? void 0 : _child$userData.objectType) === '
|
|
227
|
+
if (((_child$userData = child.userData) === null || _child$userData === void 0 ? void 0 : _child$userData.objectType) === 'connector') {
|
|
228
|
+
var connectorJson = {
|
|
229
|
+
// Use the raw Three.js UUID — connections in currentSceneData reference this exact value
|
|
230
|
+
uuid: child.uuid,
|
|
231
|
+
userData: _objectSpread2(_objectSpread2({
|
|
232
|
+
objectType: 'connector'
|
|
233
|
+
}, child.userData.direction ? {
|
|
234
|
+
direction: child.userData.direction
|
|
235
|
+
} : {}), child.userData.group ? {
|
|
236
|
+
group: child.userData.group
|
|
237
|
+
} : {}),
|
|
238
|
+
position: {
|
|
239
|
+
x: roundIfClose(child.position.x),
|
|
240
|
+
y: roundIfClose(child.position.y),
|
|
241
|
+
z: roundIfClose(child.position.z)
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
exportableChildren.push(connectorJson);
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
} else if (isManualSegment) {
|
|
248
|
+
// For manual segments, export their connector children
|
|
249
|
+
threeObject.children.forEach(function (child) {
|
|
250
|
+
var _child$userData2;
|
|
251
|
+
if (((_child$userData2 = child.userData) === null || _child$userData2 === void 0 ? void 0 : _child$userData2.objectType) === 'segment-connector') {
|
|
228
252
|
// Call the class method using bound reference
|
|
229
253
|
var connectorJson = convertSegmentConnectorToJson(child, threeObject);
|
|
230
254
|
if (connectorJson) {
|
|
@@ -250,9 +274,9 @@ var SceneExportManager = /*#__PURE__*/function () {
|
|
|
250
274
|
var findManualSegments = function findManualSegments(object) {
|
|
251
275
|
var manualSegments = [];
|
|
252
276
|
object.traverse(function (child) {
|
|
253
|
-
var _child$
|
|
277
|
+
var _child$userData3;
|
|
254
278
|
// Check if this is a manual segment
|
|
255
|
-
if (((_child$
|
|
279
|
+
if (((_child$userData3 = child.userData) === null || _child$userData3 === void 0 ? void 0 : _child$userData3.objectType) === 'segment') {
|
|
256
280
|
manualSegments.push(child);
|
|
257
281
|
}
|
|
258
282
|
});
|
|
@@ -452,14 +476,14 @@ var SceneExportManager = /*#__PURE__*/function () {
|
|
|
452
476
|
BufferGeometryUtils = BufferGeometryUtilsModule.BufferGeometryUtils || BufferGeometryUtilsModule.default || BufferGeometryUtilsModule; // Create a new scene for export instead of cloning
|
|
453
477
|
exportScene = new _THREE.Scene(); // Helper function to check if an object should be exported
|
|
454
478
|
shouldExport = function shouldExport(child) {
|
|
455
|
-
var _child$name2, _child$
|
|
479
|
+
var _child$name2, _child$userData4, _child$userData5, _child$userData6, _child$userData7;
|
|
456
480
|
if ((_child$name2 = child.name) !== null && _child$name2 !== void 0 && _child$name2.includes('Polyline')) return false; // Will handle separately
|
|
457
481
|
if (child.name === 'fogPlane') return false; // Skip fog plane
|
|
458
|
-
if ((_child$
|
|
459
|
-
if ((_child$
|
|
460
|
-
if ((_child$
|
|
482
|
+
if ((_child$userData4 = child.userData) !== null && _child$userData4 !== void 0 && _child$userData4.isBrickWall) return false; // Skip environment
|
|
483
|
+
if ((_child$userData5 = child.userData) !== null && _child$userData5 !== void 0 && _child$userData5.isBaseGround) return false; // Skip environment
|
|
484
|
+
if ((_child$userData6 = child.userData) !== null && _child$userData6 !== void 0 && _child$userData6.isBaseGrid) return false; // Skip environment
|
|
461
485
|
if (child.isLight) return false; // Skip lights
|
|
462
|
-
if ((_child$
|
|
486
|
+
if ((_child$userData7 = child.userData) !== null && _child$userData7 !== void 0 && _child$userData7.isTransformControls) return false; // Skip transform controls
|
|
463
487
|
if (child.isTransformControls) return false; // Skip transform controls
|
|
464
488
|
if (child.type && child.type.includes('TransformControls')) return false;
|
|
465
489
|
if (child.type && child.type.includes('Helper')) return false; // Skip helpers
|
|
@@ -772,6 +772,9 @@ var SceneOperationsManager = /*#__PURE__*/function () {
|
|
|
772
772
|
// Phase 6: Load behaviors (after GLB models are present so output objects can be resolved)
|
|
773
773
|
this._processBehaviors(data);
|
|
774
774
|
console.log('✅ Scene loaded successfully');
|
|
775
|
+
|
|
776
|
+
// Notify UI components (e.g. SceneHierarchy) that the scene is fully loaded
|
|
777
|
+
this.sceneViewer.emit('scene-loaded');
|
|
775
778
|
_context4.n = 7;
|
|
776
779
|
break;
|
|
777
780
|
case 6:
|