@2112-lab/central-plant 0.1.0 → 0.1.2

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.
Files changed (43) hide show
  1. package/dist/bundle/index.js +7782 -6543
  2. package/dist/cjs/_virtual/_rollupPluginBabelHelpers.js +23 -10
  3. package/dist/cjs/node_modules/@2112-lab/pathfinder/dist/index.esm.js +1448 -0
  4. package/dist/cjs/src/animationManager.js +15 -15
  5. package/dist/cjs/src/componentManager.js +8 -8
  6. package/dist/cjs/src/disposalManager.js +12 -12
  7. package/dist/cjs/src/environmentManager.js +392 -99
  8. package/dist/cjs/src/hotReloadManager.js +26 -26
  9. package/dist/cjs/src/index.js +19 -66
  10. package/dist/cjs/src/keyboardControlsManager.js +23 -23
  11. package/dist/cjs/src/nameUtils.js +21 -21
  12. package/dist/cjs/src/pathfindingManager.js +311 -129
  13. package/dist/cjs/src/performanceMonitor.js +52 -52
  14. package/dist/cjs/src/sceneExportManager.js +23 -23
  15. package/dist/cjs/src/sceneInitializationManager.js +18 -18
  16. package/dist/cjs/src/textureConfig.js +469 -40
  17. package/dist/cjs/src/transformControlsManager.js +79 -79
  18. package/dist/esm/_virtual/_rollupPluginBabelHelpers.js +21 -10
  19. package/dist/esm/node_modules/@2112-lab/pathfinder/dist/index.esm.js +1444 -0
  20. package/dist/esm/src/animationManager.js +15 -15
  21. package/dist/esm/src/componentManager.js +8 -8
  22. package/dist/esm/src/disposalManager.js +12 -12
  23. package/dist/esm/src/environmentManager.js +393 -100
  24. package/dist/esm/src/hotReloadManager.js +26 -26
  25. package/dist/esm/src/index.js +19 -66
  26. package/dist/esm/src/keyboardControlsManager.js +23 -23
  27. package/dist/esm/src/nameUtils.js +21 -21
  28. package/dist/esm/src/pathfindingManager.js +313 -129
  29. package/dist/esm/src/performanceMonitor.js +52 -52
  30. package/dist/esm/src/sceneExportManager.js +23 -23
  31. package/dist/esm/src/sceneInitializationManager.js +18 -18
  32. package/dist/esm/src/textureConfig.js +469 -42
  33. package/dist/esm/src/transformControlsManager.js +79 -79
  34. package/dist/index.d.ts +255 -259
  35. package/package.json +52 -53
  36. package/dist/cjs/src/ConnectionManager.js +0 -114
  37. package/dist/cjs/src/Pathfinder.js +0 -88
  38. package/dist/cjs/src/modelPreloader.js +0 -360
  39. package/dist/cjs/src/sceneOperationsManager.js +0 -560
  40. package/dist/esm/src/ConnectionManager.js +0 -110
  41. package/dist/esm/src/Pathfinder.js +0 -84
  42. package/dist/esm/src/modelPreloader.js +0 -337
  43. package/dist/esm/src/sceneOperationsManager.js +0 -536
@@ -76,8 +76,8 @@ var PerformanceMonitor = /*#__PURE__*/function () {
76
76
  this._update = this._update.bind(this);
77
77
  }
78
78
 
79
- /**
80
- * Start the performance monitor
79
+ /**
80
+ * Start the performance monitor
81
81
  */
82
82
  return _rollupPluginBabelHelpers.createClass(PerformanceMonitor, [{
83
83
  key: "start",
@@ -94,8 +94,8 @@ var PerformanceMonitor = /*#__PURE__*/function () {
94
94
  debugLogger.logger.info('Performance monitoring started');
95
95
  }
96
96
 
97
- /**
98
- * Stop the performance monitor
97
+ /**
98
+ * Stop the performance monitor
99
99
  */
100
100
  }, {
101
101
  key: "stop",
@@ -104,8 +104,8 @@ var PerformanceMonitor = /*#__PURE__*/function () {
104
104
  debugLogger.logger.info('Performance monitoring stopped');
105
105
  }
106
106
 
107
- /**
108
- * Reset statistics
107
+ /**
108
+ * Reset statistics
109
109
  */
110
110
  }, {
111
111
  key: "reset",
@@ -133,8 +133,8 @@ var PerformanceMonitor = /*#__PURE__*/function () {
133
133
  debugLogger.logger.info('Performance statistics reset');
134
134
  }
135
135
 
136
- /**
137
- * Update method called every animation frame
136
+ /**
137
+ * Update method called every animation frame
138
138
  */
139
139
  }, {
140
140
  key: "_update",
@@ -176,8 +176,8 @@ var PerformanceMonitor = /*#__PURE__*/function () {
176
176
  requestAnimationFrame(this._update);
177
177
  }
178
178
 
179
- /**
180
- * Update statistics for a specific metric
179
+ /**
180
+ * Update statistics for a specific metric
181
181
  */
182
182
  }, {
183
183
  key: "_updateStat",
@@ -206,8 +206,8 @@ var PerformanceMonitor = /*#__PURE__*/function () {
206
206
  }, 0) / stats.history.length;
207
207
  }
208
208
 
209
- /**
210
- * Get WebGL info from the renderer
209
+ /**
210
+ * Get WebGL info from the renderer
211
211
  */
212
212
  }, {
213
213
  key: "_getWebGLInfo",
@@ -240,8 +240,8 @@ var PerformanceMonitor = /*#__PURE__*/function () {
240
240
  this.stats.memory.programs = ((_info$programs = info.programs) === null || _info$programs === void 0 ? void 0 : _info$programs.length) || 0;
241
241
  }
242
242
 
243
- /**
244
- * Get system memory info
243
+ /**
244
+ * Get system memory info
245
245
  */
246
246
  }, {
247
247
  key: "_getMemoryInfo",
@@ -257,8 +257,8 @@ var PerformanceMonitor = /*#__PURE__*/function () {
257
257
  }
258
258
  }
259
259
 
260
- /**
261
- * Get GPU info if available
260
+ /**
261
+ * Get GPU info if available
262
262
  */
263
263
  }, {
264
264
  key: "_getGPUInfo",
@@ -280,8 +280,8 @@ var PerformanceMonitor = /*#__PURE__*/function () {
280
280
  this.stats.gpu.extensions = gl.getSupportedExtensions();
281
281
  }
282
282
 
283
- /**
284
- * Check for performance warnings
283
+ /**
284
+ * Check for performance warnings
285
285
  */
286
286
  }, {
287
287
  key: "_checkWarnings",
@@ -354,8 +354,8 @@ var PerformanceMonitor = /*#__PURE__*/function () {
354
354
  }
355
355
  }
356
356
 
357
- /**
358
- * Register an event callback
357
+ /**
358
+ * Register an event callback
359
359
  */
360
360
  }, {
361
361
  key: "on",
@@ -364,8 +364,8 @@ var PerformanceMonitor = /*#__PURE__*/function () {
364
364
  this.callbacks[event].push(callback);
365
365
  }
366
366
 
367
- /**
368
- * Remove an event callback
367
+ /**
368
+ * Remove an event callback
369
369
  */
370
370
  }, {
371
371
  key: "off",
@@ -377,8 +377,8 @@ var PerformanceMonitor = /*#__PURE__*/function () {
377
377
  }
378
378
  }
379
379
 
380
- /**
381
- * Trigger callbacks for an event
380
+ /**
381
+ * Trigger callbacks for an event
382
382
  */
383
383
  }, {
384
384
  key: "_triggerCallbacks",
@@ -393,8 +393,8 @@ var PerformanceMonitor = /*#__PURE__*/function () {
393
393
  });
394
394
  }
395
395
 
396
- /**
397
- * Log performance summary to console
396
+ /**
397
+ * Log performance summary to console
398
398
  */
399
399
  }, {
400
400
  key: "logSummary",
@@ -415,8 +415,8 @@ var PerformanceMonitor = /*#__PURE__*/function () {
415
415
  return this.stats;
416
416
  }
417
417
 
418
- /**
419
- * Export performance data
418
+ /**
419
+ * Export performance data
420
420
  */
421
421
  }, {
422
422
  key: "exportData",
@@ -430,8 +430,8 @@ var PerformanceMonitor = /*#__PURE__*/function () {
430
430
  };
431
431
  }
432
432
 
433
- /**
434
- * Get active warnings
433
+ /**
434
+ * Get active warnings
435
435
  */
436
436
  }, {
437
437
  key: "_getActiveWarnings",
@@ -478,8 +478,8 @@ var PerformanceMonitor = /*#__PURE__*/function () {
478
478
  return warnings;
479
479
  }
480
480
 
481
- /**
482
- * Set warning thresholds
481
+ /**
482
+ * Set warning thresholds
483
483
  */
484
484
  }, {
485
485
  key: "setWarningThresholds",
@@ -489,8 +489,8 @@ var PerformanceMonitor = /*#__PURE__*/function () {
489
489
  }]);
490
490
  }();
491
491
 
492
- /**
493
- * Performance UI class for displaying performance statistics
492
+ /**
493
+ * Performance UI class for displaying performance statistics
494
494
  */
495
495
  var PerformanceUI = /*#__PURE__*/function () {
496
496
  function PerformanceUI(monitor, container) {
@@ -506,8 +506,8 @@ var PerformanceUI = /*#__PURE__*/function () {
506
506
  this._setupUpdateLoop();
507
507
  }
508
508
 
509
- /**
510
- * Create the UI element
509
+ /**
510
+ * Create the UI element
511
511
  */
512
512
  return _rollupPluginBabelHelpers.createClass(PerformanceUI, [{
513
513
  key: "_createUI",
@@ -560,8 +560,8 @@ var PerformanceUI = /*#__PURE__*/function () {
560
560
  this.element.style.pointerEvents = 'none';
561
561
  }
562
562
 
563
- /**
564
- * Set UI theme
563
+ /**
564
+ * Set UI theme
565
565
  */
566
566
  }, {
567
567
  key: "setTheme",
@@ -578,8 +578,8 @@ var PerformanceUI = /*#__PURE__*/function () {
578
578
  }
579
579
  }
580
580
 
581
- /**
582
- * Setup update loop for refreshing the UI
581
+ /**
582
+ * Setup update loop for refreshing the UI
583
583
  */
584
584
  }, {
585
585
  key: "_setupUpdateLoop",
@@ -617,8 +617,8 @@ var PerformanceUI = /*#__PURE__*/function () {
617
617
  setInterval(updateStats, 500);
618
618
  }
619
619
 
620
- /**
621
- * Get color for a metric based on its value
620
+ /**
621
+ * Get color for a metric based on its value
622
622
  */
623
623
  }, {
624
624
  key: "_getMetricColor",
@@ -640,8 +640,8 @@ var PerformanceUI = /*#__PURE__*/function () {
640
640
  return "rgb(".concat(r, ", ").concat(g, ", ").concat(b, ")");
641
641
  }
642
642
 
643
- /**
644
- * Format number for display
643
+ /**
644
+ * Format number for display
645
645
  */
646
646
  }, {
647
647
  key: "_formatNumber",
@@ -654,8 +654,8 @@ var PerformanceUI = /*#__PURE__*/function () {
654
654
  return number.toString();
655
655
  }
656
656
 
657
- /**
658
- * Show the UI
657
+ /**
658
+ * Show the UI
659
659
  */
660
660
  }, {
661
661
  key: "show",
@@ -671,8 +671,8 @@ var PerformanceUI = /*#__PURE__*/function () {
671
671
  }
672
672
  }
673
673
 
674
- /**
675
- * Hide the UI
674
+ /**
675
+ * Hide the UI
676
676
  */
677
677
  }, {
678
678
  key: "hide",
@@ -683,8 +683,8 @@ var PerformanceUI = /*#__PURE__*/function () {
683
683
  this.element.style.pointerEvents = 'none';
684
684
  }
685
685
 
686
- /**
687
- * Toggle visibility
686
+ /**
687
+ * Toggle visibility
688
688
  */
689
689
  }, {
690
690
  key: "toggle",
@@ -696,8 +696,8 @@ var PerformanceUI = /*#__PURE__*/function () {
696
696
  }
697
697
  }
698
698
 
699
- /**
700
- * Clean up resources
699
+ /**
700
+ * Clean up resources
701
701
  */
702
702
  }, {
703
703
  key: "dispose",
@@ -5,22 +5,22 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.js');
6
6
  var nameUtils = require('./nameUtils.js');
7
7
 
8
- /**
9
- * Class for managing scene export operations
8
+ /**
9
+ * Class for managing scene export operations
10
10
  */
11
11
  var SceneExportManager = /*#__PURE__*/function () {
12
- /**
13
- * Create a SceneExportManager
14
- * @param {Object} componentInstance - The component instance containing scene data
12
+ /**
13
+ * Create a SceneExportManager
14
+ * @param {Object} componentInstance - The component instance containing scene data
15
15
  */
16
16
  function SceneExportManager(componentInstance) {
17
17
  _rollupPluginBabelHelpers.classCallCheck(this, SceneExportManager);
18
18
  this.component = componentInstance;
19
19
  }
20
20
 
21
- /**
22
- * Export function that recreates the JSON data structure from current scene objects
23
- * @returns {Object|null} The exported scene data as JSON object or null if export failed
21
+ /**
22
+ * Export function that recreates the JSON data structure from current scene objects
23
+ * @returns {Object|null} The exported scene data as JSON object or null if export failed
24
24
  */
25
25
  return _rollupPluginBabelHelpers.createClass(SceneExportManager, [{
26
26
  key: "exportSceneData",
@@ -188,10 +188,10 @@ var SceneExportManager = /*#__PURE__*/function () {
188
188
  return exportData;
189
189
  }
190
190
 
191
- /**
192
- * Helper function to download the exported scene data as JSON file
193
- * @param {string} filename - Optional filename for the export
194
- * @returns {boolean} Success status of the download operation
191
+ /**
192
+ * Helper function to download the exported scene data as JSON file
193
+ * @param {string} filename - Optional filename for the export
194
+ * @returns {boolean} Success status of the download operation
195
195
  */
196
196
  }, {
197
197
  key: "downloadSceneExport",
@@ -237,10 +237,10 @@ var SceneExportManager = /*#__PURE__*/function () {
237
237
  }
238
238
  }
239
239
 
240
- /**
241
- * Export scene data as JSON string
242
- * @param {boolean} pretty - Whether to format the JSON with indentation
243
- * @returns {string|null} JSON string or null if export failed
240
+ /**
241
+ * Export scene data as JSON string
242
+ * @param {boolean} pretty - Whether to format the JSON with indentation
243
+ * @returns {string|null} JSON string or null if export failed
244
244
  */
245
245
  }, {
246
246
  key: "exportSceneDataAsString",
@@ -253,9 +253,9 @@ var SceneExportManager = /*#__PURE__*/function () {
253
253
  return pretty ? JSON.stringify(exportData, null, 2) : JSON.stringify(exportData);
254
254
  }
255
255
 
256
- /**
257
- * Get export metadata
258
- * @returns {Object|null} Export metadata or null if scene is not available
256
+ /**
257
+ * Get export metadata
258
+ * @returns {Object|null} Export metadata or null if scene is not available
259
259
  */
260
260
  }, {
261
261
  key: "getExportMetadata",
@@ -278,10 +278,10 @@ var SceneExportManager = /*#__PURE__*/function () {
278
278
  }]);
279
279
  }();
280
280
 
281
- /**
282
- * Factory function to get SceneExportManager instance
283
- * @param {CentralPlantComponent} component - The component instance
284
- * @returns {SceneExportManager} SceneExportManager instance
281
+ /**
282
+ * Factory function to get SceneExportManager instance
283
+ * @param {CentralPlantComponent} component - The component instance
284
+ * @returns {SceneExportManager} SceneExportManager instance
285
285
  */
286
286
  function getSceneExportManager(component) {
287
287
  return new SceneExportManager(component);
@@ -121,8 +121,8 @@ var SceneInitializationManager = /*#__PURE__*/function () {
121
121
  importThreeJSDependencies();
122
122
  }
123
123
 
124
- /**
125
- * Initialize the Three.js scene, camera, and renderer
124
+ /**
125
+ * Initialize the Three.js scene, camera, and renderer
126
126
  */
127
127
  return _rollupPluginBabelHelpers.createClass(SceneInitializationManager, [{
128
128
  key: "initializeScene",
@@ -175,8 +175,8 @@ var SceneInitializationManager = /*#__PURE__*/function () {
175
175
  }
176
176
  return initializeScene;
177
177
  }()
178
- /**
179
- * Setup the WebGL renderer
178
+ /**
179
+ * Setup the WebGL renderer
180
180
  */
181
181
  )
182
182
  }, {
@@ -253,8 +253,8 @@ var SceneInitializationManager = /*#__PURE__*/function () {
253
253
  }
254
254
  return setupRenderer;
255
255
  }()
256
- /**
257
- * Setup orbit controls
256
+ /**
257
+ * Setup orbit controls
258
258
  */
259
259
  )
260
260
  }, {
@@ -281,8 +281,8 @@ var SceneInitializationManager = /*#__PURE__*/function () {
281
281
  return this.setupControlsInternal(container, options);
282
282
  }
283
283
 
284
- /**
285
- * Internal method to setup controls after dependencies are loaded
284
+ /**
285
+ * Internal method to setup controls after dependencies are loaded
286
286
  */
287
287
  }, {
288
288
  key: "setupControlsInternal",
@@ -314,8 +314,8 @@ var SceneInitializationManager = /*#__PURE__*/function () {
314
314
  return component.controls;
315
315
  }
316
316
 
317
- /**
318
- * Initialize performance monitoring
317
+ /**
318
+ * Initialize performance monitoring
319
319
  */
320
320
  }, {
321
321
  key: "initializePerformanceMonitoring",
@@ -376,8 +376,8 @@ var SceneInitializationManager = /*#__PURE__*/function () {
376
376
  }
377
377
  return initializePerformanceMonitoring;
378
378
  }()
379
- /**
380
- * Expose performance monitoring to global scope for debugging
379
+ /**
380
+ * Expose performance monitoring to global scope for debugging
381
381
  */
382
382
  )
383
383
  }, {
@@ -434,8 +434,8 @@ var SceneInitializationManager = /*#__PURE__*/function () {
434
434
  }
435
435
  }
436
436
 
437
- /**
438
- * Setup resize handler for responsive rendering
437
+ /**
438
+ * Setup resize handler for responsive rendering
439
439
  */
440
440
  }, {
441
441
  key: "setupResizeHandler",
@@ -471,8 +471,8 @@ var SceneInitializationManager = /*#__PURE__*/function () {
471
471
  debugLogger.logger.info('Resize handler initialized');
472
472
  }
473
473
 
474
- /**
475
- * Cleanup resize handler
474
+ /**
475
+ * Cleanup resize handler
476
476
  */
477
477
  }, {
478
478
  key: "cleanupResizeHandler",
@@ -488,8 +488,8 @@ var SceneInitializationManager = /*#__PURE__*/function () {
488
488
  // Create a singleton instance
489
489
  var sceneInitializationManager = null;
490
490
 
491
- /**
492
- * Get the global scene initialization manager instance
491
+ /**
492
+ * Get the global scene initialization manager instance
493
493
  */
494
494
  function getSceneInitializationManager() {
495
495
  var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;