@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
@@ -22,22 +22,22 @@ function _interopNamespace(e) {
22
22
  return Object.freeze(n);
23
23
  }
24
24
 
25
- /**
26
- * Transform Controls Manager for Three.js
27
- * Provides modular object transformation capabilities with position, rotation, and scale controls
25
+ /**
26
+ * Transform Controls Manager for Three.js
27
+ * Provides modular object transformation capabilities with position, rotation, and scale controls
28
28
  */
29
29
 
30
30
  var THREE;
31
31
  var TransformControls;
32
32
 
33
- /**
34
- * Dynamically import ThreeJS and TransformControls when in browser environment
33
+ /**
34
+ * Dynamically import ThreeJS and TransformControls when in browser environment
35
35
  */
36
36
  function importDependencies() {
37
37
  return _importDependencies.apply(this, arguments);
38
38
  }
39
- /**
40
- * Class for managing object transform controls in a 3D scene
39
+ /**
40
+ * Class for managing object transform controls in a 3D scene
41
41
  */
42
42
  function _importDependencies() {
43
43
  _importDependencies = _rollupPluginBabelHelpers.asyncToGenerator(/*#__PURE__*/_rollupPluginBabelHelpers.regenerator().m(function _callee2() {
@@ -92,12 +92,12 @@ function _importDependencies() {
92
92
  return _importDependencies.apply(this, arguments);
93
93
  }
94
94
  var TransformControlsManager = /*#__PURE__*/function () {
95
- /**
96
- * Create a TransformControlsManager
97
- * @param {THREE.Scene} scene - The Three.js scene
98
- * @param {THREE.Camera} camera - The Three.js camera
99
- * @param {THREE.WebGLRenderer} renderer - The Three.js renderer
100
- * @param {THREE.OrbitControls} orbitControls - Optional orbit controls for camera
95
+ /**
96
+ * Create a TransformControlsManager
97
+ * @param {THREE.Scene} scene - The Three.js scene
98
+ * @param {THREE.Camera} camera - The Three.js camera
99
+ * @param {THREE.WebGLRenderer} renderer - The Three.js renderer
100
+ * @param {THREE.OrbitControls} orbitControls - Optional orbit controls for camera
101
101
  */
102
102
  function TransformControlsManager(scene, camera, renderer) {
103
103
  var _this = this;
@@ -182,8 +182,8 @@ var TransformControlsManager = /*#__PURE__*/function () {
182
182
  }
183
183
  }
184
184
 
185
- /**
186
- * Initialize the transform controls
185
+ /**
186
+ * Initialize the transform controls
187
187
  */
188
188
  return _rollupPluginBabelHelpers.createClass(TransformControlsManager, [{
189
189
  key: "init",
@@ -212,9 +212,9 @@ var TransformControlsManager = /*#__PURE__*/function () {
212
212
  }
213
213
  return init;
214
214
  }()
215
- /**
216
- * Register event callbacks
217
- * @param {Object} callbacks - Object containing callback functions
215
+ /**
216
+ * Register event callbacks
217
+ * @param {Object} callbacks - Object containing callback functions
218
218
  */
219
219
  )
220
220
  }, {
@@ -237,8 +237,8 @@ var TransformControlsManager = /*#__PURE__*/function () {
237
237
  }
238
238
  }
239
239
 
240
- /**
241
- * Create transform controls and add to scene
240
+ /**
241
+ * Create transform controls and add to scene
242
242
  */
243
243
  }, {
244
244
  key: "createTransformControls",
@@ -271,8 +271,8 @@ var TransformControlsManager = /*#__PURE__*/function () {
271
271
  }
272
272
  }
273
273
 
274
- /**
275
- * Set up event listeners for transform controls
274
+ /**
275
+ * Set up event listeners for transform controls
276
276
  */
277
277
  }, {
278
278
  key: "setupEventListeners",
@@ -340,8 +340,8 @@ var TransformControlsManager = /*#__PURE__*/function () {
340
340
  }
341
341
  }
342
342
 
343
- /**
344
- * Set up keyboard controls for transform operations
343
+ /**
344
+ * Set up keyboard controls for transform operations
345
345
  */
346
346
  }, {
347
347
  key: "setupKeyboardControls",
@@ -428,8 +428,8 @@ var TransformControlsManager = /*#__PURE__*/function () {
428
428
  document.addEventListener('keydown', this.eventHandlers.keydown);
429
429
  }
430
430
 
431
- /**
432
- * Remove all event listeners
431
+ /**
432
+ * Remove all event listeners
433
433
  */
434
434
  }, {
435
435
  key: "removeEventListeners",
@@ -449,9 +449,9 @@ var TransformControlsManager = /*#__PURE__*/function () {
449
449
  }
450
450
  }
451
451
 
452
- /**
453
- * Select an object for transformation
454
- * @param {THREE.Object3D} object - The object to transform
452
+ /**
453
+ * Select an object for transformation
454
+ * @param {THREE.Object3D} object - The object to transform
455
455
  */
456
456
  }, {
457
457
  key: "selectObject",
@@ -482,8 +482,8 @@ var TransformControlsManager = /*#__PURE__*/function () {
482
482
  return object;
483
483
  }
484
484
 
485
- /**
486
- * Deselect the currently selected object
485
+ /**
486
+ * Deselect the currently selected object
487
487
  */
488
488
  }, {
489
489
  key: "deselectObject",
@@ -513,9 +513,9 @@ var TransformControlsManager = /*#__PURE__*/function () {
513
513
  return null;
514
514
  }
515
515
 
516
- /**
517
- * Set transformation mode
518
- * @param {string} mode - The transform mode ('translate', 'rotate', or 'scale')
516
+ /**
517
+ * Set transformation mode
518
+ * @param {string} mode - The transform mode ('translate', 'rotate', or 'scale')
519
519
  */
520
520
  }, {
521
521
  key: "setMode",
@@ -545,8 +545,8 @@ var TransformControlsManager = /*#__PURE__*/function () {
545
545
  }
546
546
  }
547
547
 
548
- /**
549
- * Toggle coordinate space between world and local
548
+ /**
549
+ * Toggle coordinate space between world and local
550
550
  */
551
551
  }, {
552
552
  key: "toggleSpace",
@@ -556,8 +556,8 @@ var TransformControlsManager = /*#__PURE__*/function () {
556
556
  this.transformControls.setSpace(this.currentSpace);
557
557
  }
558
558
 
559
- /**
560
- * Toggle visibility of transform controls
559
+ /**
560
+ * Toggle visibility of transform controls
561
561
  */
562
562
  }, {
563
563
  key: "toggleVisibility",
@@ -568,9 +568,9 @@ var TransformControlsManager = /*#__PURE__*/function () {
568
568
  }
569
569
  }
570
570
 
571
- /**
572
- * Set enabled state of transform controls
573
- * @param {boolean} enabled - Whether transform controls should be enabled
571
+ /**
572
+ * Set enabled state of transform controls
573
+ * @param {boolean} enabled - Whether transform controls should be enabled
574
574
  */
575
575
  }, {
576
576
  key: "setEnabled",
@@ -587,8 +587,8 @@ var TransformControlsManager = /*#__PURE__*/function () {
587
587
  }
588
588
  }
589
589
 
590
- /**
591
- * Update axis visibility based on config
590
+ /**
591
+ * Update axis visibility based on config
592
592
  */
593
593
  }, {
594
594
  key: "updateAxisVisibility",
@@ -599,9 +599,9 @@ var TransformControlsManager = /*#__PURE__*/function () {
599
599
  this.transformControls.showZ = this.config.showZ;
600
600
  }
601
601
 
602
- /**
603
- * Show bounding box for an object
604
- * @param {THREE.Object3D} object - The object to show bounding box for
602
+ /**
603
+ * Show bounding box for an object
604
+ * @param {THREE.Object3D} object - The object to show bounding box for
605
605
  */
606
606
  }, {
607
607
  key: "showBoundingBox",
@@ -628,8 +628,8 @@ var TransformControlsManager = /*#__PURE__*/function () {
628
628
  object.userData.worldBoundingBox = boundingBox;
629
629
  }
630
630
 
631
- /**
632
- * Hide bounding box helper
631
+ /**
632
+ * Hide bounding box helper
633
633
  */
634
634
  }, {
635
635
  key: "hideBoundingBox",
@@ -640,8 +640,8 @@ var TransformControlsManager = /*#__PURE__*/function () {
640
640
  }
641
641
  }
642
642
 
643
- /**
644
- * Update bounding box for selected object
643
+ /**
644
+ * Update bounding box for selected object
645
645
  */
646
646
  }, {
647
647
  key: "updateBoundingBox",
@@ -663,10 +663,10 @@ var TransformControlsManager = /*#__PURE__*/function () {
663
663
  }
664
664
  }
665
665
 
666
- /**
667
- * Capture object transformation data
668
- * @param {THREE.Object3D} object - The object to capture transform from
669
- * @returns {Object} Object containing position, rotation and scale data
666
+ /**
667
+ * Capture object transformation data
668
+ * @param {THREE.Object3D} object - The object to capture transform from
669
+ * @returns {Object} Object containing position, rotation and scale data
670
670
  */
671
671
  }, {
672
672
  key: "captureObjectTransform",
@@ -691,12 +691,12 @@ var TransformControlsManager = /*#__PURE__*/function () {
691
691
  };
692
692
  }
693
693
 
694
- /**
695
- * Set snap values for transformations
696
- * @param {Object} options - Snap options
697
- * @param {number} options.translation - Translation snap value
698
- * @param {number} options.rotation - Rotation snap value in degrees
699
- * @param {number} options.scale - Scale snap value
694
+ /**
695
+ * Set snap values for transformations
696
+ * @param {Object} options - Snap options
697
+ * @param {number} options.translation - Translation snap value
698
+ * @param {number} options.rotation - Rotation snap value in degrees
699
+ * @param {number} options.scale - Scale snap value
700
700
  */
701
701
  }, {
702
702
  key: "setSnapValues",
@@ -725,9 +725,9 @@ var TransformControlsManager = /*#__PURE__*/function () {
725
725
  }
726
726
  }
727
727
 
728
- /**
729
- * Set size of transform controls
730
- * @param {number} size - The size factor for transform controls
728
+ /**
729
+ * Set size of transform controls
730
+ * @param {number} size - The size factor for transform controls
731
731
  */
732
732
  }, {
733
733
  key: "setSize",
@@ -738,8 +738,8 @@ var TransformControlsManager = /*#__PURE__*/function () {
738
738
  }
739
739
  }
740
740
 
741
- /**
742
- * Clean up resources and remove event listeners
741
+ /**
742
+ * Clean up resources and remove event listeners
743
743
  */
744
744
  }, {
745
745
  key: "dispose",
@@ -758,10 +758,10 @@ var TransformControlsManager = /*#__PURE__*/function () {
758
758
  console.log('🧹 TransformControlsManager disposed');
759
759
  }
760
760
 
761
- /**
762
- * Ensures transform controls are properly attached to the scene
763
- * @param {boolean} allowVisible - Whether to allow controls to be visible when reattached
764
- * @returns {boolean} - True if controls were reattached, false if already attached
761
+ /**
762
+ * Ensures transform controls are properly attached to the scene
763
+ * @param {boolean} allowVisible - Whether to allow controls to be visible when reattached
764
+ * @returns {boolean} - True if controls were reattached, false if already attached
765
765
  */
766
766
  }, {
767
767
  key: "ensureSceneAttachment",
@@ -782,9 +782,9 @@ var TransformControlsManager = /*#__PURE__*/function () {
782
782
  return false; // Already properly attached
783
783
  }
784
784
 
785
- /**
786
- * Get current transform data for the selected object
787
- * @returns {Object|null} Object containing position, rotation, scale, and world coordinates
785
+ /**
786
+ * Get current transform data for the selected object
787
+ * @returns {Object|null} Object containing position, rotation, scale, and world coordinates
788
788
  */
789
789
  }, {
790
790
  key: "getTransformData",
@@ -834,13 +834,13 @@ var TransformControlsManager = /*#__PURE__*/function () {
834
834
  }]);
835
835
  }();
836
836
 
837
- /**
838
- * Factory function to get TransformControlsManager instance
839
- * @param {THREE.Scene} scene - The Three.js scene
840
- * @param {THREE.Camera} camera - The Three.js camera
841
- * @param {THREE.WebGLRenderer} renderer - The Three.js renderer
842
- * @param {THREE.OrbitControls} orbitControls - Optional orbit controls for camera
843
- * @returns {TransformControlsManager} TransformControlsManager instance
837
+ /**
838
+ * Factory function to get TransformControlsManager instance
839
+ * @param {THREE.Scene} scene - The Three.js scene
840
+ * @param {THREE.Camera} camera - The Three.js camera
841
+ * @param {THREE.WebGLRenderer} renderer - The Three.js renderer
842
+ * @param {THREE.OrbitControls} orbitControls - Optional orbit controls for camera
843
+ * @returns {TransformControlsManager} TransformControlsManager instance
844
844
  */
845
845
  function getTransformControlsManager(scene, camera, renderer, orbitControls) {
846
846
  return new TransformControlsManager(scene, camera, renderer, orbitControls);
@@ -37,6 +37,13 @@ function _asyncToGenerator(n) {
37
37
  function _classCallCheck(a, n) {
38
38
  if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
39
39
  }
40
+ function _construct(t, e, r) {
41
+ if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
42
+ var o = [null];
43
+ o.push.apply(o, e);
44
+ var p = new (t.bind.apply(t, o))();
45
+ return r && _setPrototypeOf(p, r.prototype), p;
46
+ }
40
47
  function _defineProperties(e, r) {
41
48
  for (var t = 0; t < r.length; t++) {
42
49
  var o = r[t];
@@ -104,6 +111,14 @@ function _defineProperty(e, r, t) {
104
111
  writable: !0
105
112
  }) : e[r] = t, e;
106
113
  }
114
+ function _isNativeReflectConstruct() {
115
+ try {
116
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
117
+ } catch (t) {}
118
+ return (_isNativeReflectConstruct = function () {
119
+ return !!t;
120
+ })();
121
+ }
107
122
  function _iterableToArray(r) {
108
123
  if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
109
124
  }
@@ -288,6 +303,11 @@ function _regeneratorValues(e) {
288
303
  }
289
304
  throw new TypeError(typeof e + " is not iterable");
290
305
  }
306
+ function _setPrototypeOf(t, e) {
307
+ return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
308
+ return t.__proto__ = e, t;
309
+ }, _setPrototypeOf(t, e);
310
+ }
291
311
  function _slicedToArray(r, e) {
292
312
  return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
293
313
  }
@@ -308,15 +328,6 @@ function _toPropertyKey(t) {
308
328
  var i = _toPrimitive(t, "string");
309
329
  return "symbol" == typeof i ? i : i + "";
310
330
  }
311
- function _typeof(o) {
312
- "@babel/helpers - typeof";
313
-
314
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
315
- return typeof o;
316
- } : function (o) {
317
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
318
- }, _typeof(o);
319
- }
320
331
  function _unsupportedIterableToArray(r, a) {
321
332
  if (r) {
322
333
  if ("string" == typeof r) return _arrayLikeToArray(r, a);
@@ -325,4 +336,4 @@ function _unsupportedIterableToArray(r, a) {
325
336
  }
326
337
  }
327
338
 
328
- export { _arrayLikeToArray as arrayLikeToArray, _arrayWithHoles as arrayWithHoles, _arrayWithoutHoles as arrayWithoutHoles, _asyncToGenerator as asyncToGenerator, _classCallCheck as classCallCheck, _createClass as createClass, _createForOfIteratorHelper as createForOfIteratorHelper, _defineProperty as defineProperty, _iterableToArray as iterableToArray, _iterableToArrayLimit as iterableToArrayLimit, _nonIterableRest as nonIterableRest, _nonIterableSpread as nonIterableSpread, _objectSpread2 as objectSpread2, _regenerator as regenerator, _regeneratorDefine as regeneratorDefine, _regeneratorValues as regeneratorValues, _slicedToArray as slicedToArray, _toConsumableArray as toConsumableArray, _toPrimitive as toPrimitive, _toPropertyKey as toPropertyKey, _typeof as typeof, _unsupportedIterableToArray as unsupportedIterableToArray };
339
+ export { _arrayLikeToArray as arrayLikeToArray, _arrayWithHoles as arrayWithHoles, _arrayWithoutHoles as arrayWithoutHoles, _asyncToGenerator as asyncToGenerator, _classCallCheck as classCallCheck, _construct as construct, _createClass as createClass, _createForOfIteratorHelper as createForOfIteratorHelper, _defineProperty as defineProperty, _isNativeReflectConstruct as isNativeReflectConstruct, _iterableToArray as iterableToArray, _iterableToArrayLimit as iterableToArrayLimit, _nonIterableRest as nonIterableRest, _nonIterableSpread as nonIterableSpread, _objectSpread2 as objectSpread2, _regenerator as regenerator, _regeneratorDefine as regeneratorDefine, _regeneratorValues as regeneratorValues, _setPrototypeOf as setPrototypeOf, _slicedToArray as slicedToArray, _toConsumableArray as toConsumableArray, _toPrimitive as toPrimitive, _toPropertyKey as toPropertyKey, _unsupportedIterableToArray as unsupportedIterableToArray };