@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.
- package/dist/bundle/index.js +7782 -6543
- package/dist/cjs/_virtual/_rollupPluginBabelHelpers.js +23 -10
- package/dist/cjs/node_modules/@2112-lab/pathfinder/dist/index.esm.js +1448 -0
- package/dist/cjs/src/animationManager.js +15 -15
- package/dist/cjs/src/componentManager.js +8 -8
- package/dist/cjs/src/disposalManager.js +12 -12
- package/dist/cjs/src/environmentManager.js +392 -99
- package/dist/cjs/src/hotReloadManager.js +26 -26
- package/dist/cjs/src/index.js +19 -66
- package/dist/cjs/src/keyboardControlsManager.js +23 -23
- package/dist/cjs/src/nameUtils.js +21 -21
- package/dist/cjs/src/pathfindingManager.js +311 -129
- package/dist/cjs/src/performanceMonitor.js +52 -52
- package/dist/cjs/src/sceneExportManager.js +23 -23
- package/dist/cjs/src/sceneInitializationManager.js +18 -18
- package/dist/cjs/src/textureConfig.js +469 -40
- package/dist/cjs/src/transformControlsManager.js +79 -79
- package/dist/esm/_virtual/_rollupPluginBabelHelpers.js +21 -10
- package/dist/esm/node_modules/@2112-lab/pathfinder/dist/index.esm.js +1444 -0
- package/dist/esm/src/animationManager.js +15 -15
- package/dist/esm/src/componentManager.js +8 -8
- package/dist/esm/src/disposalManager.js +12 -12
- package/dist/esm/src/environmentManager.js +393 -100
- package/dist/esm/src/hotReloadManager.js +26 -26
- package/dist/esm/src/index.js +19 -66
- package/dist/esm/src/keyboardControlsManager.js +23 -23
- package/dist/esm/src/nameUtils.js +21 -21
- package/dist/esm/src/pathfindingManager.js +313 -129
- package/dist/esm/src/performanceMonitor.js +52 -52
- package/dist/esm/src/sceneExportManager.js +23 -23
- package/dist/esm/src/sceneInitializationManager.js +18 -18
- package/dist/esm/src/textureConfig.js +469 -42
- package/dist/esm/src/transformControlsManager.js +79 -79
- package/dist/index.d.ts +255 -259
- package/package.json +52 -53
- package/dist/cjs/src/ConnectionManager.js +0 -114
- package/dist/cjs/src/Pathfinder.js +0 -88
- package/dist/cjs/src/modelPreloader.js +0 -360
- package/dist/cjs/src/sceneOperationsManager.js +0 -560
- package/dist/esm/src/ConnectionManager.js +0 -110
- package/dist/esm/src/Pathfinder.js +0 -84
- package/dist/esm/src/modelPreloader.js +0 -337
- package/dist/esm/src/sceneOperationsManager.js +0 -536
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.js');
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* Hot-Reload Manager Module
|
|
9
|
-
* Handles development environment hot-reload detection and cleanup
|
|
7
|
+
/**
|
|
8
|
+
* Hot-Reload Manager Module
|
|
9
|
+
* Handles development environment hot-reload detection and cleanup
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
// Check if we're in a browser environment
|
|
@@ -30,8 +30,8 @@ var HotReloadManager = /*#__PURE__*/function () {
|
|
|
30
30
|
this.intervalIds = new Set();
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
/**
|
|
34
|
-
* Setup hot-reload handling for development environment
|
|
33
|
+
/**
|
|
34
|
+
* Setup hot-reload handling for development environment
|
|
35
35
|
*/
|
|
36
36
|
return _rollupPluginBabelHelpers.createClass(HotReloadManager, [{
|
|
37
37
|
key: "setupHotReloadHandling",
|
|
@@ -73,8 +73,8 @@ var HotReloadManager = /*#__PURE__*/function () {
|
|
|
73
73
|
console.log('✅ [Hot-Reload] Hot-reload handling setup completed');
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
/**
|
|
77
|
-
* Cleanup hot-reload handlers (development only)
|
|
76
|
+
/**
|
|
77
|
+
* Cleanup hot-reload handlers (development only)
|
|
78
78
|
*/
|
|
79
79
|
}, {
|
|
80
80
|
key: "cleanupHotReloadHandlers",
|
|
@@ -115,8 +115,8 @@ var HotReloadManager = /*#__PURE__*/function () {
|
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
/**
|
|
119
|
-
* Track a timeout ID for cleanup on component destruction
|
|
118
|
+
/**
|
|
119
|
+
* Track a timeout ID for cleanup on component destruction
|
|
120
120
|
*/
|
|
121
121
|
}, {
|
|
122
122
|
key: "trackTimeout",
|
|
@@ -127,8 +127,8 @@ var HotReloadManager = /*#__PURE__*/function () {
|
|
|
127
127
|
return timeoutId;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
/**
|
|
131
|
-
* Track an interval ID for cleanup on component destruction
|
|
130
|
+
/**
|
|
131
|
+
* Track an interval ID for cleanup on component destruction
|
|
132
132
|
*/
|
|
133
133
|
}, {
|
|
134
134
|
key: "trackInterval",
|
|
@@ -139,8 +139,8 @@ var HotReloadManager = /*#__PURE__*/function () {
|
|
|
139
139
|
return intervalId;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
/**
|
|
143
|
-
* Clear a tracked timeout and remove from tracking
|
|
142
|
+
/**
|
|
143
|
+
* Clear a tracked timeout and remove from tracking
|
|
144
144
|
*/
|
|
145
145
|
}, {
|
|
146
146
|
key: "clearTrackedTimeout",
|
|
@@ -153,8 +153,8 @@ var HotReloadManager = /*#__PURE__*/function () {
|
|
|
153
153
|
return false;
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
/**
|
|
157
|
-
* Clear a tracked interval and remove from tracking
|
|
156
|
+
/**
|
|
157
|
+
* Clear a tracked interval and remove from tracking
|
|
158
158
|
*/
|
|
159
159
|
}, {
|
|
160
160
|
key: "clearTrackedInterval",
|
|
@@ -167,8 +167,8 @@ var HotReloadManager = /*#__PURE__*/function () {
|
|
|
167
167
|
return false;
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
-
/**
|
|
171
|
-
* Clear all tracked timeouts and intervals
|
|
170
|
+
/**
|
|
171
|
+
* Clear all tracked timeouts and intervals
|
|
172
172
|
*/
|
|
173
173
|
}, {
|
|
174
174
|
key: "clearAllTrackedTimers",
|
|
@@ -189,10 +189,10 @@ var HotReloadManager = /*#__PURE__*/function () {
|
|
|
189
189
|
}]);
|
|
190
190
|
}();
|
|
191
191
|
|
|
192
|
-
/**
|
|
193
|
-
* Simple utility to handle hot-reload for componentId
|
|
194
|
-
* @param {string} instanceId - Unique instance identifier for the component
|
|
195
|
-
* @param {Function} cleanupMethod - Method to call to clean up resources
|
|
192
|
+
/**
|
|
193
|
+
* Simple utility to handle hot-reload for componentId
|
|
194
|
+
* @param {string} instanceId - Unique instance identifier for the component
|
|
195
|
+
* @param {Function} cleanupMethod - Method to call to clean up resources
|
|
196
196
|
*/
|
|
197
197
|
function handleHotReload(instanceId, cleanupMethod) {
|
|
198
198
|
if (!isBrowser || !isDev) return;
|
|
@@ -218,16 +218,16 @@ function handleHotReload(instanceId, cleanupMethod) {
|
|
|
218
218
|
});
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
/**
|
|
222
|
-
* Check if we're currently hot-reloading
|
|
221
|
+
/**
|
|
222
|
+
* Check if we're currently hot-reloading
|
|
223
223
|
*/
|
|
224
224
|
function isHotReloading() {
|
|
225
225
|
return isDev && isBrowser && window._hotReloadRegistry && window._hotReloadRegistry.size > 0;
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
-
/**
|
|
229
|
-
* Clean up resources for a component before hot-reload
|
|
230
|
-
* @param {string} instanceId - ID of the component instance to clean up
|
|
228
|
+
/**
|
|
229
|
+
* Clean up resources for a component before hot-reload
|
|
230
|
+
* @param {string} instanceId - ID of the component instance to clean up
|
|
231
231
|
*/
|
|
232
232
|
function cleanupForHotReload(instanceId) {
|
|
233
233
|
if (!isBrowser || !isDev || !window._hotReloadRegistry) return;
|
package/dist/cjs/src/index.js
CHANGED
|
@@ -9,70 +9,33 @@ var disposalManager = require('./disposalManager.js');
|
|
|
9
9
|
var environmentManager = require('./environmentManager.js');
|
|
10
10
|
var hotReloadManager = require('./hotReloadManager.js');
|
|
11
11
|
var keyboardControlsManager = require('./keyboardControlsManager.js');
|
|
12
|
-
var modelPreloader = require('./modelPreloader.js');
|
|
13
12
|
var nameUtils = require('./nameUtils.js');
|
|
14
13
|
var pathfindingManager = require('./pathfindingManager.js');
|
|
15
14
|
var performanceMonitor = require('./performanceMonitor.js');
|
|
16
15
|
var sceneExportManager = require('./sceneExportManager.js');
|
|
17
16
|
var sceneInitializationManager = require('./sceneInitializationManager.js');
|
|
18
|
-
var sceneOperationsManager = require('./sceneOperationsManager.js');
|
|
19
17
|
var textureConfig = require('./textureConfig.js');
|
|
20
18
|
var transformControlsManager = require('./transformControlsManager.js');
|
|
21
|
-
var Pathfinder = require('./Pathfinder.js');
|
|
22
|
-
var ConnectionManager = require('./ConnectionManager.js');
|
|
23
19
|
|
|
24
|
-
|
|
25
|
-
* @module CentralPlant/Utils
|
|
26
|
-
* @description Central Plant Utilities Module
|
|
27
|
-
*
|
|
28
|
-
* This is the main entry point for all utility functions and classes
|
|
29
|
-
* used in the Central Plant application. Import this module to access
|
|
30
|
-
* all utility functions through a single interface.
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* // Import the entire utilities module
|
|
34
|
-
* import CentralPlant from 'central-plant';
|
|
35
|
-
*
|
|
36
|
-
* // Use a specific utility
|
|
37
|
-
* CentralPlant.modelPreloader.preloadAllModels(...);
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* // Import specific modules
|
|
41
|
-
* import { modelPreloader, nameUtils } from 'CentralPlant';
|
|
42
|
-
*
|
|
43
|
-
* // Use them directly
|
|
44
|
-
* modelPreloader.preloadAllModels(...);
|
|
45
|
-
*
|
|
46
|
-
* @example
|
|
47
|
-
* // Import common functions directly
|
|
48
|
-
* import { getHardcodedUuid, logger } from 'CentralPlant';
|
|
49
|
-
*
|
|
50
|
-
* // Use functions directly
|
|
51
|
-
* const uuid = getHardcodedUuid(object);
|
|
52
|
-
* logger.info('Operation completed');
|
|
53
|
-
*/
|
|
20
|
+
// Import all utility modules
|
|
54
21
|
|
|
55
|
-
/**
|
|
56
|
-
* Central API object that provides access to all utility modules
|
|
57
|
-
* @type {Object}
|
|
58
|
-
* @property {Object} animation - Animation management utilities
|
|
59
|
-
* @property {Object} component - Component management utilities
|
|
60
|
-
* @property {Object} debug - Debugging and logging utilities
|
|
61
|
-
* @property {Object} disposal - Resource disposal utilities
|
|
62
|
-
* @property {Object} environment - 3D environment management utilities
|
|
63
|
-
* @property {Object} hotReload - Hot reload handling utilities
|
|
64
|
-
* @property {Object} keyboardControls - Keyboard controls management
|
|
65
|
-
* @property {Object}
|
|
66
|
-
* @property {Object}
|
|
67
|
-
* @property {Object}
|
|
68
|
-
* @property {Object}
|
|
69
|
-
* @property {Object}
|
|
70
|
-
* @property {Object}
|
|
71
|
-
* @property {Object}
|
|
72
|
-
* @property {Object} texture - Texture management utilities
|
|
73
|
-
* @property {Object} transformControls - Transform controls utilities
|
|
74
|
-
* @property {Object} pathfinder - Pathfinder utilities
|
|
75
|
-
* @property {Object} connectionManager - Connection management utilities
|
|
22
|
+
/**
|
|
23
|
+
* Central API object that provides access to all utility modules
|
|
24
|
+
* @type {Object}
|
|
25
|
+
* @property {Object} animation - Animation management utilities
|
|
26
|
+
* @property {Object} component - Component management utilities
|
|
27
|
+
* @property {Object} debug - Debugging and logging utilities
|
|
28
|
+
* @property {Object} disposal - Resource disposal utilities
|
|
29
|
+
* @property {Object} environment - 3D environment management utilities
|
|
30
|
+
* @property {Object} hotReload - Hot reload handling utilities
|
|
31
|
+
* @property {Object} keyboardControls - Keyboard controls management
|
|
32
|
+
* @property {Object} name - Name and UUID management utilities
|
|
33
|
+
* @property {Object} pathfinding - Pathfinding utilities
|
|
34
|
+
* @property {Object} performance - Performance monitoring utilities
|
|
35
|
+
* @property {Object} sceneExport - Scene export utilities
|
|
36
|
+
* @property {Object} sceneInitialization - Scene initialization utilities
|
|
37
|
+
* @property {Object} texture - Texture management utilities
|
|
38
|
+
* @property {Object} transformControls - Transform controls utilities
|
|
76
39
|
*/
|
|
77
40
|
var CentralPlantUtils = {
|
|
78
41
|
animation: animationManager,
|
|
@@ -82,17 +45,13 @@ var CentralPlantUtils = {
|
|
|
82
45
|
environment: environmentManager,
|
|
83
46
|
hotReload: hotReloadManager,
|
|
84
47
|
keyboardControls: keyboardControlsManager,
|
|
85
|
-
modelPreloader: modelPreloader,
|
|
86
48
|
name: nameUtils,
|
|
87
49
|
pathfinding: pathfindingManager,
|
|
88
50
|
performance: performanceMonitor,
|
|
89
51
|
sceneExport: sceneExportManager,
|
|
90
52
|
sceneInitialization: sceneInitializationManager,
|
|
91
|
-
sceneOperations: sceneOperationsManager,
|
|
92
53
|
texture: textureConfig,
|
|
93
|
-
transformControls: transformControlsManager
|
|
94
|
-
pathfinder: Pathfinder,
|
|
95
|
-
connectionManager: ConnectionManager
|
|
54
|
+
transformControls: transformControlsManager
|
|
96
55
|
};
|
|
97
56
|
|
|
98
57
|
exports.animationManager = animationManager;
|
|
@@ -106,21 +65,15 @@ exports.disposalManager = disposalManager;
|
|
|
106
65
|
exports.environmentManager = environmentManager;
|
|
107
66
|
exports.hotReloadManager = hotReloadManager;
|
|
108
67
|
exports.keyboardControlsManager = keyboardControlsManager;
|
|
109
|
-
exports.modelPreloader = modelPreloader;
|
|
110
68
|
exports.findObjectByHardcodedUuid = nameUtils.findObjectByHardcodedUuid;
|
|
111
69
|
exports.generateUuidFromName = nameUtils.generateUuidFromName;
|
|
112
70
|
exports.getHardcodedUuid = nameUtils.getHardcodedUuid;
|
|
113
71
|
exports.nameUtils = nameUtils;
|
|
114
72
|
exports.pathfindingManager = pathfindingManager;
|
|
115
|
-
exports.performanceMonitor = performanceMonitor;
|
|
116
73
|
exports.getSceneExportManager = sceneExportManager.getSceneExportManager;
|
|
117
74
|
exports.sceneExportManager = sceneExportManager;
|
|
118
75
|
exports.sceneInitializationManager = sceneInitializationManager;
|
|
119
|
-
exports.getSceneOperationsManager = sceneOperationsManager.getSceneOperationsManager;
|
|
120
|
-
exports.sceneOperationsManager = sceneOperationsManager;
|
|
121
76
|
exports.textureConfig = textureConfig;
|
|
122
77
|
exports.getTransformControlsManager = transformControlsManager.getTransformControlsManager;
|
|
123
78
|
exports.transformControlsManager = transformControlsManager;
|
|
124
|
-
exports.Pathfinder = Pathfinder;
|
|
125
|
-
exports.ConnectionManager = ConnectionManager;
|
|
126
79
|
exports["default"] = CentralPlantUtils;
|
|
@@ -4,17 +4,17 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var debugLogger = require('./debugLogger.js');
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* Keyboard Controls Manager
|
|
9
|
-
* Manages keyboard shortcuts and controls
|
|
7
|
+
/**
|
|
8
|
+
* Keyboard Controls Manager
|
|
9
|
+
* Manages keyboard shortcuts and controls
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
// Store registered key handlers
|
|
13
13
|
var keyHandlers = new Map();
|
|
14
14
|
var isListening = false;
|
|
15
15
|
|
|
16
|
-
/**
|
|
17
|
-
* Initialize keyboard controls
|
|
16
|
+
/**
|
|
17
|
+
* Initialize keyboard controls
|
|
18
18
|
*/
|
|
19
19
|
function initKeyboardControls() {
|
|
20
20
|
if (typeof window === 'undefined') {
|
|
@@ -32,8 +32,8 @@ function initKeyboardControls() {
|
|
|
32
32
|
debugLogger.logger.info('Keyboard controls initialized');
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
/**
|
|
36
|
-
* Clean up keyboard controls
|
|
35
|
+
/**
|
|
36
|
+
* Clean up keyboard controls
|
|
37
37
|
*/
|
|
38
38
|
function cleanupKeyboardControls() {
|
|
39
39
|
if (typeof window === 'undefined' || !isListening) {
|
|
@@ -46,8 +46,8 @@ function cleanupKeyboardControls() {
|
|
|
46
46
|
debugLogger.logger.info('Keyboard controls cleaned up');
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
/**
|
|
50
|
-
* Handler for keydown events
|
|
49
|
+
/**
|
|
50
|
+
* Handler for keydown events
|
|
51
51
|
*/
|
|
52
52
|
function handleKeyDown(event) {
|
|
53
53
|
// Get key or combination
|
|
@@ -61,8 +61,8 @@ function handleKeyDown(event) {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
/**
|
|
65
|
-
* Handler for keyup events
|
|
64
|
+
/**
|
|
65
|
+
* Handler for keyup events
|
|
66
66
|
*/
|
|
67
67
|
function handleKeyUp(event) {
|
|
68
68
|
var keyCombo = getKeyCombo(event);
|
|
@@ -75,8 +75,8 @@ function handleKeyUp(event) {
|
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
/**
|
|
79
|
-
* Register a key handler
|
|
78
|
+
/**
|
|
79
|
+
* Register a key handler
|
|
80
80
|
*/
|
|
81
81
|
function registerKeyHandler(key, callback) {
|
|
82
82
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
@@ -97,16 +97,16 @@ function registerKeyHandler(key, callback) {
|
|
|
97
97
|
return normalizedKey;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
/**
|
|
101
|
-
* Unregister a key handler
|
|
100
|
+
/**
|
|
101
|
+
* Unregister a key handler
|
|
102
102
|
*/
|
|
103
103
|
function unregisterKeyHandler(key) {
|
|
104
104
|
var normalizedKey = normalizeKey(key);
|
|
105
105
|
return keyHandlers.delete(normalizedKey);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
/**
|
|
109
|
-
* Get all registered key handlers
|
|
108
|
+
/**
|
|
109
|
+
* Get all registered key handlers
|
|
110
110
|
*/
|
|
111
111
|
function getRegisteredKeyHandlers() {
|
|
112
112
|
var handlers = [];
|
|
@@ -119,15 +119,15 @@ function getRegisteredKeyHandlers() {
|
|
|
119
119
|
return handlers;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
/**
|
|
123
|
-
* Helper function to normalize key format
|
|
122
|
+
/**
|
|
123
|
+
* Helper function to normalize key format
|
|
124
124
|
*/
|
|
125
125
|
function normalizeKey(key) {
|
|
126
126
|
return key.toLowerCase();
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
/**
|
|
130
|
-
* Helper function to get key combo string from event
|
|
129
|
+
/**
|
|
130
|
+
* Helper function to get key combo string from event
|
|
131
131
|
*/
|
|
132
132
|
function getKeyCombo(event) {
|
|
133
133
|
var combo = '';
|
|
@@ -139,8 +139,8 @@ function getKeyCombo(event) {
|
|
|
139
139
|
return combo;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
/**
|
|
143
|
-
* Setup common keyboard controls for a Three.js scene
|
|
142
|
+
/**
|
|
143
|
+
* Setup common keyboard controls for a Three.js scene
|
|
144
144
|
*/
|
|
145
145
|
function setupCommonControls(component) {
|
|
146
146
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
/**
|
|
6
|
-
* Name Utilities
|
|
7
|
-
* Common helper functions for name and UUID generation
|
|
5
|
+
/**
|
|
6
|
+
* Name Utilities
|
|
7
|
+
* Common helper functions for name and UUID generation
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
/**
|
|
11
|
-
* Generate UUID from name using consistent transformation rules
|
|
12
|
-
* @param {string} name - The name to convert to UUID
|
|
13
|
-
* @returns {string} The generated UUID
|
|
10
|
+
/**
|
|
11
|
+
* Generate UUID from name using consistent transformation rules
|
|
12
|
+
* @param {string} name - The name to convert to UUID
|
|
13
|
+
* @returns {string} The generated UUID
|
|
14
14
|
*/
|
|
15
15
|
function generateUuidFromName(name) {
|
|
16
16
|
if (!name) return null;
|
|
@@ -25,11 +25,11 @@ function generateUuidFromName(name) {
|
|
|
25
25
|
return uuid;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
/**
|
|
29
|
-
* Check if two names would generate the same UUID
|
|
30
|
-
* @param {string} name1 - First name
|
|
31
|
-
* @param {string} name2 - Second name
|
|
32
|
-
* @returns {boolean} Whether the names generate the same UUID
|
|
28
|
+
/**
|
|
29
|
+
* Check if two names would generate the same UUID
|
|
30
|
+
* @param {string} name1 - First name
|
|
31
|
+
* @param {string} name2 - Second name
|
|
32
|
+
* @returns {boolean} Whether the names generate the same UUID
|
|
33
33
|
*/
|
|
34
34
|
function namesGenerateSameUuid(name1, name2) {
|
|
35
35
|
var uuid1 = generateUuidFromName(name1);
|
|
@@ -37,11 +37,11 @@ function namesGenerateSameUuid(name1, name2) {
|
|
|
37
37
|
return uuid1 && uuid2 && uuid1 === uuid2;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
/**
|
|
41
|
-
* Find an object in a Three.js scene by hardcoded UUID with fallback strategies
|
|
42
|
-
* @param {THREE.Scene} scene - The Three.js scene to search
|
|
43
|
-
* @param {string} targetUuid - The UUID to search for
|
|
44
|
-
* @returns {THREE.Object3D|null} The found object or null
|
|
40
|
+
/**
|
|
41
|
+
* Find an object in a Three.js scene by hardcoded UUID with fallback strategies
|
|
42
|
+
* @param {THREE.Scene} scene - The Three.js scene to search
|
|
43
|
+
* @param {string} targetUuid - The UUID to search for
|
|
44
|
+
* @returns {THREE.Object3D|null} The found object or null
|
|
45
45
|
*/
|
|
46
46
|
function findObjectByHardcodedUuid(scene, targetUuid) {
|
|
47
47
|
if (!scene || !targetUuid) return null;
|
|
@@ -74,10 +74,10 @@ function findObjectByHardcodedUuid(scene, targetUuid) {
|
|
|
74
74
|
return foundObject;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
/**
|
|
78
|
-
* Get the hardcoded UUID for an object, prioritizing original over current
|
|
79
|
-
* @param {THREE.Object3D} object - The Three.js object
|
|
80
|
-
* @returns {string|null} The hardcoded UUID or null
|
|
77
|
+
/**
|
|
78
|
+
* Get the hardcoded UUID for an object, prioritizing original over current
|
|
79
|
+
* @param {THREE.Object3D} object - The Three.js object
|
|
80
|
+
* @returns {string|null} The hardcoded UUID or null
|
|
81
81
|
*/
|
|
82
82
|
function getHardcodedUuid(object) {
|
|
83
83
|
var _object$userData;
|