@lv-x-software-house/x_view 1.2.5-dev.45 → 1.2.5-dev.46

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/index.js CHANGED
@@ -1098,6 +1098,7 @@ function XViewSidebar({
1098
1098
  onClick: () => {
1099
1099
  onActivateQuestLens({ assigneeId: questFilterAssignee, status: questFilterStatus });
1100
1100
  setIsQuestLensMenuOpen(false);
1101
+ onToggle(false);
1101
1102
  },
1102
1103
  className: "flex-[2] py-2 bg-indigo-600 hover:bg-indigo-500 text-white text-[11px] font-bold rounded-lg shadow-lg shadow-indigo-500/20 transition-all hover:scale-[1.02] active:scale-95"
1103
1104
  },
@@ -14059,6 +14060,9 @@ function XViewScene({
14059
14060
  timeToYMap.set(ms, idx * TIMELINE_LAYER_SPACING_Y);
14060
14061
  });
14061
14062
  const startX = -((QUEST_STATUS_ORDER.length - 1) * QUEST_LENS_COLUMN_SPACING) / 2;
14063
+ let sumX = 0;
14064
+ let sumY = 0;
14065
+ let questCount = 0;
14062
14066
  const positionGroups = /* @__PURE__ */ new Map();
14063
14067
  const NODE_X_GAP = 22;
14064
14068
  QUEST_STATUS_ORDER.forEach((statusName) => {
@@ -14162,6 +14166,9 @@ function XViewScene({
14162
14166
  const lensTween = new import_tween2.Tween(mesh.position).to({ x: finalX, y: targetY, z: 0 }, 1500).easing(import_tween2.Easing.Cubic.InOut);
14163
14167
  tweenGroup.add(lensTween);
14164
14168
  lensTween.start();
14169
+ sumX += finalX;
14170
+ sumY += targetY;
14171
+ questCount++;
14165
14172
  if (!timeInfo.isUndated && timeInfo.label && !mesh.getObjectByName("questDateLabel")) {
14166
14173
  const dateSprite = createTextSprite(timeInfo.label, 36);
14167
14174
  dateSprite.name = "questDateLabel";
@@ -14210,6 +14217,18 @@ function XViewScene({
14210
14217
  }
14211
14218
  });
14212
14219
  });
14220
+ if (questCount > 0) {
14221
+ const { camera, controls } = stateRef.current;
14222
+ const centerX = sumX / questCount;
14223
+ const centerY = sumY / questCount;
14224
+ const targetFocus = new THREE3.Vector3(centerX, centerY, 0);
14225
+ const targetTween = new import_tween2.Tween(controls.target).to({ x: targetFocus.x, y: targetFocus.y, z: targetFocus.z }, 1500).easing(import_tween2.Easing.Cubic.InOut);
14226
+ tweenGroup.add(targetTween);
14227
+ targetTween.start();
14228
+ const camTween = new import_tween2.Tween(camera.position).to({ x: targetFocus.x, y: targetFocus.y, z: 140 }, 1500).easing(import_tween2.Easing.Cubic.InOut);
14229
+ tweenGroup.add(camTween);
14230
+ camTween.start();
14231
+ }
14213
14232
  }, [addOrUpdateNodeMesh]);
14214
14233
  (0, import_react28.useEffect)(() => {
14215
14234
  if (!isInitialized || !sceneDataRef.current) return;
package/dist/index.mjs CHANGED
@@ -1059,6 +1059,7 @@ function XViewSidebar({
1059
1059
  onClick: () => {
1060
1060
  onActivateQuestLens({ assigneeId: questFilterAssignee, status: questFilterStatus });
1061
1061
  setIsQuestLensMenuOpen(false);
1062
+ onToggle(false);
1062
1063
  },
1063
1064
  className: "flex-[2] py-2 bg-indigo-600 hover:bg-indigo-500 text-white text-[11px] font-bold rounded-lg shadow-lg shadow-indigo-500/20 transition-all hover:scale-[1.02] active:scale-95"
1064
1065
  },
@@ -14103,6 +14104,9 @@ function XViewScene({
14103
14104
  timeToYMap.set(ms, idx * TIMELINE_LAYER_SPACING_Y);
14104
14105
  });
14105
14106
  const startX = -((QUEST_STATUS_ORDER.length - 1) * QUEST_LENS_COLUMN_SPACING) / 2;
14107
+ let sumX = 0;
14108
+ let sumY = 0;
14109
+ let questCount = 0;
14106
14110
  const positionGroups = /* @__PURE__ */ new Map();
14107
14111
  const NODE_X_GAP = 22;
14108
14112
  QUEST_STATUS_ORDER.forEach((statusName) => {
@@ -14206,6 +14210,9 @@ function XViewScene({
14206
14210
  const lensTween = new Tween2(mesh.position).to({ x: finalX, y: targetY, z: 0 }, 1500).easing(Easing2.Cubic.InOut);
14207
14211
  tweenGroup.add(lensTween);
14208
14212
  lensTween.start();
14213
+ sumX += finalX;
14214
+ sumY += targetY;
14215
+ questCount++;
14209
14216
  if (!timeInfo.isUndated && timeInfo.label && !mesh.getObjectByName("questDateLabel")) {
14210
14217
  const dateSprite = createTextSprite(timeInfo.label, 36);
14211
14218
  dateSprite.name = "questDateLabel";
@@ -14254,6 +14261,18 @@ function XViewScene({
14254
14261
  }
14255
14262
  });
14256
14263
  });
14264
+ if (questCount > 0) {
14265
+ const { camera, controls } = stateRef.current;
14266
+ const centerX = sumX / questCount;
14267
+ const centerY = sumY / questCount;
14268
+ const targetFocus = new THREE3.Vector3(centerX, centerY, 0);
14269
+ const targetTween = new Tween2(controls.target).to({ x: targetFocus.x, y: targetFocus.y, z: targetFocus.z }, 1500).easing(Easing2.Cubic.InOut);
14270
+ tweenGroup.add(targetTween);
14271
+ targetTween.start();
14272
+ const camTween = new Tween2(camera.position).to({ x: targetFocus.x, y: targetFocus.y, z: 140 }, 1500).easing(Easing2.Cubic.InOut);
14273
+ tweenGroup.add(camTween);
14274
+ camTween.start();
14275
+ }
14257
14276
  }, [addOrUpdateNodeMesh]);
14258
14277
  useEffect22(() => {
14259
14278
  if (!isInitialized || !sceneDataRef.current) return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lv-x-software-house/x_view",
3
- "version": "1.2.5-dev.45",
3
+ "version": "1.2.5-dev.46",
4
4
  "description": "Pacote privado contendo os componentes e lógica de renderização 3D do X View.",
5
5
  "author": "iv.x - Engenharia de Software - ivxsoftwarehouse@gmail.com",
6
6
  "license": "UNLICENSED",