@2112-lab/central-plant 0.1.63 → 0.1.64

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.
@@ -18965,6 +18965,69 @@ var ComponentDataManager = /*#__PURE__*/function (_BaseDisposable) {
18965
18965
  }
18966
18966
  return extendComponentDictionary;
18967
18967
  }()
18968
+ /**
18969
+ * Remove S3 components from the component dictionary
18970
+ * @returns {Promise<boolean>} True if components were removed successfully
18971
+ */
18972
+ )
18973
+ }, {
18974
+ key: "removeS3Components",
18975
+ value: (function () {
18976
+ var _removeS3Components = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4() {
18977
+ var _this3 = this;
18978
+ var _this$sceneViewer2, keysToRemove, _i2, _Object$entries2, _Object$entries2$_i, key, component, modelPreloader, _t2;
18979
+ return _regenerator().w(function (_context4) {
18980
+ while (1) switch (_context4.n) {
18981
+ case 0:
18982
+ _context4.n = 1;
18983
+ return this.ensureDictionaryLoaded();
18984
+ case 1:
18985
+ if (this.componentDictionary) {
18986
+ _context4.n = 2;
18987
+ break;
18988
+ }
18989
+ console.warn('⚠️ removeS3Components(): Component dictionary not loaded yet');
18990
+ return _context4.a(2, false);
18991
+ case 2:
18992
+ _context4.p = 2;
18993
+ // Find and remove all S3 components
18994
+ keysToRemove = [];
18995
+ for (_i2 = 0, _Object$entries2 = Object.entries(this.componentDictionary); _i2 < _Object$entries2.length; _i2++) {
18996
+ _Object$entries2$_i = _slicedToArray(_Object$entries2[_i2], 2), key = _Object$entries2$_i[0], component = _Object$entries2$_i[1];
18997
+ if (component.isS3Component) {
18998
+ keysToRemove.push(key);
18999
+ }
19000
+ }
19001
+
19002
+ // Remove the S3 components
19003
+ keysToRemove.forEach(function (key) {
19004
+ delete _this3.componentDictionary[key];
19005
+ });
19006
+
19007
+ // Update ModelPreloader's dictionary reference
19008
+ modelPreloader = (_this$sceneViewer2 = this.sceneViewer) === null || _this$sceneViewer2 === void 0 || (_this$sceneViewer2 = _this$sceneViewer2.centralPlant) === null || _this$sceneViewer2 === void 0 || (_this$sceneViewer2 = _this$sceneViewer2.utilities) === null || _this$sceneViewer2 === void 0 ? void 0 : _this$sceneViewer2.modelPreloader;
19009
+ if (modelPreloader) {
19010
+ modelPreloader.componentDictionary = this.componentDictionary;
19011
+ console.log("\uD83D\uDD04 Updated ModelPreloader's dictionary reference (".concat(Object.keys(this.componentDictionary).length, " total components)"));
19012
+ }
19013
+
19014
+ // Clear cache to force refresh
19015
+ this.clearCache();
19016
+ console.log("\u2705 removeS3Components(): Removed ".concat(keysToRemove.length, " S3 components from dictionary"));
19017
+ return _context4.a(2, true);
19018
+ case 3:
19019
+ _context4.p = 3;
19020
+ _t2 = _context4.v;
19021
+ console.error('❌ removeS3Components(): Error removing S3 components:', _t2);
19022
+ return _context4.a(2, false);
19023
+ }
19024
+ }, _callee4, this, [[2, 3]]);
19025
+ }));
19026
+ function removeS3Components() {
19027
+ return _removeS3Components.apply(this, arguments);
19028
+ }
19029
+ return removeS3Components;
19030
+ }()
18968
19031
  /**
18969
19032
  * Clear the component cache
18970
19033
  */
@@ -18984,42 +19047,42 @@ var ComponentDataManager = /*#__PURE__*/function (_BaseDisposable) {
18984
19047
  }, {
18985
19048
  key: "_loadComponentDictionary",
18986
19049
  value: (function () {
18987
- var _loadComponentDictionary2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4() {
18988
- var response, _t2;
18989
- return _regenerator().w(function (_context4) {
18990
- while (1) switch (_context4.n) {
19050
+ var _loadComponentDictionary2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5() {
19051
+ var response, _t3;
19052
+ return _regenerator().w(function (_context5) {
19053
+ while (1) switch (_context5.n) {
18991
19054
  case 0:
18992
- _context4.p = 0;
18993
- _context4.n = 1;
19055
+ _context5.p = 0;
19056
+ _context5.n = 1;
18994
19057
  return fetch('/library/component-dictionary.json');
18995
19058
  case 1:
18996
- response = _context4.v;
19059
+ response = _context5.v;
18997
19060
  if (!response.ok) {
18998
- _context4.n = 3;
19061
+ _context5.n = 3;
18999
19062
  break;
19000
19063
  }
19001
- _context4.n = 2;
19064
+ _context5.n = 2;
19002
19065
  return response.json();
19003
19066
  case 2:
19004
- this.componentDictionary = _context4.v;
19067
+ this.componentDictionary = _context5.v;
19005
19068
  console.log('📚 ComponentDataManager: Component dictionary loaded successfully');
19006
- _context4.n = 4;
19069
+ _context5.n = 4;
19007
19070
  break;
19008
19071
  case 3:
19009
19072
  console.warn('⚠️ ComponentDataManager: Could not load component dictionary');
19010
19073
  this.componentDictionary = null;
19011
19074
  case 4:
19012
- _context4.n = 6;
19075
+ _context5.n = 6;
19013
19076
  break;
19014
19077
  case 5:
19015
- _context4.p = 5;
19016
- _t2 = _context4.v;
19017
- console.warn('⚠️ ComponentDataManager: Error loading component dictionary:', _t2);
19078
+ _context5.p = 5;
19079
+ _t3 = _context5.v;
19080
+ console.warn('⚠️ ComponentDataManager: Error loading component dictionary:', _t3);
19018
19081
  this.componentDictionary = null;
19019
19082
  case 6:
19020
- return _context4.a(2);
19083
+ return _context5.a(2);
19021
19084
  }
19022
- }, _callee4, this, [[0, 5]]);
19085
+ }, _callee5, this, [[0, 5]]);
19023
19086
  }));
19024
19087
  function _loadComponentDictionary() {
19025
19088
  return _loadComponentDictionary2.apply(this, arguments);
@@ -19040,10 +19103,10 @@ var ComponentDataManager = /*#__PURE__*/function (_BaseDisposable) {
19040
19103
  if (!this.componentDictionary) return 'unknown';
19041
19104
 
19042
19105
  // Look for component in dictionary
19043
- for (var _i2 = 0, _Object$entries2 = Object.entries(this.componentDictionary); _i2 < _Object$entries2.length; _i2++) {
19044
- var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i2], 2),
19045
- key = _Object$entries2$_i[0],
19046
- component = _Object$entries2$_i[1];
19106
+ for (var _i3 = 0, _Object$entries3 = Object.entries(this.componentDictionary); _i3 < _Object$entries3.length; _i3++) {
19107
+ var _Object$entries3$_i = _slicedToArray(_Object$entries3[_i3], 2),
19108
+ key = _Object$entries3$_i[0],
19109
+ component = _Object$entries3$_i[1];
19047
19110
  if (key === 'categories') continue;
19048
19111
  if (name && name.toLowerCase().includes(key.toLowerCase())) {
19049
19112
  return component.category || 'unknown';
@@ -19069,7 +19132,7 @@ var ComponentDataManager = /*#__PURE__*/function (_BaseDisposable) {
19069
19132
  }, {
19070
19133
  key: "_traverseScene",
19071
19134
  value: function _traverseScene(object) {
19072
- var _this3 = this;
19135
+ var _this4 = this;
19073
19136
  var components = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
19074
19137
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
19075
19138
  if (!object) return components;
@@ -19085,7 +19148,7 @@ var ComponentDataManager = /*#__PURE__*/function (_BaseDisposable) {
19085
19148
  // Recursively traverse children
19086
19149
  if (object.children && object.children.length > 0) {
19087
19150
  object.children.forEach(function (child) {
19088
- _this3._traverseScene(child, components, options);
19151
+ _this4._traverseScene(child, components, options);
19089
19152
  });
19090
19153
  }
19091
19154
  return components;
@@ -34399,7 +34462,7 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
34399
34462
  * Initialize the CentralPlant manager
34400
34463
  *
34401
34464
  * @constructor
34402
- * @version 0.1.63
34465
+ * @version 0.1.64
34403
34466
  * @updated 2025-10-22
34404
34467
  *
34405
34468
  * @description Creates a new CentralPlant instance and initializes internal managers and utilities.
@@ -35605,6 +35668,45 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
35605
35668
  }
35606
35669
  return extendComponentDictionary;
35607
35670
  }()
35671
+ /**
35672
+ * Remove S3 components from component dictionary
35673
+ * @returns {Promise<boolean>} True if components were removed successfully, false otherwise
35674
+ * @description Removes all S3 components from the component dictionary, typically called when
35675
+ * user signs out or when S3 components need to be refreshed
35676
+ * @example
35677
+ * // Remove all S3 components from dictionary
35678
+ * const success = await centralPlant.removeS3Components();
35679
+ * if (success) {
35680
+ * console.log('S3 components removed');
35681
+ * }
35682
+ */
35683
+ )
35684
+ }, {
35685
+ key: "removeS3Components",
35686
+ value: (function () {
35687
+ var _removeS3Components = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4() {
35688
+ return _regenerator().w(function (_context4) {
35689
+ while (1) switch (_context4.n) {
35690
+ case 0:
35691
+ if (this.managers.componentDataManager) {
35692
+ _context4.n = 1;
35693
+ break;
35694
+ }
35695
+ console.warn('⚠️ removeS3Components(): Component data manager not available');
35696
+ return _context4.a(2, false);
35697
+ case 1:
35698
+ _context4.n = 2;
35699
+ return this.managers.componentDataManager.removeS3Components();
35700
+ case 2:
35701
+ return _context4.a(2, _context4.v);
35702
+ }
35703
+ }, _callee4, this);
35704
+ }));
35705
+ function removeS3Components() {
35706
+ return _removeS3Components.apply(this, arguments);
35707
+ }
35708
+ return removeS3Components;
35709
+ }()
35608
35710
  /**
35609
35711
  * Select an object (component, connector, or gateway) in the scene by its ID
35610
35712
  * @param {string} objectId - The UUID or name of the object to select
@@ -35802,49 +35904,49 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
35802
35904
  }, {
35803
35905
  key: "initialize2DViewport",
35804
35906
  value: function () {
35805
- var _initialize2DViewport = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(container) {
35907
+ var _initialize2DViewport = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(container) {
35806
35908
  var viewType,
35807
35909
  instanceKey,
35808
35910
  success,
35809
- _args4 = arguments,
35911
+ _args5 = arguments,
35810
35912
  _t2;
35811
- return _regenerator().w(function (_context4) {
35812
- while (1) switch (_context4.n) {
35913
+ return _regenerator().w(function (_context5) {
35914
+ while (1) switch (_context5.n) {
35813
35915
  case 0:
35814
- viewType = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : 'top';
35815
- instanceKey = _args4.length > 2 && _args4[2] !== undefined ? _args4[2] : null;
35916
+ viewType = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : 'top';
35917
+ instanceKey = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : null;
35816
35918
  if (container) {
35817
- _context4.n = 1;
35919
+ _context5.n = 1;
35818
35920
  break;
35819
35921
  }
35820
35922
  console.warn('⚠️ initialize2DViewport(): No container provided');
35821
- return _context4.a(2, false);
35923
+ return _context5.a(2, false);
35822
35924
  case 1:
35823
35925
  if (this.managers.viewport2DManager) {
35824
- _context4.n = 2;
35926
+ _context5.n = 2;
35825
35927
  break;
35826
35928
  }
35827
35929
  console.warn('⚠️ initialize2DViewport(): Viewport2D manager not available');
35828
- return _context4.a(2, false);
35930
+ return _context5.a(2, false);
35829
35931
  case 2:
35830
- _context4.p = 2;
35831
- _context4.n = 3;
35932
+ _context5.p = 2;
35933
+ _context5.n = 3;
35832
35934
  return this.managers.viewport2DManager.initialize(container, viewType, instanceKey);
35833
35935
  case 3:
35834
- success = _context4.v;
35936
+ success = _context5.v;
35835
35937
  if (success) {
35836
35938
  console.log("\u2705 2D viewport initialized successfully (".concat(viewType, " view, key: ").concat(instanceKey || viewType, ")"));
35837
35939
  } else {
35838
35940
  console.warn("\u26A0\uFE0F Failed to initialize 2D viewport (".concat(viewType, " view)"));
35839
35941
  }
35840
- return _context4.a(2, success);
35942
+ return _context5.a(2, success);
35841
35943
  case 4:
35842
- _context4.p = 4;
35843
- _t2 = _context4.v;
35944
+ _context5.p = 4;
35945
+ _t2 = _context5.v;
35844
35946
  console.error('❌ initialize2DViewport(): Error initializing 2D viewport:', _t2);
35845
- return _context4.a(2, false);
35947
+ return _context5.a(2, false);
35846
35948
  }
35847
- }, _callee4, this, [[2, 4]]);
35949
+ }, _callee5, this, [[2, 4]]);
35848
35950
  }));
35849
35951
  function initialize2DViewport(_x3) {
35850
35952
  return _initialize2DViewport.apply(this, arguments);
@@ -35992,7 +36094,7 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
35992
36094
  }, {
35993
36095
  key: "initializeModelPreloading",
35994
36096
  value: (function () {
35995
- var _initializeModelPreloading = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5() {
36097
+ var _initializeModelPreloading = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6() {
35996
36098
  var basePath,
35997
36099
  normalizedBasePath,
35998
36100
  dictionaryPath,
@@ -36001,13 +36103,13 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
36001
36103
  componentDictionary,
36002
36104
  _modelPreloader2,
36003
36105
  progress,
36004
- _args5 = arguments,
36106
+ _args6 = arguments,
36005
36107
  _t3;
36006
- return _regenerator().w(function (_context5) {
36007
- while (1) switch (_context5.n) {
36108
+ return _regenerator().w(function (_context6) {
36109
+ while (1) switch (_context6.n) {
36008
36110
  case 0:
36009
- basePath = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : '/library/';
36010
- _context5.p = 1;
36111
+ basePath = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : '/library/';
36112
+ _context6.p = 1;
36011
36113
  // Ensure basePath ends with a slash
36012
36114
  normalizedBasePath = basePath.endsWith('/') ? basePath : "".concat(basePath, "/");
36013
36115
  dictionaryPath = "".concat(normalizedBasePath, "component-dictionary.json");
@@ -36018,39 +36120,39 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
36018
36120
  console.log("\uFFFD Models path: ".concat(modelsBasePath));
36019
36121
 
36020
36122
  // Load the component dictionary
36021
- _context5.n = 2;
36123
+ _context6.n = 2;
36022
36124
  return fetch(dictionaryPath);
36023
36125
  case 2:
36024
- response = _context5.v;
36126
+ response = _context6.v;
36025
36127
  if (response.ok) {
36026
- _context5.n = 3;
36128
+ _context6.n = 3;
36027
36129
  break;
36028
36130
  }
36029
36131
  throw new Error("Failed to load component dictionary: ".concat(response.status));
36030
36132
  case 3:
36031
- _context5.n = 4;
36133
+ _context6.n = 4;
36032
36134
  return response.json();
36033
36135
  case 4:
36034
- componentDictionary = _context5.v;
36136
+ componentDictionary = _context6.v;
36035
36137
  console.log('📚 Component dictionary loaded:', Object.keys(componentDictionary));
36036
36138
 
36037
36139
  // Start preloading all models with the specified base path
36038
36140
  _modelPreloader2 = this.getUtility('modelPreloader');
36039
- _context5.n = 5;
36141
+ _context6.n = 5;
36040
36142
  return _modelPreloader2.preloadAllModels(componentDictionary, modelsBasePath);
36041
36143
  case 5:
36042
- progress = _context5.v;
36144
+ progress = _context6.v;
36043
36145
  console.log('🎉 Model preloading completed:', progress);
36044
- return _context5.a(2, progress);
36146
+ return _context6.a(2, progress);
36045
36147
  case 6:
36046
- _context5.p = 6;
36047
- _t3 = _context5.v;
36148
+ _context6.p = 6;
36149
+ _t3 = _context6.v;
36048
36150
  console.error('❌ Failed to initialize model preloading:', _t3);
36049
36151
  throw _t3;
36050
36152
  case 7:
36051
- return _context5.a(2);
36153
+ return _context6.a(2);
36052
36154
  }
36053
- }, _callee5, this, [[1, 6]]);
36155
+ }, _callee6, this, [[1, 6]]);
36054
36156
  }));
36055
36157
  function initializeModelPreloading() {
36056
36158
  return _initializeModelPreloading.apply(this, arguments);
@@ -36067,55 +36169,55 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
36067
36169
  }, {
36068
36170
  key: "importScene",
36069
36171
  value: (function () {
36070
- var _importScene = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(jsonData) {
36172
+ var _importScene = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7(jsonData) {
36071
36173
  var validation, _t4;
36072
- return _regenerator().w(function (_context6) {
36073
- while (1) switch (_context6.n) {
36174
+ return _regenerator().w(function (_context7) {
36175
+ while (1) switch (_context7.n) {
36074
36176
  case 0:
36075
36177
  if (jsonData) {
36076
- _context6.n = 1;
36178
+ _context7.n = 1;
36077
36179
  break;
36078
36180
  }
36079
36181
  console.error('❌ No JSON data provided for import');
36080
- return _context6.a(2, false);
36182
+ return _context7.a(2, false);
36081
36183
  case 1:
36082
- _context6.p = 1;
36184
+ _context7.p = 1;
36083
36185
  // Validate scene data structure
36084
36186
  validation = this.internals.validateAndAnalyzeSceneData(jsonData);
36085
36187
  if (validation.isValid) {
36086
- _context6.n = 2;
36188
+ _context7.n = 2;
36087
36189
  break;
36088
36190
  }
36089
36191
  console.error('❌ Invalid scene data format:', validation.message);
36090
- return _context6.a(2, false);
36192
+ return _context7.a(2, false);
36091
36193
  case 2:
36092
- _context6.n = 3;
36194
+ _context7.n = 3;
36093
36195
  return this.setImportedSceneData(jsonData);
36094
36196
  case 3:
36095
36197
  if (!(this.sceneViewer && this.sceneViewer.sceneOperationsManager)) {
36096
- _context6.n = 5;
36198
+ _context7.n = 5;
36097
36199
  break;
36098
36200
  }
36099
- _context6.n = 4;
36201
+ _context7.n = 4;
36100
36202
  return this.sceneViewer.sceneOperationsManager.loadSceneFromData(jsonData);
36101
36203
  case 4:
36102
36204
  console.log('✅ Scene imported successfully');
36103
- return _context6.a(2, true);
36205
+ return _context7.a(2, true);
36104
36206
  case 5:
36105
36207
  console.error('❌ SceneViewer not available for scene loading');
36106
- return _context6.a(2, false);
36208
+ return _context7.a(2, false);
36107
36209
  case 6:
36108
- _context6.n = 8;
36210
+ _context7.n = 8;
36109
36211
  break;
36110
36212
  case 7:
36111
- _context6.p = 7;
36112
- _t4 = _context6.v;
36213
+ _context7.p = 7;
36214
+ _t4 = _context7.v;
36113
36215
  console.error('❌ Error importing scene:', _t4);
36114
- return _context6.a(2, false);
36216
+ return _context7.a(2, false);
36115
36217
  case 8:
36116
- return _context6.a(2);
36218
+ return _context7.a(2);
36117
36219
  }
36118
- }, _callee6, this, [[1, 7]]);
36220
+ }, _callee7, this, [[1, 7]]);
36119
36221
  }));
36120
36222
  function importScene(_x4) {
36121
36223
  return _importScene.apply(this, arguments);
@@ -36139,33 +36241,33 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
36139
36241
  }, {
36140
36242
  key: "exportSceneJSON",
36141
36243
  value: (function () {
36142
- var _exportSceneJSON = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7() {
36244
+ var _exportSceneJSON = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee8() {
36143
36245
  var filename,
36144
- _args7 = arguments,
36246
+ _args8 = arguments,
36145
36247
  _t5;
36146
- return _regenerator().w(function (_context7) {
36147
- while (1) switch (_context7.n) {
36248
+ return _regenerator().w(function (_context8) {
36249
+ while (1) switch (_context8.n) {
36148
36250
  case 0:
36149
- filename = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : null;
36251
+ filename = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : null;
36150
36252
  if (this.managers.sceneExportManager) {
36151
- _context7.n = 1;
36253
+ _context8.n = 1;
36152
36254
  break;
36153
36255
  }
36154
36256
  console.error('❌ Scene export manager not available');
36155
- return _context7.a(2, false);
36257
+ return _context8.a(2, false);
36156
36258
  case 1:
36157
- _context7.p = 1;
36158
- _context7.n = 2;
36259
+ _context8.p = 1;
36260
+ _context8.n = 2;
36159
36261
  return this.managers.sceneExportManager.downloadSceneJSON(filename);
36160
36262
  case 2:
36161
- return _context7.a(2, _context7.v);
36263
+ return _context8.a(2, _context8.v);
36162
36264
  case 3:
36163
- _context7.p = 3;
36164
- _t5 = _context7.v;
36265
+ _context8.p = 3;
36266
+ _t5 = _context8.v;
36165
36267
  console.error('❌ Error exporting scene as JSON:', _t5);
36166
- return _context7.a(2, false);
36268
+ return _context8.a(2, false);
36167
36269
  }
36168
- }, _callee7, this, [[1, 3]]);
36270
+ }, _callee8, this, [[1, 3]]);
36169
36271
  }));
36170
36272
  function exportSceneJSON() {
36171
36273
  return _exportSceneJSON.apply(this, arguments);
@@ -36190,33 +36292,33 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
36190
36292
  }, {
36191
36293
  key: "exportSceneGLTF",
36192
36294
  value: (function () {
36193
- var _exportSceneGLTF = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee8() {
36295
+ var _exportSceneGLTF = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee9() {
36194
36296
  var filename,
36195
- _args8 = arguments,
36297
+ _args9 = arguments,
36196
36298
  _t6;
36197
- return _regenerator().w(function (_context8) {
36198
- while (1) switch (_context8.n) {
36299
+ return _regenerator().w(function (_context9) {
36300
+ while (1) switch (_context9.n) {
36199
36301
  case 0:
36200
- filename = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : null;
36302
+ filename = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : null;
36201
36303
  if (this.managers.sceneExportManager) {
36202
- _context8.n = 1;
36304
+ _context9.n = 1;
36203
36305
  break;
36204
36306
  }
36205
36307
  console.error('❌ Scene export manager not available');
36206
- return _context8.a(2, false);
36308
+ return _context9.a(2, false);
36207
36309
  case 1:
36208
- _context8.p = 1;
36209
- _context8.n = 2;
36310
+ _context9.p = 1;
36311
+ _context9.n = 2;
36210
36312
  return this.managers.sceneExportManager.exportSceneAsGLTF(filename, false);
36211
36313
  case 2:
36212
- return _context8.a(2, _context8.v);
36314
+ return _context9.a(2, _context9.v);
36213
36315
  case 3:
36214
- _context8.p = 3;
36215
- _t6 = _context8.v;
36316
+ _context9.p = 3;
36317
+ _t6 = _context9.v;
36216
36318
  console.error('❌ Error exporting scene as GLTF:', _t6);
36217
- return _context8.a(2, false);
36319
+ return _context9.a(2, false);
36218
36320
  }
36219
- }, _callee8, this, [[1, 3]]);
36321
+ }, _callee9, this, [[1, 3]]);
36220
36322
  }));
36221
36323
  function exportSceneGLTF() {
36222
36324
  return _exportSceneGLTF.apply(this, arguments);
@@ -36242,33 +36344,33 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
36242
36344
  }, {
36243
36345
  key: "exportSceneGLB",
36244
36346
  value: (function () {
36245
- var _exportSceneGLB = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee9() {
36347
+ var _exportSceneGLB = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0() {
36246
36348
  var filename,
36247
- _args9 = arguments,
36349
+ _args0 = arguments,
36248
36350
  _t7;
36249
- return _regenerator().w(function (_context9) {
36250
- while (1) switch (_context9.n) {
36351
+ return _regenerator().w(function (_context0) {
36352
+ while (1) switch (_context0.n) {
36251
36353
  case 0:
36252
- filename = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : null;
36354
+ filename = _args0.length > 0 && _args0[0] !== undefined ? _args0[0] : null;
36253
36355
  if (this.managers.sceneExportManager) {
36254
- _context9.n = 1;
36356
+ _context0.n = 1;
36255
36357
  break;
36256
36358
  }
36257
36359
  console.error('❌ Scene export manager not available');
36258
- return _context9.a(2, false);
36360
+ return _context0.a(2, false);
36259
36361
  case 1:
36260
- _context9.p = 1;
36261
- _context9.n = 2;
36362
+ _context0.p = 1;
36363
+ _context0.n = 2;
36262
36364
  return this.managers.sceneExportManager.exportSceneAsGLB(filename);
36263
36365
  case 2:
36264
- return _context9.a(2, _context9.v);
36366
+ return _context0.a(2, _context0.v);
36265
36367
  case 3:
36266
- _context9.p = 3;
36267
- _t7 = _context9.v;
36368
+ _context0.p = 3;
36369
+ _t7 = _context0.v;
36268
36370
  console.error('❌ Error exporting scene as GLB:', _t7);
36269
- return _context9.a(2, false);
36371
+ return _context0.a(2, false);
36270
36372
  }
36271
- }, _callee9, this, [[1, 3]]);
36373
+ }, _callee0, this, [[1, 3]]);
36272
36374
  }));
36273
36375
  function exportSceneGLB() {
36274
36376
  return _exportSceneGLB.apply(this, arguments);
@@ -36307,16 +36409,16 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
36307
36409
  }, {
36308
36410
  key: "loadSceneFromData",
36309
36411
  value: (function () {
36310
- var _loadSceneFromData = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0(sceneData) {
36311
- return _regenerator().w(function (_context0) {
36312
- while (1) switch (_context0.n) {
36412
+ var _loadSceneFromData = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee1(sceneData) {
36413
+ return _regenerator().w(function (_context1) {
36414
+ while (1) switch (_context1.n) {
36313
36415
  case 0:
36314
- _context0.n = 1;
36416
+ _context1.n = 1;
36315
36417
  return this.setImportedSceneData(sceneData);
36316
36418
  case 1:
36317
- return _context0.a(2, true);
36419
+ return _context1.a(2, true);
36318
36420
  }
36319
- }, _callee0, this);
36421
+ }, _callee1, this);
36320
36422
  }));
36321
36423
  function loadSceneFromData(_x5) {
36322
36424
  return _loadSceneFromData.apply(this, arguments);