@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
@@ -1,21 +1,21 @@
1
1
  import { createClass as _createClass, classCallCheck as _classCallCheck, asyncToGenerator as _asyncToGenerator, regenerator as _regenerator } from '../_virtual/_rollupPluginBabelHelpers.js';
2
2
 
3
- /**
4
- * Transform Controls Manager for Three.js
5
- * Provides modular object transformation capabilities with position, rotation, and scale controls
3
+ /**
4
+ * Transform Controls Manager for Three.js
5
+ * Provides modular object transformation capabilities with position, rotation, and scale controls
6
6
  */
7
7
 
8
8
  var THREE;
9
9
  var TransformControls;
10
10
 
11
- /**
12
- * Dynamically import ThreeJS and TransformControls when in browser environment
11
+ /**
12
+ * Dynamically import ThreeJS and TransformControls when in browser environment
13
13
  */
14
14
  function importDependencies() {
15
15
  return _importDependencies.apply(this, arguments);
16
16
  }
17
- /**
18
- * Class for managing object transform controls in a 3D scene
17
+ /**
18
+ * Class for managing object transform controls in a 3D scene
19
19
  */
20
20
  function _importDependencies() {
21
21
  _importDependencies = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
@@ -70,12 +70,12 @@ function _importDependencies() {
70
70
  return _importDependencies.apply(this, arguments);
71
71
  }
72
72
  var TransformControlsManager = /*#__PURE__*/function () {
73
- /**
74
- * Create a TransformControlsManager
75
- * @param {THREE.Scene} scene - The Three.js scene
76
- * @param {THREE.Camera} camera - The Three.js camera
77
- * @param {THREE.WebGLRenderer} renderer - The Three.js renderer
78
- * @param {THREE.OrbitControls} orbitControls - Optional orbit controls for camera
73
+ /**
74
+ * Create a TransformControlsManager
75
+ * @param {THREE.Scene} scene - The Three.js scene
76
+ * @param {THREE.Camera} camera - The Three.js camera
77
+ * @param {THREE.WebGLRenderer} renderer - The Three.js renderer
78
+ * @param {THREE.OrbitControls} orbitControls - Optional orbit controls for camera
79
79
  */
80
80
  function TransformControlsManager(scene, camera, renderer) {
81
81
  var _this = this;
@@ -160,8 +160,8 @@ var TransformControlsManager = /*#__PURE__*/function () {
160
160
  }
161
161
  }
162
162
 
163
- /**
164
- * Initialize the transform controls
163
+ /**
164
+ * Initialize the transform controls
165
165
  */
166
166
  return _createClass(TransformControlsManager, [{
167
167
  key: "init",
@@ -190,9 +190,9 @@ var TransformControlsManager = /*#__PURE__*/function () {
190
190
  }
191
191
  return init;
192
192
  }()
193
- /**
194
- * Register event callbacks
195
- * @param {Object} callbacks - Object containing callback functions
193
+ /**
194
+ * Register event callbacks
195
+ * @param {Object} callbacks - Object containing callback functions
196
196
  */
197
197
  )
198
198
  }, {
@@ -215,8 +215,8 @@ var TransformControlsManager = /*#__PURE__*/function () {
215
215
  }
216
216
  }
217
217
 
218
- /**
219
- * Create transform controls and add to scene
218
+ /**
219
+ * Create transform controls and add to scene
220
220
  */
221
221
  }, {
222
222
  key: "createTransformControls",
@@ -249,8 +249,8 @@ var TransformControlsManager = /*#__PURE__*/function () {
249
249
  }
250
250
  }
251
251
 
252
- /**
253
- * Set up event listeners for transform controls
252
+ /**
253
+ * Set up event listeners for transform controls
254
254
  */
255
255
  }, {
256
256
  key: "setupEventListeners",
@@ -318,8 +318,8 @@ var TransformControlsManager = /*#__PURE__*/function () {
318
318
  }
319
319
  }
320
320
 
321
- /**
322
- * Set up keyboard controls for transform operations
321
+ /**
322
+ * Set up keyboard controls for transform operations
323
323
  */
324
324
  }, {
325
325
  key: "setupKeyboardControls",
@@ -406,8 +406,8 @@ var TransformControlsManager = /*#__PURE__*/function () {
406
406
  document.addEventListener('keydown', this.eventHandlers.keydown);
407
407
  }
408
408
 
409
- /**
410
- * Remove all event listeners
409
+ /**
410
+ * Remove all event listeners
411
411
  */
412
412
  }, {
413
413
  key: "removeEventListeners",
@@ -427,9 +427,9 @@ var TransformControlsManager = /*#__PURE__*/function () {
427
427
  }
428
428
  }
429
429
 
430
- /**
431
- * Select an object for transformation
432
- * @param {THREE.Object3D} object - The object to transform
430
+ /**
431
+ * Select an object for transformation
432
+ * @param {THREE.Object3D} object - The object to transform
433
433
  */
434
434
  }, {
435
435
  key: "selectObject",
@@ -460,8 +460,8 @@ var TransformControlsManager = /*#__PURE__*/function () {
460
460
  return object;
461
461
  }
462
462
 
463
- /**
464
- * Deselect the currently selected object
463
+ /**
464
+ * Deselect the currently selected object
465
465
  */
466
466
  }, {
467
467
  key: "deselectObject",
@@ -491,9 +491,9 @@ var TransformControlsManager = /*#__PURE__*/function () {
491
491
  return null;
492
492
  }
493
493
 
494
- /**
495
- * Set transformation mode
496
- * @param {string} mode - The transform mode ('translate', 'rotate', or 'scale')
494
+ /**
495
+ * Set transformation mode
496
+ * @param {string} mode - The transform mode ('translate', 'rotate', or 'scale')
497
497
  */
498
498
  }, {
499
499
  key: "setMode",
@@ -523,8 +523,8 @@ var TransformControlsManager = /*#__PURE__*/function () {
523
523
  }
524
524
  }
525
525
 
526
- /**
527
- * Toggle coordinate space between world and local
526
+ /**
527
+ * Toggle coordinate space between world and local
528
528
  */
529
529
  }, {
530
530
  key: "toggleSpace",
@@ -534,8 +534,8 @@ var TransformControlsManager = /*#__PURE__*/function () {
534
534
  this.transformControls.setSpace(this.currentSpace);
535
535
  }
536
536
 
537
- /**
538
- * Toggle visibility of transform controls
537
+ /**
538
+ * Toggle visibility of transform controls
539
539
  */
540
540
  }, {
541
541
  key: "toggleVisibility",
@@ -546,9 +546,9 @@ var TransformControlsManager = /*#__PURE__*/function () {
546
546
  }
547
547
  }
548
548
 
549
- /**
550
- * Set enabled state of transform controls
551
- * @param {boolean} enabled - Whether transform controls should be enabled
549
+ /**
550
+ * Set enabled state of transform controls
551
+ * @param {boolean} enabled - Whether transform controls should be enabled
552
552
  */
553
553
  }, {
554
554
  key: "setEnabled",
@@ -565,8 +565,8 @@ var TransformControlsManager = /*#__PURE__*/function () {
565
565
  }
566
566
  }
567
567
 
568
- /**
569
- * Update axis visibility based on config
568
+ /**
569
+ * Update axis visibility based on config
570
570
  */
571
571
  }, {
572
572
  key: "updateAxisVisibility",
@@ -577,9 +577,9 @@ var TransformControlsManager = /*#__PURE__*/function () {
577
577
  this.transformControls.showZ = this.config.showZ;
578
578
  }
579
579
 
580
- /**
581
- * Show bounding box for an object
582
- * @param {THREE.Object3D} object - The object to show bounding box for
580
+ /**
581
+ * Show bounding box for an object
582
+ * @param {THREE.Object3D} object - The object to show bounding box for
583
583
  */
584
584
  }, {
585
585
  key: "showBoundingBox",
@@ -606,8 +606,8 @@ var TransformControlsManager = /*#__PURE__*/function () {
606
606
  object.userData.worldBoundingBox = boundingBox;
607
607
  }
608
608
 
609
- /**
610
- * Hide bounding box helper
609
+ /**
610
+ * Hide bounding box helper
611
611
  */
612
612
  }, {
613
613
  key: "hideBoundingBox",
@@ -618,8 +618,8 @@ var TransformControlsManager = /*#__PURE__*/function () {
618
618
  }
619
619
  }
620
620
 
621
- /**
622
- * Update bounding box for selected object
621
+ /**
622
+ * Update bounding box for selected object
623
623
  */
624
624
  }, {
625
625
  key: "updateBoundingBox",
@@ -641,10 +641,10 @@ var TransformControlsManager = /*#__PURE__*/function () {
641
641
  }
642
642
  }
643
643
 
644
- /**
645
- * Capture object transformation data
646
- * @param {THREE.Object3D} object - The object to capture transform from
647
- * @returns {Object} Object containing position, rotation and scale data
644
+ /**
645
+ * Capture object transformation data
646
+ * @param {THREE.Object3D} object - The object to capture transform from
647
+ * @returns {Object} Object containing position, rotation and scale data
648
648
  */
649
649
  }, {
650
650
  key: "captureObjectTransform",
@@ -669,12 +669,12 @@ var TransformControlsManager = /*#__PURE__*/function () {
669
669
  };
670
670
  }
671
671
 
672
- /**
673
- * Set snap values for transformations
674
- * @param {Object} options - Snap options
675
- * @param {number} options.translation - Translation snap value
676
- * @param {number} options.rotation - Rotation snap value in degrees
677
- * @param {number} options.scale - Scale snap value
672
+ /**
673
+ * Set snap values for transformations
674
+ * @param {Object} options - Snap options
675
+ * @param {number} options.translation - Translation snap value
676
+ * @param {number} options.rotation - Rotation snap value in degrees
677
+ * @param {number} options.scale - Scale snap value
678
678
  */
679
679
  }, {
680
680
  key: "setSnapValues",
@@ -703,9 +703,9 @@ var TransformControlsManager = /*#__PURE__*/function () {
703
703
  }
704
704
  }
705
705
 
706
- /**
707
- * Set size of transform controls
708
- * @param {number} size - The size factor for transform controls
706
+ /**
707
+ * Set size of transform controls
708
+ * @param {number} size - The size factor for transform controls
709
709
  */
710
710
  }, {
711
711
  key: "setSize",
@@ -716,8 +716,8 @@ var TransformControlsManager = /*#__PURE__*/function () {
716
716
  }
717
717
  }
718
718
 
719
- /**
720
- * Clean up resources and remove event listeners
719
+ /**
720
+ * Clean up resources and remove event listeners
721
721
  */
722
722
  }, {
723
723
  key: "dispose",
@@ -736,10 +736,10 @@ var TransformControlsManager = /*#__PURE__*/function () {
736
736
  console.log('🧹 TransformControlsManager disposed');
737
737
  }
738
738
 
739
- /**
740
- * Ensures transform controls are properly attached to the scene
741
- * @param {boolean} allowVisible - Whether to allow controls to be visible when reattached
742
- * @returns {boolean} - True if controls were reattached, false if already attached
739
+ /**
740
+ * Ensures transform controls are properly attached to the scene
741
+ * @param {boolean} allowVisible - Whether to allow controls to be visible when reattached
742
+ * @returns {boolean} - True if controls were reattached, false if already attached
743
743
  */
744
744
  }, {
745
745
  key: "ensureSceneAttachment",
@@ -760,9 +760,9 @@ var TransformControlsManager = /*#__PURE__*/function () {
760
760
  return false; // Already properly attached
761
761
  }
762
762
 
763
- /**
764
- * Get current transform data for the selected object
765
- * @returns {Object|null} Object containing position, rotation, scale, and world coordinates
763
+ /**
764
+ * Get current transform data for the selected object
765
+ * @returns {Object|null} Object containing position, rotation, scale, and world coordinates
766
766
  */
767
767
  }, {
768
768
  key: "getTransformData",
@@ -812,13 +812,13 @@ var TransformControlsManager = /*#__PURE__*/function () {
812
812
  }]);
813
813
  }();
814
814
 
815
- /**
816
- * Factory function to get TransformControlsManager instance
817
- * @param {THREE.Scene} scene - The Three.js scene
818
- * @param {THREE.Camera} camera - The Three.js camera
819
- * @param {THREE.WebGLRenderer} renderer - The Three.js renderer
820
- * @param {THREE.OrbitControls} orbitControls - Optional orbit controls for camera
821
- * @returns {TransformControlsManager} TransformControlsManager instance
815
+ /**
816
+ * Factory function to get TransformControlsManager instance
817
+ * @param {THREE.Scene} scene - The Three.js scene
818
+ * @param {THREE.Camera} camera - The Three.js camera
819
+ * @param {THREE.WebGLRenderer} renderer - The Three.js renderer
820
+ * @param {THREE.OrbitControls} orbitControls - Optional orbit controls for camera
821
+ * @returns {TransformControlsManager} TransformControlsManager instance
822
822
  */
823
823
  function getTransformControlsManager(scene, camera, renderer, orbitControls) {
824
824
  return new TransformControlsManager(scene, camera, renderer, orbitControls);