@2112-lab/central-plant 0.2.5 → 0.2.10

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.
@@ -9,6 +9,22 @@ var DisposalUtilities = require('../utils/DisposalUtilities.js');
9
9
  var centralPlantInternals = require('./centralPlantInternals.js');
10
10
  require('../rendering/modelPreloader.js');
11
11
 
12
+ // ─────────────────────────────────────────────────────────────────────────────
13
+ // Flow-direction compatibility helper (module-level, no class dependency)
14
+ // ─────────────────────────────────────────────────────────────────────────────
15
+
16
+ /**
17
+ * Returns true if the two flow directions are compatible for a connection.
18
+ * @param {string} fromFlow - 'in' | 'out' | 'bi'
19
+ * @param {string} toFlow - 'in' | 'out' | 'bi'
20
+ * @returns {boolean}
21
+ */
22
+ function _areFlowsCompatible(fromFlow, toFlow) {
23
+ if (fromFlow === 'bi' || toFlow === 'bi') return true;
24
+ // in ↔ out are compatible; in → in and out → out are not
25
+ return fromFlow !== toFlow;
26
+ }
27
+
12
28
  /**
13
29
  * CentralPlant class that manages all scene utility instances and provides public API
14
30
  *
@@ -19,7 +35,7 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
19
35
  * Initialize the CentralPlant manager
20
36
  *
21
37
  * @constructor
22
- * @version 0.2.5
38
+ * @version 0.2.10
23
39
  * @updated 2025-10-22
24
40
  *
25
41
  * @description Creates a new CentralPlant instance and initializes internal managers and utilities.
@@ -952,6 +968,107 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
952
968
  return availableConnectorIds;
953
969
  }
954
970
 
971
+ /**
972
+ * Get available connectors with their flow direction metadata.
973
+ * Same filtering logic as getAvailableConnections() but returns objects instead of strings.
974
+ * @returns {Array<{id: string, flow: string}>} Array of connector info objects.
975
+ * flow is one of 'in', 'out', 'bi'. Defaults to 'bi' if not set in userData.
976
+ * @example
977
+ * const infos = centralPlant.getAvailableConnectionsInfo()
978
+ * // [{ id: 'PUMP-1-CONNECTOR-1', flow: 'out' }, ...]
979
+ */
980
+ }, {
981
+ key: "getAvailableConnectionsInfo",
982
+ value: function getAvailableConnectionsInfo() {
983
+ if (!this.sceneViewer || !this.sceneViewer.currentSceneData) {
984
+ console.warn('⚠️ getAvailableConnectionsInfo(): Scene viewer or current scene data not available');
985
+ return [];
986
+ }
987
+ var sceneData = this.sceneViewer.currentSceneData;
988
+ if (!sceneData.scene || !sceneData.scene.children) {
989
+ console.warn('⚠️ getAvailableConnectionsInfo(): Invalid scene data structure');
990
+ return [];
991
+ }
992
+ var allConnectorInfos = [];
993
+ sceneData.scene.children.forEach(function (component) {
994
+ if (component.children && Array.isArray(component.children)) {
995
+ component.children.forEach(function (child) {
996
+ if (child.userData && child.userData.objectType === 'connector' && child.uuid) {
997
+ allConnectorInfos.push({
998
+ id: child.uuid,
999
+ flow: child.userData.flow || 'bi'
1000
+ });
1001
+ }
1002
+ });
1003
+ }
1004
+ });
1005
+ var existingConnections = this.getConnections();
1006
+ var usedConnectorIds = new Set();
1007
+ existingConnections.forEach(function (connection) {
1008
+ if (connection.from) usedConnectorIds.add(connection.from);
1009
+ if (connection.to) usedConnectorIds.add(connection.to);
1010
+ });
1011
+ return allConnectorInfos.filter(function (info) {
1012
+ return !usedConnectorIds.has(info.id);
1013
+ });
1014
+ }
1015
+
1016
+ /**
1017
+ * Validate all connections in the current scene for flow direction compatibility.
1018
+ * @returns {{ valid: Array<Object>, invalid: Array<{connection: Object, reason: string}> }}
1019
+ * @example
1020
+ * const result = centralPlant.validateConnections()
1021
+ * result.invalid.forEach(({ connection, reason }) => console.warn(reason, connection))
1022
+ */
1023
+ }, {
1024
+ key: "validateConnections",
1025
+ value: function validateConnections() {
1026
+ if (!this.sceneViewer || !this.sceneViewer.currentSceneData) {
1027
+ console.warn('⚠️ validateConnections(): Scene viewer or current scene data not available');
1028
+ return {
1029
+ valid: [],
1030
+ invalid: []
1031
+ };
1032
+ }
1033
+ var connections = this.getConnections();
1034
+ var sceneData = this.sceneViewer.currentSceneData;
1035
+
1036
+ // Build lookup map: connectorId → flow
1037
+ var flowMap = {};
1038
+ var scene = sceneData.scene || {};
1039
+ var children = scene.children || [];
1040
+ children.forEach(function (component) {
1041
+ if (component.children && Array.isArray(component.children)) {
1042
+ component.children.forEach(function (child) {
1043
+ if (child.userData && child.userData.objectType === 'connector' && child.uuid) {
1044
+ flowMap[child.uuid] = child.userData.flow || 'bi';
1045
+ }
1046
+ });
1047
+ }
1048
+ });
1049
+ var valid = [];
1050
+ var invalid = [];
1051
+ connections.forEach(function (connection) {
1052
+ var fromFlow = flowMap[connection.from] || 'bi';
1053
+ var toFlow = flowMap[connection.to] || 'bi';
1054
+ if (_areFlowsCompatible(fromFlow, toFlow)) {
1055
+ valid.push(connection);
1056
+ } else {
1057
+ var reason = "Incompatible flow directions: connector '".concat(connection.from, "' is '").concat(fromFlow, "' and connector '").concat(connection.to, "' is '").concat(toFlow, "' \u2014 ").concat(fromFlow, " \u2192 ").concat(toFlow, " is not allowed");
1058
+ console.warn("\u26A0\uFE0F validateConnections(): ".concat(reason));
1059
+ invalid.push({
1060
+ connection: connection,
1061
+ reason: reason
1062
+ });
1063
+ }
1064
+ });
1065
+ console.log("\u2705 validateConnections(): ".concat(valid.length, " valid, ").concat(invalid.length, " invalid connections"));
1066
+ return {
1067
+ valid: valid,
1068
+ invalid: invalid
1069
+ };
1070
+ }
1071
+
955
1072
  // ─────────────────────────────────────────────────────────────────────────
956
1073
  // BEHAVIORS API
957
1074
  // ─────────────────────────────────────────────────────────────────────────
@@ -18,6 +18,7 @@ var sceneInitializationManager = require('../managers/scene/sceneInitializationM
18
18
  var environmentManager = require('../managers/environment/environmentManager.js');
19
19
  var keyboardControlsManager = require('../managers/controls/keyboardControlsManager.js');
20
20
  var pathfindingManager = require('../managers/pathfinding/pathfindingManager.js');
21
+ var PathFlowManager = require('../managers/pathfinding/PathFlowManager.js');
21
22
  var BehaviorManager = require('../managers/behaviors/BehaviorManager.js');
22
23
  var sceneOperationsManager = require('../managers/scene/sceneOperationsManager.js');
23
24
  var animationManager = require('../managers/scene/animationManager.js');
@@ -50,6 +51,59 @@ function _interopNamespace(e) {
50
51
 
51
52
  var THREE__namespace = /*#__PURE__*/_interopNamespace(THREE);
52
53
 
54
+ // ─────────────────────────────────────────────────────────────────────────────
55
+ // Flow-direction helpers (module-level)
56
+ // ─────────────────────────────────────────────────────────────────────────────
57
+
58
+ /**
59
+ * Returns the flow direction of a connector from the current scene data.
60
+ * @param {Object} sceneData - currentSceneData object
61
+ * @param {string} connectorId
62
+ * @returns {'in'|'out'|'bi'} Defaults to 'bi' if not set.
63
+ */
64
+ function _getConnectorFlow(sceneData, connectorId) {
65
+ var _sceneData$scene;
66
+ var children = (sceneData === null || sceneData === void 0 || (_sceneData$scene = sceneData.scene) === null || _sceneData$scene === void 0 ? void 0 : _sceneData$scene.children) || [];
67
+ var _iterator = _rollupPluginBabelHelpers.createForOfIteratorHelper(children),
68
+ _step;
69
+ try {
70
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
71
+ var component = _step.value;
72
+ var _iterator2 = _rollupPluginBabelHelpers.createForOfIteratorHelper(component.children || []),
73
+ _step2;
74
+ try {
75
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
76
+ var _child$userData;
77
+ var child = _step2.value;
78
+ if (((_child$userData = child.userData) === null || _child$userData === void 0 ? void 0 : _child$userData.objectType) === 'connector' && child.uuid === connectorId) {
79
+ return child.userData.flow || 'bi';
80
+ }
81
+ }
82
+ } catch (err) {
83
+ _iterator2.e(err);
84
+ } finally {
85
+ _iterator2.f();
86
+ }
87
+ }
88
+ } catch (err) {
89
+ _iterator.e(err);
90
+ } finally {
91
+ _iterator.f();
92
+ }
93
+ return 'bi';
94
+ }
95
+
96
+ /**
97
+ * Returns true if fromFlow → toFlow is a valid connection.
98
+ * @param {'in'|'out'|'bi'} fromFlow
99
+ * @param {'in'|'out'|'bi'} toFlow
100
+ * @returns {boolean}
101
+ */
102
+ function _areFlowsCompatible(fromFlow, toFlow) {
103
+ if (fromFlow === 'bi' || toFlow === 'bi') return true;
104
+ return fromFlow !== toFlow;
105
+ }
106
+
53
107
  /**
54
108
  * CentralPlantInternals class containing internal methods and functionality
55
109
  */
@@ -111,6 +165,7 @@ var CentralPlantInternals = /*#__PURE__*/function () {
111
165
  this.centralPlant.managers.environmentManager = new environmentManager.EnvironmentManager(this.centralPlant.sceneViewer);
112
166
  this.centralPlant.managers.keyboardControlsManager = new keyboardControlsManager.KeyboardControlsManager(this.centralPlant.sceneViewer);
113
167
  this.centralPlant.managers.pathfindingManager = new pathfindingManager.PathfindingManager(this.centralPlant.sceneViewer);
168
+ this.centralPlant.managers.pathFlowManager = new PathFlowManager.PathFlowManager(this.centralPlant.sceneViewer);
114
169
  this.centralPlant.managers.behaviorManager = new BehaviorManager.BehaviorManager(this.centralPlant.sceneViewer);
115
170
  this.centralPlant.managers.sceneOperationsManager = new sceneOperationsManager.SceneOperationsManager(this.centralPlant.sceneViewer);
116
171
  this.centralPlant.managers.animationManager = new animationManager.AnimationManager(this.centralPlant.sceneViewer);
@@ -501,12 +556,12 @@ var CentralPlantInternals = /*#__PURE__*/function () {
501
556
  console.log("\uD83D\uDD27 Translating ".concat(selectedObjects.length, " selected object(s) on ").concat(axis, " axis by ").concat(value));
502
557
 
503
558
  // Translate each selected object using the appropriate method
504
- var _iterator = _rollupPluginBabelHelpers.createForOfIteratorHelper(selectedObjects),
505
- _step;
559
+ var _iterator3 = _rollupPluginBabelHelpers.createForOfIteratorHelper(selectedObjects),
560
+ _step3;
506
561
  try {
507
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
562
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
508
563
  var _obj$userData;
509
- var obj = _step.value;
564
+ var obj = _step3.value;
510
565
  var objectType = (_obj$userData = obj.userData) === null || _obj$userData === void 0 ? void 0 : _obj$userData.objectType;
511
566
  var objectId = obj.uuid;
512
567
  var success = false;
@@ -533,9 +588,9 @@ var CentralPlantInternals = /*#__PURE__*/function () {
533
588
  }
534
589
  }
535
590
  } catch (err) {
536
- _iterator.e(err);
591
+ _iterator3.e(err);
537
592
  } finally {
538
- _iterator.f();
593
+ _iterator3.f();
539
594
  }
540
595
  result.success = result.translatedCount === result.totalCount;
541
596
  if (result.success) {
@@ -719,7 +774,7 @@ var CentralPlantInternals = /*#__PURE__*/function () {
719
774
  }, {
720
775
  key: "addConnection",
721
776
  value: function addConnection(fromConnectorId, toConnectorId) {
722
- var _this$centralPlant$sc4;
777
+ var _this$centralPlant$sc4, _this$centralPlant$sc5;
723
778
  // Use centralized validation for connection parameters
724
779
  var existingConnections = ((_this$centralPlant$sc4 = this.centralPlant.sceneViewer) === null || _this$centralPlant$sc4 === void 0 || (_this$centralPlant$sc4 = _this$centralPlant$sc4.currentSceneData) === null || _this$centralPlant$sc4 === void 0 ? void 0 : _this$centralPlant$sc4.connections) || [];
725
780
  var validation = this.validator.validateConnectionParams(fromConnectorId, toConnectorId, existingConnections);
@@ -727,6 +782,17 @@ var CentralPlantInternals = /*#__PURE__*/function () {
727
782
  return false; // Validator already logged the error
728
783
  }
729
784
 
785
+ // Validate flow direction compatibility
786
+ var sceneData = (_this$centralPlant$sc5 = this.centralPlant.sceneViewer) === null || _this$centralPlant$sc5 === void 0 ? void 0 : _this$centralPlant$sc5.currentSceneData;
787
+ if (sceneData) {
788
+ var fromFlow = _getConnectorFlow(sceneData, fromConnectorId);
789
+ var toFlow = _getConnectorFlow(sceneData, toConnectorId);
790
+ if (!_areFlowsCompatible(fromFlow, toFlow)) {
791
+ console.error("\u274C addConnection(): Incompatible flow directions \u2014 '".concat(fromConnectorId, "' is '").concat(fromFlow, "' and '").concat(toConnectorId, "' is '").concat(toFlow, "'. ") + "'".concat(fromFlow, "' \u2192 '").concat(toFlow, "' connections are not allowed."));
792
+ return false;
793
+ }
794
+ }
795
+
730
796
  // Validate scene availability
731
797
  var sceneValidation = this.validator.validateSceneViewer(this.centralPlant.sceneViewer);
732
798
  if (!sceneValidation.isValid) {
@@ -847,7 +913,7 @@ var CentralPlantInternals = /*#__PURE__*/function () {
847
913
  }, {
848
914
  key: "addComponent",
849
915
  value: function addComponent(libraryId) {
850
- var _this$centralPlant$sc5;
916
+ var _this$centralPlant$sc6;
851
917
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
852
918
  // Use centralized validation for component addition parameters
853
919
  var existingIds = this.getComponentIds();
@@ -857,7 +923,7 @@ var CentralPlantInternals = /*#__PURE__*/function () {
857
923
  }
858
924
 
859
925
  // Validate scene availability
860
- var sceneValidation = this.validator.validateSceneViewer(this.centralPlant.sceneViewer, (_this$centralPlant$sc5 = this.centralPlant.sceneViewer) === null || _this$centralPlant$sc5 === void 0 ? void 0 : _this$centralPlant$sc5.scene);
926
+ var sceneValidation = this.validator.validateSceneViewer(this.centralPlant.sceneViewer, (_this$centralPlant$sc6 = this.centralPlant.sceneViewer) === null || _this$centralPlant$sc6 === void 0 ? void 0 : _this$centralPlant$sc6.scene);
861
927
  if (!sceneValidation.isValid) {
862
928
  return false;
863
929
  }
@@ -876,7 +942,7 @@ var CentralPlantInternals = /*#__PURE__*/function () {
876
942
  return false;
877
943
  }
878
944
  try {
879
- var _componentData$childr, _componentData$childr2, _this$centralPlant$sc6, _componentData$childr3, _componentData$defaul;
945
+ var _componentData$childr, _componentData$childr2, _this$centralPlant$sc7, _componentData$childr3, _componentData$defaul;
880
946
  // Generate a unique component ID if not provided
881
947
  var componentId = options.customId || this.generateUniqueComponentId(libraryId);
882
948
 
@@ -988,7 +1054,7 @@ var CentralPlantInternals = /*#__PURE__*/function () {
988
1054
  componentModel.updateMatrixWorld(true);
989
1055
 
990
1056
  // Check if component is underground and fix if needed (based on settings)
991
- var checkUnderground = (_this$centralPlant$sc6 = this.centralPlant.sceneViewer) === null || _this$centralPlant$sc6 === void 0 || (_this$centralPlant$sc6 = _this$centralPlant$sc6.managers) === null || _this$centralPlant$sc6 === void 0 || (_this$centralPlant$sc6 = _this$centralPlant$sc6.settingsManager) === null || _this$centralPlant$sc6 === void 0 ? void 0 : _this$centralPlant$sc6.getSetting('scene', 'checkUnderground');
1057
+ var checkUnderground = (_this$centralPlant$sc7 = this.centralPlant.sceneViewer) === null || _this$centralPlant$sc7 === void 0 || (_this$centralPlant$sc7 = _this$centralPlant$sc7.managers) === null || _this$centralPlant$sc7 === void 0 || (_this$centralPlant$sc7 = _this$centralPlant$sc7.settingsManager) === null || _this$centralPlant$sc7 === void 0 ? void 0 : _this$centralPlant$sc7.getSetting('scene', 'checkUnderground');
992
1058
  if (checkUnderground) {
993
1059
  var wasFixed = this.fixUndergroundComponent(componentModel);
994
1060
  if (wasFixed) {
@@ -1086,8 +1152,8 @@ var CentralPlantInternals = /*#__PURE__*/function () {
1086
1152
  // responds to tooltip-driven state changes immediately after drop.
1087
1153
  // (The scene-load path uses _processBehaviors instead, which runs on loadSceneData.)
1088
1154
  if ((_componentData$defaul = componentData.defaultBehaviors) !== null && _componentData$defaul !== void 0 && _componentData$defaul.length) {
1089
- var _this$centralPlant$sc7, _som$registerBehavior;
1090
- var som = (_this$centralPlant$sc7 = this.centralPlant.sceneViewer) === null || _this$centralPlant$sc7 === void 0 ? void 0 : _this$centralPlant$sc7.sceneOperationsManager;
1155
+ var _this$centralPlant$sc8, _som$registerBehavior;
1156
+ var som = (_this$centralPlant$sc8 = this.centralPlant.sceneViewer) === null || _this$centralPlant$sc8 === void 0 ? void 0 : _this$centralPlant$sc8.sceneOperationsManager;
1091
1157
  som === null || som === void 0 || (_som$registerBehavior = som.registerBehaviorsForComponentInstance) === null || _som$registerBehavior === void 0 || _som$registerBehavior.call(som, componentData, componentId);
1092
1158
  }
1093
1159
 
@@ -1149,9 +1215,9 @@ var CentralPlantInternals = /*#__PURE__*/function () {
1149
1215
  }, {
1150
1216
  key: "deleteComponent",
1151
1217
  value: function deleteComponent(componentId) {
1152
- var _this$centralPlant$sc8;
1218
+ var _this$centralPlant$sc9;
1153
1219
  // Check if component manager is available
1154
- var componentManager = (_this$centralPlant$sc8 = this.centralPlant.sceneViewer) === null || _this$centralPlant$sc8 === void 0 ? void 0 : _this$centralPlant$sc8.componentManager;
1220
+ var componentManager = (_this$centralPlant$sc9 = this.centralPlant.sceneViewer) === null || _this$centralPlant$sc9 === void 0 ? void 0 : _this$centralPlant$sc9.componentManager;
1155
1221
  if (!componentManager) {
1156
1222
  console.error('❌ deleteComponent(): Component manager not available');
1157
1223
  return false;
@@ -1226,8 +1292,8 @@ var CentralPlantInternals = /*#__PURE__*/function () {
1226
1292
  }
1227
1293
  var componentIds = [];
1228
1294
  this.centralPlant.sceneViewer.scene.traverse(function (child) {
1229
- var _child$userData;
1230
- if (((_child$userData = child.userData) === null || _child$userData === void 0 ? void 0 : _child$userData.objectType) === 'component') {
1295
+ var _child$userData2;
1296
+ if (((_child$userData2 = child.userData) === null || _child$userData2 === void 0 ? void 0 : _child$userData2.objectType) === 'component') {
1231
1297
  componentIds.push(child.uuid || child.userData.originalUuid);
1232
1298
  }
1233
1299
  });
@@ -68,10 +68,19 @@ function createPathfindingRequest(startConnector, endConnector) {
68
68
  };
69
69
  }
70
70
 
71
+ /**
72
+ * The official set of flow-related attribute keys that can be set on a path.
73
+ * These attributes belong to the full path and are inherited by all segments.
74
+ *
75
+ * @type {string[]}
76
+ */
77
+ var FLOW_ATTRIBUTE_KEYS = ['flowDirection', 'flowSpeed', 'flowTemperature', 'flowMaterial'];
78
+
71
79
  /**
72
80
  * Data structure for storing path information with segments.
73
81
  * Tracks both computed and declared (manually edited) segments.
74
- *
82
+ * Also stores path-level flow attributes shared by all segments.
83
+ *
75
84
  * Business logic layer - stores coordinate data without Three.js dependencies.
76
85
  */
77
86
  var PathData = /*#__PURE__*/function () {
@@ -91,16 +100,60 @@ var PathData = /*#__PURE__*/function () {
91
100
  * @type {Array<{start: {x, y, z}, end: {x, y, z}, isDeclared: boolean, modifiedAt: number|null}>}
92
101
  */
93
102
  this.segments = [];
103
+
104
+ /**
105
+ * Path-level flow attributes shared by all segments within this path.
106
+ * Keys must come from FLOW_ATTRIBUTE_KEYS. Values are application-defined.
107
+ * @type {Record<string, any>}
108
+ */
109
+ this.flowAttributes = {};
94
110
  this.createdAt = Date.now();
95
111
  }
96
112
 
97
113
  /**
98
- * Add a computed segment (from pathfinding algorithm)
99
- *
100
- * @param {{x: number, y: number, z: number}} start - Start coordinate
101
- * @param {{x: number, y: number, z: number}} end - End coordinate
114
+ * Set a flow attribute on this path.
115
+ * All segments within this path inherit the value.
116
+ *
117
+ * @param {string} key - Attribute key (should be one of FLOW_ATTRIBUTE_KEYS)
118
+ * @param {any} value - Attribute value
102
119
  */
103
120
  return _rollupPluginBabelHelpers.createClass(PathData, [{
121
+ key: "setFlowAttribute",
122
+ value: function setFlowAttribute(key, value) {
123
+ this.flowAttributes[key] = value;
124
+ }
125
+
126
+ /**
127
+ * Get the declared value of a flow attribute.
128
+ * Returns null if the attribute has not been set.
129
+ *
130
+ * @param {string} key - Attribute key
131
+ * @returns {any|null}
132
+ */
133
+ }, {
134
+ key: "getFlowAttribute",
135
+ value: function getFlowAttribute(key) {
136
+ return Object.prototype.hasOwnProperty.call(this.flowAttributes, key) ? this.flowAttributes[key] : null;
137
+ }
138
+
139
+ /**
140
+ * Get a shallow copy of all declared flow attributes.
141
+ *
142
+ * @returns {Record<string, any>}
143
+ */
144
+ }, {
145
+ key: "getAllFlowAttributes",
146
+ value: function getAllFlowAttributes() {
147
+ return _rollupPluginBabelHelpers.objectSpread2({}, this.flowAttributes);
148
+ }
149
+
150
+ /**
151
+ * Add a computed segment (from pathfinding algorithm)
152
+ *
153
+ * @param {{x: number, y: number, z: number}} start - Start coordinate
154
+ * @param {{x: number, y: number, z: number}} end - End coordinate
155
+ */
156
+ }, {
104
157
  key: "addSegment",
105
158
  value: function addSegment(start, end) {
106
159
  this.segments.push({
@@ -177,6 +230,7 @@ var PathData = /*#__PURE__*/function () {
177
230
  segments: this.segments.map(function (seg) {
178
231
  return _rollupPluginBabelHelpers.objectSpread2({}, seg);
179
232
  }),
233
+ flowAttributes: _rollupPluginBabelHelpers.objectSpread2({}, this.flowAttributes),
180
234
  createdAt: this.createdAt
181
235
  };
182
236
  }
@@ -237,11 +291,13 @@ var PathData = /*#__PURE__*/function () {
237
291
  pathData.segments = json.segments.map(function (seg) {
238
292
  return _rollupPluginBabelHelpers.objectSpread2({}, seg);
239
293
  });
294
+ pathData.flowAttributes = json.flowAttributes ? _rollupPluginBabelHelpers.objectSpread2({}, json.flowAttributes) : {};
240
295
  pathData.createdAt = json.createdAt || Date.now();
241
296
  return pathData;
242
297
  }
243
298
  }]);
244
299
  }();
245
300
 
301
+ exports.FLOW_ATTRIBUTE_KEYS = FLOW_ATTRIBUTE_KEYS;
246
302
  exports.PathData = PathData;
247
303
  exports.createPathfindingRequest = createPathfindingRequest;
@@ -102,7 +102,7 @@ var sceneViewer = /*#__PURE__*/function (_BaseDisposable) {
102
102
  this.centralPlant.attachToComponent();
103
103
 
104
104
  // Sync our managers tracking object after attachment
105
- managerKeys = ['threeJSResourceManager', 'performanceMonitorManager', 'settingsManager', 'sceneExportManager', 'componentManager', 'sceneInitializationManager', 'environmentManager', 'keyboardControlsManager', 'pathfindingManager', 'behaviorManager', 'sceneOperationsManager', 'animationManager', 'cameraControlsManager', 'componentDragManager', 'tooltipsManager', 'componentTooltipManager']; // Populate our managers tracking object
105
+ managerKeys = ['threeJSResourceManager', 'performanceMonitorManager', 'settingsManager', 'sceneExportManager', 'componentManager', 'sceneInitializationManager', 'environmentManager', 'keyboardControlsManager', 'pathfindingManager', 'pathFlowManager', 'behaviorManager', 'sceneOperationsManager', 'animationManager', 'cameraControlsManager', 'componentDragManager', 'tooltipsManager', 'componentTooltipManager']; // Populate our managers tracking object
106
106
  managerKeys.forEach(function (key) {
107
107
  if (_this2[key]) {
108
108
  _this2.managers[key] = _this2[key];
@@ -17,6 +17,7 @@ var BehaviorManager = require('./managers/behaviors/BehaviorManager.js');
17
17
  var componentManager = require('./managers/components/componentManager.js');
18
18
  var animationManager = require('./managers/scene/animationManager.js');
19
19
  var pathfindingManager = require('./managers/pathfinding/pathfindingManager.js');
20
+ var PathFlowManager = require('./managers/pathfinding/PathFlowManager.js');
20
21
  var SnapshotManager = require('./managers/pathfinding/SnapshotManager.js');
21
22
  var componentDataManager = require('./managers/components/componentDataManager.js');
22
23
  var transformControlsManager = require('./managers/controls/transformControlsManager.js');
@@ -42,6 +43,7 @@ exports.findObjectByHardcodedUuid = nameUtils.findObjectByHardcodedUuid;
42
43
  exports.generateUniqueComponentId = nameUtils.generateUniqueComponentId;
43
44
  exports.generateUuidFromName = nameUtils.generateUuidFromName;
44
45
  exports.getHardcodedUuid = nameUtils.getHardcodedUuid;
46
+ exports.FLOW_ATTRIBUTE_KEYS = pathfindingData.FLOW_ATTRIBUTE_KEYS;
45
47
  exports.PathData = pathfindingData.PathData;
46
48
  exports.createPathfindingRequest = pathfindingData.createPathfindingRequest;
47
49
  exports.getObjectTypeName = objectTypes.getObjectTypeName;
@@ -66,6 +68,7 @@ exports.BehaviorManager = BehaviorManager.BehaviorManager;
66
68
  exports.ComponentManager = componentManager.ComponentManager;
67
69
  exports.AnimationManager = animationManager.AnimationManager;
68
70
  exports.PathfindingManager = pathfindingManager.PathfindingManager;
71
+ exports.PathFlowManager = PathFlowManager.PathFlowManager;
69
72
  exports.SnapshotManager = SnapshotManager.SnapshotManager;
70
73
  exports.ComponentDataManager = componentDataManager.ComponentDataManager;
71
74
  exports.createTransformControls = transformControlsManager.createTransformControls;