@2112-lab/central-plant 0.1.71 → 0.1.73

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.
@@ -19,7 +19,7 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
19
19
  * Initialize the CentralPlant manager
20
20
  *
21
21
  * @constructor
22
- * @version 0.1.71
22
+ * @version 0.1.73
23
23
  * @updated 2025-10-22
24
24
  *
25
25
  * @description Creates a new CentralPlant instance and initializes internal managers and utilities.
@@ -58,6 +58,9 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
58
58
  // Initialize internals handler
59
59
  _this.internals = new centralPlantInternals.CentralPlantInternals(_this);
60
60
 
61
+ // Optional cache primer function (dependency injection)
62
+ _this.cachePrimer = null;
63
+
61
64
  // Initialize utilities immediately (they don't need scene viewer)
62
65
  _this.internals.initializeUtilities();
63
66
 
@@ -85,6 +88,54 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
85
88
  return this.internals.setSceneViewer(sceneViewer);
86
89
  }
87
90
 
91
+ /**
92
+ * Set the cache primer function (dependency injection)
93
+ * @param {Function} primerFn - Function that takes array of URLs and primes the cache
94
+ */
95
+ }, {
96
+ key: "setCachePrimer",
97
+ value: function setCachePrimer(primerFn) {
98
+ if (typeof primerFn !== 'function') {
99
+ console.warn('⚠️ Cache primer must be a function');
100
+ return;
101
+ }
102
+ this.cachePrimer = primerFn;
103
+ console.log('✅ Cache primer function set');
104
+ }
105
+
106
+ /**
107
+ * Prime the cache with the given URLs using the injected primer
108
+ * @param {Array<string>} urls - Array of URLs to cache
109
+ * @returns {Promise<Object>} Result of priming operation
110
+ */
111
+ }, {
112
+ key: "primeCache",
113
+ value: (function () {
114
+ var _primeCache = _rollupPluginBabelHelpers.asyncToGenerator(/*#__PURE__*/_rollupPluginBabelHelpers.regenerator().m(function _callee(urls) {
115
+ return _rollupPluginBabelHelpers.regenerator().w(function (_context) {
116
+ while (1) switch (_context.n) {
117
+ case 0:
118
+ if (this.cachePrimer) {
119
+ _context.n = 1;
120
+ break;
121
+ }
122
+ console.log('ℹ️ No cache primer set, skipping explicit cache priming');
123
+ return _context.a(2, {
124
+ success: 0,
125
+ failed: 0,
126
+ skipped: true
127
+ });
128
+ case 1:
129
+ console.log('🔄 Delegating to injected cache primer...', urls.length, 'urls');
130
+ return _context.a(2, this.cachePrimer(urls));
131
+ }
132
+ }, _callee, this);
133
+ }));
134
+ function primeCache(_x) {
135
+ return _primeCache.apply(this, arguments);
136
+ }
137
+ return primeCache;
138
+ }()
88
139
  /**
89
140
  * Set all managers and utilities on the scene viewer instance
90
141
  * @returns {boolean} True if attachment was successful, false otherwise
@@ -96,6 +147,7 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
96
147
  * console.log('Managers and utilities attached to component');
97
148
  * }
98
149
  */
150
+ )
99
151
  }, {
100
152
  key: "attachToComponent",
101
153
  value: function attachToComponent() {
@@ -137,12 +189,12 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
137
189
  }, {
138
190
  key: "setImportedSceneData",
139
191
  value: (function () {
140
- var _setImportedSceneData = _rollupPluginBabelHelpers.asyncToGenerator(/*#__PURE__*/_rollupPluginBabelHelpers.regenerator().m(function _callee(sceneData) {
192
+ var _setImportedSceneData = _rollupPluginBabelHelpers.asyncToGenerator(/*#__PURE__*/_rollupPluginBabelHelpers.regenerator().m(function _callee2(sceneData) {
141
193
  var _this$importedSceneDa, _this$importedSceneDa2;
142
- return _rollupPluginBabelHelpers.regenerator().w(function (_context) {
143
- while (1) switch (_context.n) {
194
+ return _rollupPluginBabelHelpers.regenerator().w(function (_context2) {
195
+ while (1) switch (_context2.n) {
144
196
  case 0:
145
- _context.n = 1;
197
+ _context2.n = 1;
146
198
  return this.internals.clearSceneComponents();
147
199
  case 1:
148
200
  this.importedSceneData = _rollupPluginBabelHelpers.objectSpread2({}, sceneData);
@@ -155,11 +207,11 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
155
207
  // Reset component counter based on imported components to avoid ID conflicts
156
208
  this.internals.resetComponentCounter();
157
209
  case 2:
158
- return _context.a(2);
210
+ return _context2.a(2);
159
211
  }
160
- }, _callee, this);
212
+ }, _callee2, this);
161
213
  }));
162
- function setImportedSceneData(_x) {
214
+ function setImportedSceneData(_x2) {
163
215
  return _setImportedSceneData.apply(this, arguments);
164
216
  }
165
217
  return setImportedSceneData;
@@ -1065,41 +1117,41 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
1065
1117
  }, {
1066
1118
  key: "getComponents",
1067
1119
  value: (function () {
1068
- var _getComponents = _rollupPluginBabelHelpers.asyncToGenerator(/*#__PURE__*/_rollupPluginBabelHelpers.regenerator().m(function _callee2() {
1120
+ var _getComponents = _rollupPluginBabelHelpers.asyncToGenerator(/*#__PURE__*/_rollupPluginBabelHelpers.regenerator().m(function _callee3() {
1069
1121
  var options,
1070
1122
  validation,
1071
1123
  enhancedOptions,
1072
- _args2 = arguments,
1124
+ _args3 = arguments,
1073
1125
  _t;
1074
- return _rollupPluginBabelHelpers.regenerator().w(function (_context2) {
1075
- while (1) switch (_context2.n) {
1126
+ return _rollupPluginBabelHelpers.regenerator().w(function (_context3) {
1127
+ while (1) switch (_context3.n) {
1076
1128
  case 0:
1077
- options = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
1129
+ options = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
1078
1130
  // Validate filter options using centralized validator
1079
1131
  validation = this.internals.validator.validateComponentFilter(options);
1080
1132
  if (validation.isValid) {
1081
- _context2.n = 1;
1133
+ _context3.n = 1;
1082
1134
  break;
1083
1135
  }
1084
1136
  console.warn('⚠️ getComponents(): Invalid filter options provided:', validation.message);
1085
- return _context2.a(2, []);
1137
+ return _context3.a(2, []);
1086
1138
  case 1:
1087
- _context2.p = 1;
1139
+ _context3.p = 1;
1088
1140
  // Always include metadata
1089
1141
  enhancedOptions = _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, options), {}, {
1090
1142
  includeMetadata: true
1091
1143
  });
1092
- _context2.n = 2;
1144
+ _context3.n = 2;
1093
1145
  return this.managers.componentDataManager.getDictionaryComponents(enhancedOptions);
1094
1146
  case 2:
1095
- return _context2.a(2, _context2.v);
1147
+ return _context3.a(2, _context3.v);
1096
1148
  case 3:
1097
- _context2.p = 3;
1098
- _t = _context2.v;
1149
+ _context3.p = 3;
1150
+ _t = _context3.v;
1099
1151
  console.error('❌ getDictionaryComponents(): Error retrieving available components:', _t);
1100
- return _context2.a(2, []);
1152
+ return _context3.a(2, []);
1101
1153
  }
1102
- }, _callee2, this, [[1, 3]]);
1154
+ }, _callee3, this, [[1, 3]]);
1103
1155
  }));
1104
1156
  function getComponents() {
1105
1157
  return _getComponents.apply(this, arguments);
@@ -1202,25 +1254,25 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
1202
1254
  }, {
1203
1255
  key: "extendComponentDictionary",
1204
1256
  value: (function () {
1205
- var _extendComponentDictionary = _rollupPluginBabelHelpers.asyncToGenerator(/*#__PURE__*/_rollupPluginBabelHelpers.regenerator().m(function _callee3(additionalComponents) {
1206
- return _rollupPluginBabelHelpers.regenerator().w(function (_context3) {
1207
- while (1) switch (_context3.n) {
1257
+ var _extendComponentDictionary = _rollupPluginBabelHelpers.asyncToGenerator(/*#__PURE__*/_rollupPluginBabelHelpers.regenerator().m(function _callee4(additionalComponents) {
1258
+ return _rollupPluginBabelHelpers.regenerator().w(function (_context4) {
1259
+ while (1) switch (_context4.n) {
1208
1260
  case 0:
1209
1261
  if (this.managers.componentDataManager) {
1210
- _context3.n = 1;
1262
+ _context4.n = 1;
1211
1263
  break;
1212
1264
  }
1213
1265
  console.warn('⚠️ extendComponentDictionary(): Component data manager not available');
1214
- return _context3.a(2, false);
1266
+ return _context4.a(2, false);
1215
1267
  case 1:
1216
- _context3.n = 2;
1268
+ _context4.n = 2;
1217
1269
  return this.managers.componentDataManager.extendComponentDictionary(additionalComponents);
1218
1270
  case 2:
1219
- return _context3.a(2, _context3.v);
1271
+ return _context4.a(2, _context4.v);
1220
1272
  }
1221
- }, _callee3, this);
1273
+ }, _callee4, this);
1222
1274
  }));
1223
- function extendComponentDictionary(_x2) {
1275
+ function extendComponentDictionary(_x3) {
1224
1276
  return _extendComponentDictionary.apply(this, arguments);
1225
1277
  }
1226
1278
  return extendComponentDictionary;
@@ -1241,23 +1293,23 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
1241
1293
  }, {
1242
1294
  key: "removeS3Components",
1243
1295
  value: (function () {
1244
- var _removeS3Components = _rollupPluginBabelHelpers.asyncToGenerator(/*#__PURE__*/_rollupPluginBabelHelpers.regenerator().m(function _callee4() {
1245
- return _rollupPluginBabelHelpers.regenerator().w(function (_context4) {
1246
- while (1) switch (_context4.n) {
1296
+ var _removeS3Components = _rollupPluginBabelHelpers.asyncToGenerator(/*#__PURE__*/_rollupPluginBabelHelpers.regenerator().m(function _callee5() {
1297
+ return _rollupPluginBabelHelpers.regenerator().w(function (_context5) {
1298
+ while (1) switch (_context5.n) {
1247
1299
  case 0:
1248
1300
  if (this.managers.componentDataManager) {
1249
- _context4.n = 1;
1301
+ _context5.n = 1;
1250
1302
  break;
1251
1303
  }
1252
1304
  console.warn('⚠️ removeS3Components(): Component data manager not available');
1253
- return _context4.a(2, false);
1305
+ return _context5.a(2, false);
1254
1306
  case 1:
1255
- _context4.n = 2;
1307
+ _context5.n = 2;
1256
1308
  return this.managers.componentDataManager.removeS3Components();
1257
1309
  case 2:
1258
- return _context4.a(2, _context4.v);
1310
+ return _context5.a(2, _context5.v);
1259
1311
  }
1260
- }, _callee4, this);
1312
+ }, _callee5, this);
1261
1313
  }));
1262
1314
  function removeS3Components() {
1263
1315
  return _removeS3Components.apply(this, arguments);
@@ -1281,25 +1333,25 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
1281
1333
  }, {
1282
1334
  key: "removeComponentFromDictionary",
1283
1335
  value: (function () {
1284
- var _removeComponentFromDictionary = _rollupPluginBabelHelpers.asyncToGenerator(/*#__PURE__*/_rollupPluginBabelHelpers.regenerator().m(function _callee5(componentKey) {
1285
- return _rollupPluginBabelHelpers.regenerator().w(function (_context5) {
1286
- while (1) switch (_context5.n) {
1336
+ var _removeComponentFromDictionary = _rollupPluginBabelHelpers.asyncToGenerator(/*#__PURE__*/_rollupPluginBabelHelpers.regenerator().m(function _callee6(componentKey) {
1337
+ return _rollupPluginBabelHelpers.regenerator().w(function (_context6) {
1338
+ while (1) switch (_context6.n) {
1287
1339
  case 0:
1288
1340
  if (this.managers.componentDataManager) {
1289
- _context5.n = 1;
1341
+ _context6.n = 1;
1290
1342
  break;
1291
1343
  }
1292
1344
  console.warn('⚠️ removeComponentFromDictionary(): Component data manager not available');
1293
- return _context5.a(2, false);
1345
+ return _context6.a(2, false);
1294
1346
  case 1:
1295
- _context5.n = 2;
1347
+ _context6.n = 2;
1296
1348
  return this.managers.componentDataManager.removeComponentFromDictionary(componentKey);
1297
1349
  case 2:
1298
- return _context5.a(2, _context5.v);
1350
+ return _context6.a(2, _context6.v);
1299
1351
  }
1300
- }, _callee5, this);
1352
+ }, _callee6, this);
1301
1353
  }));
1302
- function removeComponentFromDictionary(_x3) {
1354
+ function removeComponentFromDictionary(_x4) {
1303
1355
  return _removeComponentFromDictionary.apply(this, arguments);
1304
1356
  }
1305
1357
  return removeComponentFromDictionary;
@@ -1501,51 +1553,51 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
1501
1553
  }, {
1502
1554
  key: "initialize2DViewport",
1503
1555
  value: function () {
1504
- var _initialize2DViewport = _rollupPluginBabelHelpers.asyncToGenerator(/*#__PURE__*/_rollupPluginBabelHelpers.regenerator().m(function _callee6(container) {
1556
+ var _initialize2DViewport = _rollupPluginBabelHelpers.asyncToGenerator(/*#__PURE__*/_rollupPluginBabelHelpers.regenerator().m(function _callee7(container) {
1505
1557
  var viewType,
1506
1558
  instanceKey,
1507
1559
  success,
1508
- _args6 = arguments,
1560
+ _args7 = arguments,
1509
1561
  _t2;
1510
- return _rollupPluginBabelHelpers.regenerator().w(function (_context6) {
1511
- while (1) switch (_context6.n) {
1562
+ return _rollupPluginBabelHelpers.regenerator().w(function (_context7) {
1563
+ while (1) switch (_context7.n) {
1512
1564
  case 0:
1513
- viewType = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : 'top';
1514
- instanceKey = _args6.length > 2 && _args6[2] !== undefined ? _args6[2] : null;
1565
+ viewType = _args7.length > 1 && _args7[1] !== undefined ? _args7[1] : 'top';
1566
+ instanceKey = _args7.length > 2 && _args7[2] !== undefined ? _args7[2] : null;
1515
1567
  if (container) {
1516
- _context6.n = 1;
1568
+ _context7.n = 1;
1517
1569
  break;
1518
1570
  }
1519
1571
  console.warn('⚠️ initialize2DViewport(): No container provided');
1520
- return _context6.a(2, false);
1572
+ return _context7.a(2, false);
1521
1573
  case 1:
1522
1574
  if (this.managers.viewport2DManager) {
1523
- _context6.n = 2;
1575
+ _context7.n = 2;
1524
1576
  break;
1525
1577
  }
1526
1578
  console.warn('⚠️ initialize2DViewport(): Viewport2D manager not available');
1527
- return _context6.a(2, false);
1579
+ return _context7.a(2, false);
1528
1580
  case 2:
1529
- _context6.p = 2;
1530
- _context6.n = 3;
1581
+ _context7.p = 2;
1582
+ _context7.n = 3;
1531
1583
  return this.managers.viewport2DManager.initialize(container, viewType, instanceKey);
1532
1584
  case 3:
1533
- success = _context6.v;
1585
+ success = _context7.v;
1534
1586
  if (success) {
1535
1587
  console.log("\u2705 2D viewport initialized successfully (".concat(viewType, " view, key: ").concat(instanceKey || viewType, ")"));
1536
1588
  } else {
1537
1589
  console.warn("\u26A0\uFE0F Failed to initialize 2D viewport (".concat(viewType, " view)"));
1538
1590
  }
1539
- return _context6.a(2, success);
1591
+ return _context7.a(2, success);
1540
1592
  case 4:
1541
- _context6.p = 4;
1542
- _t2 = _context6.v;
1593
+ _context7.p = 4;
1594
+ _t2 = _context7.v;
1543
1595
  console.error('❌ initialize2DViewport(): Error initializing 2D viewport:', _t2);
1544
- return _context6.a(2, false);
1596
+ return _context7.a(2, false);
1545
1597
  }
1546
- }, _callee6, this, [[2, 4]]);
1598
+ }, _callee7, this, [[2, 4]]);
1547
1599
  }));
1548
- function initialize2DViewport(_x4) {
1600
+ function initialize2DViewport(_x5) {
1549
1601
  return _initialize2DViewport.apply(this, arguments);
1550
1602
  }
1551
1603
  return initialize2DViewport;
@@ -1691,7 +1743,7 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
1691
1743
  }, {
1692
1744
  key: "initializeModelPreloading",
1693
1745
  value: (function () {
1694
- var _initializeModelPreloading = _rollupPluginBabelHelpers.asyncToGenerator(/*#__PURE__*/_rollupPluginBabelHelpers.regenerator().m(function _callee7() {
1746
+ var _initializeModelPreloading = _rollupPluginBabelHelpers.asyncToGenerator(/*#__PURE__*/_rollupPluginBabelHelpers.regenerator().m(function _callee8() {
1695
1747
  var basePath,
1696
1748
  normalizedBasePath,
1697
1749
  dictionaryPath,
@@ -1700,13 +1752,13 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
1700
1752
  componentDictionary,
1701
1753
  _modelPreloader2,
1702
1754
  progress,
1703
- _args7 = arguments,
1755
+ _args8 = arguments,
1704
1756
  _t3;
1705
- return _rollupPluginBabelHelpers.regenerator().w(function (_context7) {
1706
- while (1) switch (_context7.n) {
1757
+ return _rollupPluginBabelHelpers.regenerator().w(function (_context8) {
1758
+ while (1) switch (_context8.n) {
1707
1759
  case 0:
1708
- basePath = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : '/library/';
1709
- _context7.p = 1;
1760
+ basePath = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : '/library/';
1761
+ _context8.p = 1;
1710
1762
  // Ensure basePath ends with a slash
1711
1763
  normalizedBasePath = basePath.endsWith('/') ? basePath : "".concat(basePath, "/");
1712
1764
  dictionaryPath = "".concat(normalizedBasePath, "component-dictionary.json");
@@ -1717,39 +1769,39 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
1717
1769
  console.log("\uFFFD Models path: ".concat(modelsBasePath));
1718
1770
 
1719
1771
  // Load the component dictionary
1720
- _context7.n = 2;
1772
+ _context8.n = 2;
1721
1773
  return fetch(dictionaryPath);
1722
1774
  case 2:
1723
- response = _context7.v;
1775
+ response = _context8.v;
1724
1776
  if (response.ok) {
1725
- _context7.n = 3;
1777
+ _context8.n = 3;
1726
1778
  break;
1727
1779
  }
1728
1780
  throw new Error("Failed to load component dictionary: ".concat(response.status));
1729
1781
  case 3:
1730
- _context7.n = 4;
1782
+ _context8.n = 4;
1731
1783
  return response.json();
1732
1784
  case 4:
1733
- componentDictionary = _context7.v;
1785
+ componentDictionary = _context8.v;
1734
1786
  console.log('📚 Component dictionary loaded:', Object.keys(componentDictionary));
1735
1787
 
1736
1788
  // Start preloading all models with the specified base path
1737
1789
  _modelPreloader2 = this.getUtility('modelPreloader');
1738
- _context7.n = 5;
1790
+ _context8.n = 5;
1739
1791
  return _modelPreloader2.preloadAllModels(componentDictionary, modelsBasePath);
1740
1792
  case 5:
1741
- progress = _context7.v;
1793
+ progress = _context8.v;
1742
1794
  console.log('🎉 Model preloading completed:', progress);
1743
- return _context7.a(2, progress);
1795
+ return _context8.a(2, progress);
1744
1796
  case 6:
1745
- _context7.p = 6;
1746
- _t3 = _context7.v;
1797
+ _context8.p = 6;
1798
+ _t3 = _context8.v;
1747
1799
  console.error('❌ Failed to initialize model preloading:', _t3);
1748
1800
  throw _t3;
1749
1801
  case 7:
1750
- return _context7.a(2);
1802
+ return _context8.a(2);
1751
1803
  }
1752
- }, _callee7, this, [[1, 6]]);
1804
+ }, _callee8, this, [[1, 6]]);
1753
1805
  }));
1754
1806
  function initializeModelPreloading() {
1755
1807
  return _initializeModelPreloading.apply(this, arguments);
@@ -1766,57 +1818,57 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
1766
1818
  }, {
1767
1819
  key: "importScene",
1768
1820
  value: (function () {
1769
- var _importScene = _rollupPluginBabelHelpers.asyncToGenerator(/*#__PURE__*/_rollupPluginBabelHelpers.regenerator().m(function _callee8(jsonData) {
1821
+ var _importScene = _rollupPluginBabelHelpers.asyncToGenerator(/*#__PURE__*/_rollupPluginBabelHelpers.regenerator().m(function _callee9(jsonData) {
1770
1822
  var validation, _t4;
1771
- return _rollupPluginBabelHelpers.regenerator().w(function (_context8) {
1772
- while (1) switch (_context8.n) {
1823
+ return _rollupPluginBabelHelpers.regenerator().w(function (_context9) {
1824
+ while (1) switch (_context9.n) {
1773
1825
  case 0:
1774
1826
  if (jsonData) {
1775
- _context8.n = 1;
1827
+ _context9.n = 1;
1776
1828
  break;
1777
1829
  }
1778
1830
  console.error('❌ No JSON data provided for import');
1779
- return _context8.a(2, false);
1831
+ return _context9.a(2, false);
1780
1832
  case 1:
1781
- _context8.p = 1;
1833
+ _context9.p = 1;
1782
1834
  // Validate scene data structure
1783
1835
  validation = this.internals.validateAndAnalyzeSceneData(jsonData);
1784
1836
  if (validation.isValid) {
1785
- _context8.n = 2;
1837
+ _context9.n = 2;
1786
1838
  break;
1787
1839
  }
1788
1840
  console.error('❌ Invalid scene data format:', validation.message);
1789
- return _context8.a(2, false);
1841
+ return _context9.a(2, false);
1790
1842
  case 2:
1791
- _context8.n = 3;
1843
+ _context9.n = 3;
1792
1844
  return this.setImportedSceneData(jsonData);
1793
1845
  case 3:
1794
1846
  if (!(this.sceneViewer && this.sceneViewer.sceneOperationsManager)) {
1795
- _context8.n = 5;
1847
+ _context9.n = 5;
1796
1848
  break;
1797
1849
  }
1798
- _context8.n = 4;
1850
+ _context9.n = 4;
1799
1851
  return this.sceneViewer.sceneOperationsManager.loadSceneFromData(jsonData);
1800
1852
  case 4:
1801
1853
  console.log('✅ Scene imported successfully');
1802
- return _context8.a(2, true);
1854
+ return _context9.a(2, true);
1803
1855
  case 5:
1804
1856
  console.error('❌ SceneViewer not available for scene loading');
1805
- return _context8.a(2, false);
1857
+ return _context9.a(2, false);
1806
1858
  case 6:
1807
- _context8.n = 8;
1859
+ _context9.n = 8;
1808
1860
  break;
1809
1861
  case 7:
1810
- _context8.p = 7;
1811
- _t4 = _context8.v;
1862
+ _context9.p = 7;
1863
+ _t4 = _context9.v;
1812
1864
  console.error('❌ Error importing scene:', _t4);
1813
- return _context8.a(2, false);
1865
+ return _context9.a(2, false);
1814
1866
  case 8:
1815
- return _context8.a(2);
1867
+ return _context9.a(2);
1816
1868
  }
1817
- }, _callee8, this, [[1, 7]]);
1869
+ }, _callee9, this, [[1, 7]]);
1818
1870
  }));
1819
- function importScene(_x5) {
1871
+ function importScene(_x6) {
1820
1872
  return _importScene.apply(this, arguments);
1821
1873
  }
1822
1874
  return importScene;
@@ -1838,33 +1890,33 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
1838
1890
  }, {
1839
1891
  key: "exportSceneJSON",
1840
1892
  value: (function () {
1841
- var _exportSceneJSON = _rollupPluginBabelHelpers.asyncToGenerator(/*#__PURE__*/_rollupPluginBabelHelpers.regenerator().m(function _callee9() {
1893
+ var _exportSceneJSON = _rollupPluginBabelHelpers.asyncToGenerator(/*#__PURE__*/_rollupPluginBabelHelpers.regenerator().m(function _callee0() {
1842
1894
  var filename,
1843
- _args9 = arguments,
1895
+ _args0 = arguments,
1844
1896
  _t5;
1845
- return _rollupPluginBabelHelpers.regenerator().w(function (_context9) {
1846
- while (1) switch (_context9.n) {
1897
+ return _rollupPluginBabelHelpers.regenerator().w(function (_context0) {
1898
+ while (1) switch (_context0.n) {
1847
1899
  case 0:
1848
- filename = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : null;
1900
+ filename = _args0.length > 0 && _args0[0] !== undefined ? _args0[0] : null;
1849
1901
  if (this.managers.sceneExportManager) {
1850
- _context9.n = 1;
1902
+ _context0.n = 1;
1851
1903
  break;
1852
1904
  }
1853
1905
  console.error('❌ Scene export manager not available');
1854
- return _context9.a(2, false);
1906
+ return _context0.a(2, false);
1855
1907
  case 1:
1856
- _context9.p = 1;
1857
- _context9.n = 2;
1908
+ _context0.p = 1;
1909
+ _context0.n = 2;
1858
1910
  return this.managers.sceneExportManager.downloadSceneJSON(filename);
1859
1911
  case 2:
1860
- return _context9.a(2, _context9.v);
1912
+ return _context0.a(2, _context0.v);
1861
1913
  case 3:
1862
- _context9.p = 3;
1863
- _t5 = _context9.v;
1914
+ _context0.p = 3;
1915
+ _t5 = _context0.v;
1864
1916
  console.error('❌ Error exporting scene as JSON:', _t5);
1865
- return _context9.a(2, false);
1917
+ return _context0.a(2, false);
1866
1918
  }
1867
- }, _callee9, this, [[1, 3]]);
1919
+ }, _callee0, this, [[1, 3]]);
1868
1920
  }));
1869
1921
  function exportSceneJSON() {
1870
1922
  return _exportSceneJSON.apply(this, arguments);
@@ -1889,33 +1941,33 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
1889
1941
  }, {
1890
1942
  key: "exportSceneGLTF",
1891
1943
  value: (function () {
1892
- var _exportSceneGLTF = _rollupPluginBabelHelpers.asyncToGenerator(/*#__PURE__*/_rollupPluginBabelHelpers.regenerator().m(function _callee0() {
1944
+ var _exportSceneGLTF = _rollupPluginBabelHelpers.asyncToGenerator(/*#__PURE__*/_rollupPluginBabelHelpers.regenerator().m(function _callee1() {
1893
1945
  var filename,
1894
- _args0 = arguments,
1946
+ _args1 = arguments,
1895
1947
  _t6;
1896
- return _rollupPluginBabelHelpers.regenerator().w(function (_context0) {
1897
- while (1) switch (_context0.n) {
1948
+ return _rollupPluginBabelHelpers.regenerator().w(function (_context1) {
1949
+ while (1) switch (_context1.n) {
1898
1950
  case 0:
1899
- filename = _args0.length > 0 && _args0[0] !== undefined ? _args0[0] : null;
1951
+ filename = _args1.length > 0 && _args1[0] !== undefined ? _args1[0] : null;
1900
1952
  if (this.managers.sceneExportManager) {
1901
- _context0.n = 1;
1953
+ _context1.n = 1;
1902
1954
  break;
1903
1955
  }
1904
1956
  console.error('❌ Scene export manager not available');
1905
- return _context0.a(2, false);
1957
+ return _context1.a(2, false);
1906
1958
  case 1:
1907
- _context0.p = 1;
1908
- _context0.n = 2;
1959
+ _context1.p = 1;
1960
+ _context1.n = 2;
1909
1961
  return this.managers.sceneExportManager.exportSceneAsGLTF(filename, false);
1910
1962
  case 2:
1911
- return _context0.a(2, _context0.v);
1963
+ return _context1.a(2, _context1.v);
1912
1964
  case 3:
1913
- _context0.p = 3;
1914
- _t6 = _context0.v;
1965
+ _context1.p = 3;
1966
+ _t6 = _context1.v;
1915
1967
  console.error('❌ Error exporting scene as GLTF:', _t6);
1916
- return _context0.a(2, false);
1968
+ return _context1.a(2, false);
1917
1969
  }
1918
- }, _callee0, this, [[1, 3]]);
1970
+ }, _callee1, this, [[1, 3]]);
1919
1971
  }));
1920
1972
  function exportSceneGLTF() {
1921
1973
  return _exportSceneGLTF.apply(this, arguments);
@@ -1941,33 +1993,33 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
1941
1993
  }, {
1942
1994
  key: "exportSceneGLB",
1943
1995
  value: (function () {
1944
- var _exportSceneGLB = _rollupPluginBabelHelpers.asyncToGenerator(/*#__PURE__*/_rollupPluginBabelHelpers.regenerator().m(function _callee1() {
1996
+ var _exportSceneGLB = _rollupPluginBabelHelpers.asyncToGenerator(/*#__PURE__*/_rollupPluginBabelHelpers.regenerator().m(function _callee10() {
1945
1997
  var filename,
1946
- _args1 = arguments,
1998
+ _args10 = arguments,
1947
1999
  _t7;
1948
- return _rollupPluginBabelHelpers.regenerator().w(function (_context1) {
1949
- while (1) switch (_context1.n) {
2000
+ return _rollupPluginBabelHelpers.regenerator().w(function (_context10) {
2001
+ while (1) switch (_context10.n) {
1950
2002
  case 0:
1951
- filename = _args1.length > 0 && _args1[0] !== undefined ? _args1[0] : null;
2003
+ filename = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : null;
1952
2004
  if (this.managers.sceneExportManager) {
1953
- _context1.n = 1;
2005
+ _context10.n = 1;
1954
2006
  break;
1955
2007
  }
1956
2008
  console.error('❌ Scene export manager not available');
1957
- return _context1.a(2, false);
2009
+ return _context10.a(2, false);
1958
2010
  case 1:
1959
- _context1.p = 1;
1960
- _context1.n = 2;
2011
+ _context10.p = 1;
2012
+ _context10.n = 2;
1961
2013
  return this.managers.sceneExportManager.exportSceneAsGLB(filename);
1962
2014
  case 2:
1963
- return _context1.a(2, _context1.v);
2015
+ return _context10.a(2, _context10.v);
1964
2016
  case 3:
1965
- _context1.p = 3;
1966
- _t7 = _context1.v;
2017
+ _context10.p = 3;
2018
+ _t7 = _context10.v;
1967
2019
  console.error('❌ Error exporting scene as GLB:', _t7);
1968
- return _context1.a(2, false);
2020
+ return _context10.a(2, false);
1969
2021
  }
1970
- }, _callee1, this, [[1, 3]]);
2022
+ }, _callee10, this, [[1, 3]]);
1971
2023
  }));
1972
2024
  function exportSceneGLB() {
1973
2025
  return _exportSceneGLB.apply(this, arguments);
@@ -2006,18 +2058,18 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
2006
2058
  }, {
2007
2059
  key: "loadSceneFromData",
2008
2060
  value: (function () {
2009
- var _loadSceneFromData = _rollupPluginBabelHelpers.asyncToGenerator(/*#__PURE__*/_rollupPluginBabelHelpers.regenerator().m(function _callee10(sceneData) {
2010
- return _rollupPluginBabelHelpers.regenerator().w(function (_context10) {
2011
- while (1) switch (_context10.n) {
2061
+ var _loadSceneFromData = _rollupPluginBabelHelpers.asyncToGenerator(/*#__PURE__*/_rollupPluginBabelHelpers.regenerator().m(function _callee11(sceneData) {
2062
+ return _rollupPluginBabelHelpers.regenerator().w(function (_context11) {
2063
+ while (1) switch (_context11.n) {
2012
2064
  case 0:
2013
- _context10.n = 1;
2065
+ _context11.n = 1;
2014
2066
  return this.setImportedSceneData(sceneData);
2015
2067
  case 1:
2016
- return _context10.a(2, true);
2068
+ return _context11.a(2, true);
2017
2069
  }
2018
- }, _callee10, this);
2070
+ }, _callee11, this);
2019
2071
  }));
2020
- function loadSceneFromData(_x6) {
2072
+ function loadSceneFromData(_x7) {
2021
2073
  return _loadSceneFromData.apply(this, arguments);
2022
2074
  }
2023
2075
  return loadSceneFromData;