@lv-x-software-house/x_view 1.2.8-dev.15 → 1.2.8-dev.17
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 +55 -24
- package/dist/index.mjs +55 -24
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1378,7 +1378,12 @@ var userActionHandlers = {
|
|
|
1378
1378
|
)
|
|
1379
1379
|
);
|
|
1380
1380
|
targetFinalPositions.push(endPosition);
|
|
1381
|
-
const targetMesh = createNodeMesh(
|
|
1381
|
+
const targetMesh = createNodeMesh(
|
|
1382
|
+
nodeData,
|
|
1383
|
+
startPosition,
|
|
1384
|
+
glowTexture,
|
|
1385
|
+
!!nodeData.is_quest
|
|
1386
|
+
);
|
|
1382
1387
|
targetMesh.scale.set(0.01, 0.01, 0.01);
|
|
1383
1388
|
graphGroup.add(targetMesh);
|
|
1384
1389
|
if (targetMesh.userData.labelObject) {
|
|
@@ -16174,11 +16179,19 @@ function XViewScene({
|
|
|
16174
16179
|
}
|
|
16175
16180
|
}
|
|
16176
16181
|
Object.values(nodeObjects).forEach((mesh) => {
|
|
16177
|
-
const
|
|
16178
|
-
if (
|
|
16179
|
-
mesh.remove(
|
|
16180
|
-
if (
|
|
16181
|
-
|
|
16182
|
+
const oldTimelineLabel = mesh.getObjectByName("timelineLabel");
|
|
16183
|
+
if (oldTimelineLabel) {
|
|
16184
|
+
mesh.remove(oldTimelineLabel);
|
|
16185
|
+
if (oldTimelineLabel.material.map)
|
|
16186
|
+
oldTimelineLabel.material.map.dispose();
|
|
16187
|
+
oldTimelineLabel.material.dispose();
|
|
16188
|
+
}
|
|
16189
|
+
const oldQuestDateLabel = mesh.getObjectByName("questDateLabel");
|
|
16190
|
+
if (oldQuestDateLabel) {
|
|
16191
|
+
mesh.remove(oldQuestDateLabel);
|
|
16192
|
+
if (oldQuestDateLabel.material.map)
|
|
16193
|
+
oldQuestDateLabel.material.map.dispose();
|
|
16194
|
+
oldQuestDateLabel.material.dispose();
|
|
16182
16195
|
}
|
|
16183
16196
|
delete mesh.userData.timelineIntervalBar;
|
|
16184
16197
|
delete mesh.userData.timelineEndLabel;
|
|
@@ -16239,10 +16252,10 @@ function XViewScene({
|
|
|
16239
16252
|
timelineNodes.push(nodeInfo);
|
|
16240
16253
|
});
|
|
16241
16254
|
if (timelineNodes.length === 0) return;
|
|
16242
|
-
const
|
|
16243
|
-
const maxTimeIndex =
|
|
16255
|
+
const sortedTimePoints2 = Array.from(allTimePoints).sort((a, b) => a - b);
|
|
16256
|
+
const maxTimeIndex = sortedTimePoints2.length - 1;
|
|
16244
16257
|
const timeToYMap = new Map(
|
|
16245
|
-
|
|
16258
|
+
sortedTimePoints2.map((time, index) => [
|
|
16246
16259
|
time,
|
|
16247
16260
|
(index - maxTimeIndex) * TIMELINE_LAYER_SPACING_Y
|
|
16248
16261
|
])
|
|
@@ -16400,11 +16413,11 @@ function XViewScene({
|
|
|
16400
16413
|
}
|
|
16401
16414
|
});
|
|
16402
16415
|
if (timelineNodes.length === 0) return;
|
|
16403
|
-
const
|
|
16416
|
+
const maxTimeIndex = sortedTimePoints.length - 1;
|
|
16404
16417
|
const timeToYMap = new Map(
|
|
16405
16418
|
sortedTimePoints.map((time, index) => [
|
|
16406
16419
|
time,
|
|
16407
|
-
index * TIMELINE_LAYER_SPACING_Y
|
|
16420
|
+
(index - maxTimeIndex) * TIMELINE_LAYER_SPACING_Y
|
|
16408
16421
|
])
|
|
16409
16422
|
);
|
|
16410
16423
|
timelineNodes.sort(
|
|
@@ -16412,18 +16425,36 @@ function XViewScene({
|
|
|
16412
16425
|
);
|
|
16413
16426
|
const baseX = sourceMesh.position.x + TIMELINE_NODE_SPACING_X;
|
|
16414
16427
|
const baseY = sourceMesh.position.y;
|
|
16415
|
-
const
|
|
16416
|
-
timelineNodes.forEach((node
|
|
16428
|
+
const columns = [];
|
|
16429
|
+
timelineNodes.forEach((node) => {
|
|
16417
16430
|
const { mesh, type, startDate, endDate, label } = node;
|
|
16418
|
-
const
|
|
16419
|
-
const
|
|
16431
|
+
const startY = timeToYMap.get(startDate.getTime());
|
|
16432
|
+
const endY = timeToYMap.get(endDate.getTime()) || startY;
|
|
16433
|
+
let foundColumn = false;
|
|
16434
|
+
for (let i = 0; i < columns.length; i++) {
|
|
16435
|
+
if (columns[i].endY < startY) {
|
|
16436
|
+
node.columnIndex = i;
|
|
16437
|
+
columns[i].endY = endY;
|
|
16438
|
+
foundColumn = true;
|
|
16439
|
+
break;
|
|
16440
|
+
}
|
|
16441
|
+
}
|
|
16442
|
+
if (!foundColumn) {
|
|
16443
|
+
node.columnIndex = columns.length;
|
|
16444
|
+
columns.push({ endY });
|
|
16445
|
+
}
|
|
16446
|
+
const x = baseX + node.columnIndex * TIMELINE_NODE_SPACING_X;
|
|
16447
|
+
const y = baseY + startY;
|
|
16448
|
+
const versionTween = new import_tween2.Tween(mesh.position).to({ x, y, z: 0 }, 1500).easing(import_tween2.Easing.Cubic.InOut);
|
|
16420
16449
|
tweenGroup.add(versionTween);
|
|
16421
16450
|
versionTween.start();
|
|
16422
|
-
|
|
16423
|
-
|
|
16424
|
-
|
|
16425
|
-
|
|
16426
|
-
|
|
16451
|
+
if (!mesh.getObjectByName("questDateLabel")) {
|
|
16452
|
+
const startLabelText = type === "interval" ? startDate.getFullYear().toString() : label;
|
|
16453
|
+
const startLabel = createTextSprite(startLabelText, 48);
|
|
16454
|
+
startLabel.name = "timelineLabel";
|
|
16455
|
+
startLabel.position.set(0, -2.5, 0);
|
|
16456
|
+
mesh.add(startLabel);
|
|
16457
|
+
}
|
|
16427
16458
|
if (type === "interval") {
|
|
16428
16459
|
const relativeEndY = timeToYMap.get(endDate.getTime()) - timeToYMap.get(startDate.getTime());
|
|
16429
16460
|
if (relativeEndY > 0) {
|
|
@@ -16782,11 +16813,11 @@ function XViewScene({
|
|
|
16782
16813
|
}
|
|
16783
16814
|
}
|
|
16784
16815
|
});
|
|
16785
|
-
const
|
|
16816
|
+
const sortedTimePoints2 = Array.from(allActiveTimePoints).sort(
|
|
16786
16817
|
(a, b) => a - b
|
|
16787
16818
|
);
|
|
16788
16819
|
const timeToYMap = /* @__PURE__ */ new Map();
|
|
16789
|
-
|
|
16820
|
+
sortedTimePoints2.forEach((ms, idx) => {
|
|
16790
16821
|
timeToYMap.set(ms, idx * TIMELINE_LAYER_SPACING_Y);
|
|
16791
16822
|
});
|
|
16792
16823
|
const startX = -((QUEST_STATUS_ORDER.length - 1) * QUEST_LENS_COLUMN_SPACING) / 2;
|
|
@@ -16805,7 +16836,7 @@ function XViewScene({
|
|
|
16805
16836
|
if (!timeInfo.isUndated) {
|
|
16806
16837
|
nodeY = timeToYMap.get(timeInfo.startDate.getTime());
|
|
16807
16838
|
} else {
|
|
16808
|
-
const undatedOffset =
|
|
16839
|
+
const undatedOffset = sortedTimePoints2.length > 0 ? sortedTimePoints2.length * 5 : 0;
|
|
16809
16840
|
nodeY = -40 - rowIndex * QUEST_LENS_ROW_SPACING - undatedOffset;
|
|
16810
16841
|
}
|
|
16811
16842
|
const posKey = `${statusName}_${nodeY}`;
|
|
@@ -16888,7 +16919,7 @@ function XViewScene({
|
|
|
16888
16919
|
if (!timeInfo.isUndated) {
|
|
16889
16920
|
targetY = timeToYMap.get(timeInfo.startDate.getTime());
|
|
16890
16921
|
} else {
|
|
16891
|
-
const undatedOffset =
|
|
16922
|
+
const undatedOffset = sortedTimePoints2.length > 0 ? sortedTimePoints2.length * 5 : 0;
|
|
16892
16923
|
targetY = -40 - rowIndex * QUEST_LENS_ROW_SPACING - undatedOffset;
|
|
16893
16924
|
}
|
|
16894
16925
|
const posKey = `${statusName}_${targetY}`;
|
package/dist/index.mjs
CHANGED
|
@@ -1339,7 +1339,12 @@ var userActionHandlers = {
|
|
|
1339
1339
|
)
|
|
1340
1340
|
);
|
|
1341
1341
|
targetFinalPositions.push(endPosition);
|
|
1342
|
-
const targetMesh = createNodeMesh(
|
|
1342
|
+
const targetMesh = createNodeMesh(
|
|
1343
|
+
nodeData,
|
|
1344
|
+
startPosition,
|
|
1345
|
+
glowTexture,
|
|
1346
|
+
!!nodeData.is_quest
|
|
1347
|
+
);
|
|
1343
1348
|
targetMesh.scale.set(0.01, 0.01, 0.01);
|
|
1344
1349
|
graphGroup.add(targetMesh);
|
|
1345
1350
|
if (targetMesh.userData.labelObject) {
|
|
@@ -16237,11 +16242,19 @@ function XViewScene({
|
|
|
16237
16242
|
}
|
|
16238
16243
|
}
|
|
16239
16244
|
Object.values(nodeObjects).forEach((mesh) => {
|
|
16240
|
-
const
|
|
16241
|
-
if (
|
|
16242
|
-
mesh.remove(
|
|
16243
|
-
if (
|
|
16244
|
-
|
|
16245
|
+
const oldTimelineLabel = mesh.getObjectByName("timelineLabel");
|
|
16246
|
+
if (oldTimelineLabel) {
|
|
16247
|
+
mesh.remove(oldTimelineLabel);
|
|
16248
|
+
if (oldTimelineLabel.material.map)
|
|
16249
|
+
oldTimelineLabel.material.map.dispose();
|
|
16250
|
+
oldTimelineLabel.material.dispose();
|
|
16251
|
+
}
|
|
16252
|
+
const oldQuestDateLabel = mesh.getObjectByName("questDateLabel");
|
|
16253
|
+
if (oldQuestDateLabel) {
|
|
16254
|
+
mesh.remove(oldQuestDateLabel);
|
|
16255
|
+
if (oldQuestDateLabel.material.map)
|
|
16256
|
+
oldQuestDateLabel.material.map.dispose();
|
|
16257
|
+
oldQuestDateLabel.material.dispose();
|
|
16245
16258
|
}
|
|
16246
16259
|
delete mesh.userData.timelineIntervalBar;
|
|
16247
16260
|
delete mesh.userData.timelineEndLabel;
|
|
@@ -16302,10 +16315,10 @@ function XViewScene({
|
|
|
16302
16315
|
timelineNodes.push(nodeInfo);
|
|
16303
16316
|
});
|
|
16304
16317
|
if (timelineNodes.length === 0) return;
|
|
16305
|
-
const
|
|
16306
|
-
const maxTimeIndex =
|
|
16318
|
+
const sortedTimePoints2 = Array.from(allTimePoints).sort((a, b) => a - b);
|
|
16319
|
+
const maxTimeIndex = sortedTimePoints2.length - 1;
|
|
16307
16320
|
const timeToYMap = new Map(
|
|
16308
|
-
|
|
16321
|
+
sortedTimePoints2.map((time, index) => [
|
|
16309
16322
|
time,
|
|
16310
16323
|
(index - maxTimeIndex) * TIMELINE_LAYER_SPACING_Y
|
|
16311
16324
|
])
|
|
@@ -16463,11 +16476,11 @@ function XViewScene({
|
|
|
16463
16476
|
}
|
|
16464
16477
|
});
|
|
16465
16478
|
if (timelineNodes.length === 0) return;
|
|
16466
|
-
const
|
|
16479
|
+
const maxTimeIndex = sortedTimePoints.length - 1;
|
|
16467
16480
|
const timeToYMap = new Map(
|
|
16468
16481
|
sortedTimePoints.map((time, index) => [
|
|
16469
16482
|
time,
|
|
16470
|
-
index * TIMELINE_LAYER_SPACING_Y
|
|
16483
|
+
(index - maxTimeIndex) * TIMELINE_LAYER_SPACING_Y
|
|
16471
16484
|
])
|
|
16472
16485
|
);
|
|
16473
16486
|
timelineNodes.sort(
|
|
@@ -16475,18 +16488,36 @@ function XViewScene({
|
|
|
16475
16488
|
);
|
|
16476
16489
|
const baseX = sourceMesh.position.x + TIMELINE_NODE_SPACING_X;
|
|
16477
16490
|
const baseY = sourceMesh.position.y;
|
|
16478
|
-
const
|
|
16479
|
-
timelineNodes.forEach((node
|
|
16491
|
+
const columns = [];
|
|
16492
|
+
timelineNodes.forEach((node) => {
|
|
16480
16493
|
const { mesh, type, startDate, endDate, label } = node;
|
|
16481
|
-
const
|
|
16482
|
-
const
|
|
16494
|
+
const startY = timeToYMap.get(startDate.getTime());
|
|
16495
|
+
const endY = timeToYMap.get(endDate.getTime()) || startY;
|
|
16496
|
+
let foundColumn = false;
|
|
16497
|
+
for (let i = 0; i < columns.length; i++) {
|
|
16498
|
+
if (columns[i].endY < startY) {
|
|
16499
|
+
node.columnIndex = i;
|
|
16500
|
+
columns[i].endY = endY;
|
|
16501
|
+
foundColumn = true;
|
|
16502
|
+
break;
|
|
16503
|
+
}
|
|
16504
|
+
}
|
|
16505
|
+
if (!foundColumn) {
|
|
16506
|
+
node.columnIndex = columns.length;
|
|
16507
|
+
columns.push({ endY });
|
|
16508
|
+
}
|
|
16509
|
+
const x = baseX + node.columnIndex * TIMELINE_NODE_SPACING_X;
|
|
16510
|
+
const y = baseY + startY;
|
|
16511
|
+
const versionTween = new Tween2(mesh.position).to({ x, y, z: 0 }, 1500).easing(Easing2.Cubic.InOut);
|
|
16483
16512
|
tweenGroup.add(versionTween);
|
|
16484
16513
|
versionTween.start();
|
|
16485
|
-
|
|
16486
|
-
|
|
16487
|
-
|
|
16488
|
-
|
|
16489
|
-
|
|
16514
|
+
if (!mesh.getObjectByName("questDateLabel")) {
|
|
16515
|
+
const startLabelText = type === "interval" ? startDate.getFullYear().toString() : label;
|
|
16516
|
+
const startLabel = createTextSprite(startLabelText, 48);
|
|
16517
|
+
startLabel.name = "timelineLabel";
|
|
16518
|
+
startLabel.position.set(0, -2.5, 0);
|
|
16519
|
+
mesh.add(startLabel);
|
|
16520
|
+
}
|
|
16490
16521
|
if (type === "interval") {
|
|
16491
16522
|
const relativeEndY = timeToYMap.get(endDate.getTime()) - timeToYMap.get(startDate.getTime());
|
|
16492
16523
|
if (relativeEndY > 0) {
|
|
@@ -16845,11 +16876,11 @@ function XViewScene({
|
|
|
16845
16876
|
}
|
|
16846
16877
|
}
|
|
16847
16878
|
});
|
|
16848
|
-
const
|
|
16879
|
+
const sortedTimePoints2 = Array.from(allActiveTimePoints).sort(
|
|
16849
16880
|
(a, b) => a - b
|
|
16850
16881
|
);
|
|
16851
16882
|
const timeToYMap = /* @__PURE__ */ new Map();
|
|
16852
|
-
|
|
16883
|
+
sortedTimePoints2.forEach((ms, idx) => {
|
|
16853
16884
|
timeToYMap.set(ms, idx * TIMELINE_LAYER_SPACING_Y);
|
|
16854
16885
|
});
|
|
16855
16886
|
const startX = -((QUEST_STATUS_ORDER.length - 1) * QUEST_LENS_COLUMN_SPACING) / 2;
|
|
@@ -16868,7 +16899,7 @@ function XViewScene({
|
|
|
16868
16899
|
if (!timeInfo.isUndated) {
|
|
16869
16900
|
nodeY = timeToYMap.get(timeInfo.startDate.getTime());
|
|
16870
16901
|
} else {
|
|
16871
|
-
const undatedOffset =
|
|
16902
|
+
const undatedOffset = sortedTimePoints2.length > 0 ? sortedTimePoints2.length * 5 : 0;
|
|
16872
16903
|
nodeY = -40 - rowIndex * QUEST_LENS_ROW_SPACING - undatedOffset;
|
|
16873
16904
|
}
|
|
16874
16905
|
const posKey = `${statusName}_${nodeY}`;
|
|
@@ -16951,7 +16982,7 @@ function XViewScene({
|
|
|
16951
16982
|
if (!timeInfo.isUndated) {
|
|
16952
16983
|
targetY = timeToYMap.get(timeInfo.startDate.getTime());
|
|
16953
16984
|
} else {
|
|
16954
|
-
const undatedOffset =
|
|
16985
|
+
const undatedOffset = sortedTimePoints2.length > 0 ? sortedTimePoints2.length * 5 : 0;
|
|
16955
16986
|
targetY = -40 - rowIndex * QUEST_LENS_ROW_SPACING - undatedOffset;
|
|
16956
16987
|
}
|
|
16957
16988
|
const posKey = `${statusName}_${targetY}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lv-x-software-house/x_view",
|
|
3
|
-
"version": "1.2.8-dev.
|
|
3
|
+
"version": "1.2.8-dev.17",
|
|
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",
|