@2112-lab/central-plant 0.3.54 â 0.3.56
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 +26 -14
- package/dist/cjs/src/core/centralPlant.js +1 -1
- package/dist/cjs/src/core/sceneViewer.js +6 -2
- package/dist/cjs/src/managers/scene/sceneOperationsManager.js +19 -11
- package/dist/esm/src/core/centralPlant.js +1 -1
- package/dist/esm/src/core/sceneViewer.js +6 -2
- package/dist/esm/src/managers/scene/sceneOperationsManager.js +19 -11
- package/package.json +2 -2
package/dist/bundle/index.js
CHANGED
|
@@ -34899,31 +34899,39 @@ var SceneOperationsManager = /*#__PURE__*/function () {
|
|
|
34899
34899
|
component = this.sceneViewer;
|
|
34900
34900
|
_context8.p = 1;
|
|
34901
34901
|
defaultCentralPlantUrl = process.env.DEFAULT_CENTRAL_PLANT_URL;
|
|
34902
|
-
|
|
34903
|
-
|
|
34902
|
+
console.log('đ [SceneOperations] Attempting loadScene with URL:', defaultCentralPlantUrl);
|
|
34903
|
+
if (defaultCentralPlantUrl) {
|
|
34904
|
+
_context8.n = 2;
|
|
34905
|
+
break;
|
|
34906
|
+
}
|
|
34907
|
+
console.log('âšī¸ [SceneOperations] No default scene URL provided, skipping automatic load');
|
|
34908
|
+
return _context8.a(2);
|
|
34904
34909
|
case 2:
|
|
34905
|
-
response = _context8.v;
|
|
34906
34910
|
_context8.n = 3;
|
|
34907
|
-
return
|
|
34911
|
+
return fetch(defaultCentralPlantUrl);
|
|
34908
34912
|
case 3:
|
|
34913
|
+
response = _context8.v;
|
|
34914
|
+
_context8.n = 4;
|
|
34915
|
+
return response.json();
|
|
34916
|
+
case 4:
|
|
34909
34917
|
data = _context8.v;
|
|
34910
34918
|
// Store current scene data even for default scene
|
|
34911
34919
|
component.currentSceneData = data;
|
|
34912
34920
|
|
|
34913
34921
|
// Use the consolidated scene loading function (treat as imported to ensure consistent behavior)
|
|
34914
|
-
_context8.n =
|
|
34922
|
+
_context8.n = 5;
|
|
34915
34923
|
return this.loadSceneFromData(data);
|
|
34916
|
-
case 4:
|
|
34917
|
-
_context8.n = 6;
|
|
34918
|
-
break;
|
|
34919
34924
|
case 5:
|
|
34920
|
-
_context8.
|
|
34925
|
+
_context8.n = 7;
|
|
34926
|
+
break;
|
|
34927
|
+
case 6:
|
|
34928
|
+
_context8.p = 6;
|
|
34921
34929
|
_t4 = _context8.v;
|
|
34922
34930
|
console.error('Error loading default scene:', _t4);
|
|
34923
|
-
case
|
|
34931
|
+
case 7:
|
|
34924
34932
|
return _context8.a(2);
|
|
34925
34933
|
}
|
|
34926
|
-
}, _callee8, this, [[1,
|
|
34934
|
+
}, _callee8, this, [[1, 6]]);
|
|
34927
34935
|
}));
|
|
34928
34936
|
function loadScene() {
|
|
34929
34937
|
return _loadScene.apply(this, arguments);
|
|
@@ -41815,7 +41823,7 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
|
|
|
41815
41823
|
* Initialize the CentralPlant manager
|
|
41816
41824
|
*
|
|
41817
41825
|
* @constructor
|
|
41818
|
-
* @version 0.3.
|
|
41826
|
+
* @version 0.3.56
|
|
41819
41827
|
* @updated 2025-10-22
|
|
41820
41828
|
*
|
|
41821
41829
|
* @description Creates a new CentralPlant instance and initializes internal managers and utilities.
|
|
@@ -45047,7 +45055,7 @@ var sceneViewer = /*#__PURE__*/function (_BaseDisposable) {
|
|
|
45047
45055
|
key: "initializeScene",
|
|
45048
45056
|
value: (function () {
|
|
45049
45057
|
var _initializeScene = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
|
|
45050
|
-
var initStart, phase1Start, phase1Time, phase2Start, parallelInitPromises, phase2Time, phase3Start, sceneSetupPromises, phase3Time, phase4Start, phase4Time, phase5Start, phase5Time, initTime, _t2;
|
|
45058
|
+
var initStart, phase1Start, phase1Time, phase2Start, parallelInitPromises, phase2Time, phase3Start, skipDefaultLoad, sceneSetupPromises, phase3Time, phase4Start, phase4Time, phase5Start, phase5Time, initTime, _t2;
|
|
45051
45059
|
return _regenerator().w(function (_context2) {
|
|
45052
45060
|
while (1) switch (_context2.n) {
|
|
45053
45061
|
case 0:
|
|
@@ -45095,7 +45103,11 @@ var sceneViewer = /*#__PURE__*/function (_BaseDisposable) {
|
|
|
45095
45103
|
// Phase 3: Scene loading and transform setup (can be parallelized)
|
|
45096
45104
|
phase3Start = performance.now();
|
|
45097
45105
|
console.log('đ Phase 3: Scene loading and transform setup...');
|
|
45098
|
-
|
|
45106
|
+
|
|
45107
|
+
// Explicitly check if we should skip the default load
|
|
45108
|
+
skipDefaultLoad = process.env.SKIP_DEFAULT_LOAD === 'true';
|
|
45109
|
+
console.log("\uD83D\uDD0D [SceneViewer] skipDefaultLoad: ".concat(skipDefaultLoad));
|
|
45110
|
+
sceneSetupPromises = [skipDefaultLoad ? Promise.resolve() : this.loadScene().catch(function (error) {
|
|
45099
45111
|
console.error('â Scene loading failed:', error);
|
|
45100
45112
|
throw error;
|
|
45101
45113
|
}), this.setupTransformControls().catch(function (error) {
|
|
@@ -58,7 +58,7 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
|
|
|
58
58
|
* Initialize the CentralPlant manager
|
|
59
59
|
*
|
|
60
60
|
* @constructor
|
|
61
|
-
* @version 0.3.
|
|
61
|
+
* @version 0.3.56
|
|
62
62
|
* @updated 2025-10-22
|
|
63
63
|
*
|
|
64
64
|
* @description Creates a new CentralPlant instance and initializes internal managers and utilities.
|
|
@@ -138,7 +138,7 @@ var sceneViewer = /*#__PURE__*/function (_BaseDisposable) {
|
|
|
138
138
|
key: "initializeScene",
|
|
139
139
|
value: (function () {
|
|
140
140
|
var _initializeScene = _rollupPluginBabelHelpers.asyncToGenerator(/*#__PURE__*/_rollupPluginBabelHelpers.regenerator().m(function _callee2() {
|
|
141
|
-
var initStart, phase1Start, phase1Time, phase2Start, parallelInitPromises, phase2Time, phase3Start, sceneSetupPromises, phase3Time, phase4Start, phase4Time, phase5Start, phase5Time, initTime, _t2;
|
|
141
|
+
var initStart, phase1Start, phase1Time, phase2Start, parallelInitPromises, phase2Time, phase3Start, skipDefaultLoad, sceneSetupPromises, phase3Time, phase4Start, phase4Time, phase5Start, phase5Time, initTime, _t2;
|
|
142
142
|
return _rollupPluginBabelHelpers.regenerator().w(function (_context2) {
|
|
143
143
|
while (1) switch (_context2.n) {
|
|
144
144
|
case 0:
|
|
@@ -186,7 +186,11 @@ var sceneViewer = /*#__PURE__*/function (_BaseDisposable) {
|
|
|
186
186
|
// Phase 3: Scene loading and transform setup (can be parallelized)
|
|
187
187
|
phase3Start = performance.now();
|
|
188
188
|
console.log('đ Phase 3: Scene loading and transform setup...');
|
|
189
|
-
|
|
189
|
+
|
|
190
|
+
// Explicitly check if we should skip the default load
|
|
191
|
+
skipDefaultLoad = process.env.SKIP_DEFAULT_LOAD === 'true';
|
|
192
|
+
console.log("\uD83D\uDD0D [SceneViewer] skipDefaultLoad: ".concat(skipDefaultLoad));
|
|
193
|
+
sceneSetupPromises = [skipDefaultLoad ? Promise.resolve() : this.loadScene().catch(function (error) {
|
|
190
194
|
console.error('â Scene loading failed:', error);
|
|
191
195
|
throw error;
|
|
192
196
|
}), this.setupTransformControls().catch(function (error) {
|
|
@@ -1194,31 +1194,39 @@ var SceneOperationsManager = /*#__PURE__*/function () {
|
|
|
1194
1194
|
component = this.sceneViewer;
|
|
1195
1195
|
_context8.p = 1;
|
|
1196
1196
|
defaultCentralPlantUrl = process.env.DEFAULT_CENTRAL_PLANT_URL;
|
|
1197
|
-
|
|
1198
|
-
|
|
1197
|
+
console.log('đ [SceneOperations] Attempting loadScene with URL:', defaultCentralPlantUrl);
|
|
1198
|
+
if (defaultCentralPlantUrl) {
|
|
1199
|
+
_context8.n = 2;
|
|
1200
|
+
break;
|
|
1201
|
+
}
|
|
1202
|
+
console.log('âšī¸ [SceneOperations] No default scene URL provided, skipping automatic load');
|
|
1203
|
+
return _context8.a(2);
|
|
1199
1204
|
case 2:
|
|
1200
|
-
response = _context8.v;
|
|
1201
1205
|
_context8.n = 3;
|
|
1202
|
-
return
|
|
1206
|
+
return fetch(defaultCentralPlantUrl);
|
|
1203
1207
|
case 3:
|
|
1208
|
+
response = _context8.v;
|
|
1209
|
+
_context8.n = 4;
|
|
1210
|
+
return response.json();
|
|
1211
|
+
case 4:
|
|
1204
1212
|
data = _context8.v;
|
|
1205
1213
|
// Store current scene data even for default scene
|
|
1206
1214
|
component.currentSceneData = data;
|
|
1207
1215
|
|
|
1208
1216
|
// Use the consolidated scene loading function (treat as imported to ensure consistent behavior)
|
|
1209
|
-
_context8.n =
|
|
1217
|
+
_context8.n = 5;
|
|
1210
1218
|
return this.loadSceneFromData(data);
|
|
1211
|
-
case 4:
|
|
1212
|
-
_context8.n = 6;
|
|
1213
|
-
break;
|
|
1214
1219
|
case 5:
|
|
1215
|
-
_context8.
|
|
1220
|
+
_context8.n = 7;
|
|
1221
|
+
break;
|
|
1222
|
+
case 6:
|
|
1223
|
+
_context8.p = 6;
|
|
1216
1224
|
_t4 = _context8.v;
|
|
1217
1225
|
console.error('Error loading default scene:', _t4);
|
|
1218
|
-
case
|
|
1226
|
+
case 7:
|
|
1219
1227
|
return _context8.a(2);
|
|
1220
1228
|
}
|
|
1221
|
-
}, _callee8, this, [[1,
|
|
1229
|
+
}, _callee8, this, [[1, 6]]);
|
|
1222
1230
|
}));
|
|
1223
1231
|
function loadScene() {
|
|
1224
1232
|
return _loadScene.apply(this, arguments);
|
|
@@ -34,7 +34,7 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
|
|
|
34
34
|
* Initialize the CentralPlant manager
|
|
35
35
|
*
|
|
36
36
|
* @constructor
|
|
37
|
-
* @version 0.3.
|
|
37
|
+
* @version 0.3.56
|
|
38
38
|
* @updated 2025-10-22
|
|
39
39
|
*
|
|
40
40
|
* @description Creates a new CentralPlant instance and initializes internal managers and utilities.
|
|
@@ -134,7 +134,7 @@ var sceneViewer = /*#__PURE__*/function (_BaseDisposable) {
|
|
|
134
134
|
key: "initializeScene",
|
|
135
135
|
value: (function () {
|
|
136
136
|
var _initializeScene = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
|
|
137
|
-
var initStart, phase1Start, phase1Time, phase2Start, parallelInitPromises, phase2Time, phase3Start, sceneSetupPromises, phase3Time, phase4Start, phase4Time, phase5Start, phase5Time, initTime, _t2;
|
|
137
|
+
var initStart, phase1Start, phase1Time, phase2Start, parallelInitPromises, phase2Time, phase3Start, skipDefaultLoad, sceneSetupPromises, phase3Time, phase4Start, phase4Time, phase5Start, phase5Time, initTime, _t2;
|
|
138
138
|
return _regenerator().w(function (_context2) {
|
|
139
139
|
while (1) switch (_context2.n) {
|
|
140
140
|
case 0:
|
|
@@ -182,7 +182,11 @@ var sceneViewer = /*#__PURE__*/function (_BaseDisposable) {
|
|
|
182
182
|
// Phase 3: Scene loading and transform setup (can be parallelized)
|
|
183
183
|
phase3Start = performance.now();
|
|
184
184
|
console.log('đ Phase 3: Scene loading and transform setup...');
|
|
185
|
-
|
|
185
|
+
|
|
186
|
+
// Explicitly check if we should skip the default load
|
|
187
|
+
skipDefaultLoad = process.env.SKIP_DEFAULT_LOAD === 'true';
|
|
188
|
+
console.log("\uD83D\uDD0D [SceneViewer] skipDefaultLoad: ".concat(skipDefaultLoad));
|
|
189
|
+
sceneSetupPromises = [skipDefaultLoad ? Promise.resolve() : this.loadScene().catch(function (error) {
|
|
186
190
|
console.error('â Scene loading failed:', error);
|
|
187
191
|
throw error;
|
|
188
192
|
}), this.setupTransformControls().catch(function (error) {
|
|
@@ -1170,31 +1170,39 @@ var SceneOperationsManager = /*#__PURE__*/function () {
|
|
|
1170
1170
|
component = this.sceneViewer;
|
|
1171
1171
|
_context8.p = 1;
|
|
1172
1172
|
defaultCentralPlantUrl = process.env.DEFAULT_CENTRAL_PLANT_URL;
|
|
1173
|
-
|
|
1174
|
-
|
|
1173
|
+
console.log('đ [SceneOperations] Attempting loadScene with URL:', defaultCentralPlantUrl);
|
|
1174
|
+
if (defaultCentralPlantUrl) {
|
|
1175
|
+
_context8.n = 2;
|
|
1176
|
+
break;
|
|
1177
|
+
}
|
|
1178
|
+
console.log('âšī¸ [SceneOperations] No default scene URL provided, skipping automatic load');
|
|
1179
|
+
return _context8.a(2);
|
|
1175
1180
|
case 2:
|
|
1176
|
-
response = _context8.v;
|
|
1177
1181
|
_context8.n = 3;
|
|
1178
|
-
return
|
|
1182
|
+
return fetch(defaultCentralPlantUrl);
|
|
1179
1183
|
case 3:
|
|
1184
|
+
response = _context8.v;
|
|
1185
|
+
_context8.n = 4;
|
|
1186
|
+
return response.json();
|
|
1187
|
+
case 4:
|
|
1180
1188
|
data = _context8.v;
|
|
1181
1189
|
// Store current scene data even for default scene
|
|
1182
1190
|
component.currentSceneData = data;
|
|
1183
1191
|
|
|
1184
1192
|
// Use the consolidated scene loading function (treat as imported to ensure consistent behavior)
|
|
1185
|
-
_context8.n =
|
|
1193
|
+
_context8.n = 5;
|
|
1186
1194
|
return this.loadSceneFromData(data);
|
|
1187
|
-
case 4:
|
|
1188
|
-
_context8.n = 6;
|
|
1189
|
-
break;
|
|
1190
1195
|
case 5:
|
|
1191
|
-
_context8.
|
|
1196
|
+
_context8.n = 7;
|
|
1197
|
+
break;
|
|
1198
|
+
case 6:
|
|
1199
|
+
_context8.p = 6;
|
|
1192
1200
|
_t4 = _context8.v;
|
|
1193
1201
|
console.error('Error loading default scene:', _t4);
|
|
1194
|
-
case
|
|
1202
|
+
case 7:
|
|
1195
1203
|
return _context8.a(2);
|
|
1196
1204
|
}
|
|
1197
|
-
}, _callee8, this, [[1,
|
|
1205
|
+
}, _callee8, this, [[1, 6]]);
|
|
1198
1206
|
}));
|
|
1199
1207
|
function loadScene() {
|
|
1200
1208
|
return _loadScene.apply(this, arguments);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@2112-lab/central-plant",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.56",
|
|
4
4
|
"description": "Utility modules for the Central Plant Application",
|
|
5
5
|
"main": "dist/bundle/index.js",
|
|
6
6
|
"module": "dist/esm/src/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"author": "CentralPlant Team",
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@2112-lab/pathfinder": "
|
|
34
|
+
"@2112-lab/pathfinder": "^1.0.40",
|
|
35
35
|
"stats.js": "^0.17.0",
|
|
36
36
|
"three": "^0.177.0"
|
|
37
37
|
},
|