@meta2d/core 1.0.70 → 1.0.71
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/package.json +1 -1
- package/src/core.js +54 -90
- package/src/core.js.map +1 -1
- package/src/pen/render.js +28 -4
- package/src/pen/render.js.map +1 -1
- package/src/pen/text.js +15 -6
- package/src/pen/text.js.map +1 -1
- package/src/store/store.d.ts +1 -1
- package/src/utils/jetLinks.d.ts +8 -0
- package/src/utils/jetLinks.js +116 -0
- package/src/utils/jetLinks.js.map +1 -0
- package/src/utils/url.js +3 -0
- package/src/utils/url.js.map +1 -1
package/src/pen/render.js
CHANGED
|
@@ -2483,6 +2483,7 @@ export function setNodeAnimateProcess(pen, process) {
|
|
|
2483
2483
|
process = 1;
|
|
2484
2484
|
}
|
|
2485
2485
|
const frame = pen.frames[pen.calculative.frameIndex];
|
|
2486
|
+
const scale = pen.calculative.canvas.store.data.scale;
|
|
2486
2487
|
for (const k in frame) {
|
|
2487
2488
|
if (k === 'duration') {
|
|
2488
2489
|
continue;
|
|
@@ -2495,7 +2496,7 @@ export function setNodeAnimateProcess(pen, process) {
|
|
|
2495
2496
|
pen.calculative.patchFlags = true;
|
|
2496
2497
|
}
|
|
2497
2498
|
else if (k === 'x') {
|
|
2498
|
-
const lastVal = getFrameValue(pen, k, pen.calculative.frameIndex);
|
|
2499
|
+
const lastVal = getFrameValue(pen, k, pen.calculative.frameIndex) * scale;
|
|
2499
2500
|
pen.calculative.worldRect.x = pen.calculative.initRect.x + lastVal;
|
|
2500
2501
|
pen.calculative.worldRect.ex = pen.calculative.initRect.ex + lastVal;
|
|
2501
2502
|
pen.calculative.worldRect.center.x = pen.calculative.initRect.center.x + lastVal;
|
|
@@ -2503,11 +2504,11 @@ export function setNodeAnimateProcess(pen, process) {
|
|
|
2503
2504
|
pen.calculative.worldRect.pivot.x =
|
|
2504
2505
|
pen.calculative.initRect.pivot?.x + lastVal;
|
|
2505
2506
|
}
|
|
2506
|
-
translateRect(pen.calculative.worldRect, frame[k] * process *
|
|
2507
|
+
translateRect(pen.calculative.worldRect, frame[k] * process * scale, 0);
|
|
2507
2508
|
pen.calculative.patchFlags = true;
|
|
2508
2509
|
}
|
|
2509
2510
|
else if (k === 'y') {
|
|
2510
|
-
const lastVal = getFrameValue(pen, k, pen.calculative.frameIndex);
|
|
2511
|
+
const lastVal = getFrameValue(pen, k, pen.calculative.frameIndex) * scale;
|
|
2511
2512
|
pen.calculative.worldRect.y = pen.calculative.initRect.y + lastVal;
|
|
2512
2513
|
pen.calculative.worldRect.ey = pen.calculative.initRect.ey + lastVal;
|
|
2513
2514
|
pen.calculative.worldRect.center.y =
|
|
@@ -2516,7 +2517,30 @@ export function setNodeAnimateProcess(pen, process) {
|
|
|
2516
2517
|
pen.calculative.worldRect.pivot.y =
|
|
2517
2518
|
pen.calculative.initRect.pivot?.y + lastVal;
|
|
2518
2519
|
}
|
|
2519
|
-
translateRect(pen.calculative.worldRect, 0, frame[k] * process *
|
|
2520
|
+
translateRect(pen.calculative.worldRect, 0, frame[k] * process * scale);
|
|
2521
|
+
pen.calculative.patchFlags = true;
|
|
2522
|
+
}
|
|
2523
|
+
else if (k === 'width') {
|
|
2524
|
+
//仅考虑抽屉效果
|
|
2525
|
+
const lastVal = getFrameValue(pen, k, pen.calculative.frameIndex) * scale;
|
|
2526
|
+
pen.calculative.worldRect.width = pen.calculative.initRect.width + lastVal;
|
|
2527
|
+
pen.calculative.worldRect.ex = pen.calculative.initRect.ex + lastVal;
|
|
2528
|
+
pen.calculative.worldRect.center.x = pen.calculative.initRect.center.x + lastVal;
|
|
2529
|
+
let value = frame[k] * process * scale;
|
|
2530
|
+
pen.calculative.worldRect.width += value;
|
|
2531
|
+
pen.calculative.worldRect.ex += value;
|
|
2532
|
+
pen.calculative.worldRect.center.x += value;
|
|
2533
|
+
pen.calculative.patchFlags = true;
|
|
2534
|
+
}
|
|
2535
|
+
else if (k === 'height') {
|
|
2536
|
+
const lastVal = getFrameValue(pen, k, pen.calculative.frameIndex) * scale;
|
|
2537
|
+
pen.calculative.worldRect.height = pen.calculative.initRect.height + lastVal;
|
|
2538
|
+
pen.calculative.worldRect.ey = pen.calculative.initRect.ey + lastVal;
|
|
2539
|
+
pen.calculative.worldRect.center.y = pen.calculative.initRect.center.y + lastVal;
|
|
2540
|
+
let value = frame[k] * process * scale;
|
|
2541
|
+
pen.calculative.worldRect.height += value;
|
|
2542
|
+
pen.calculative.worldRect.ey += value;
|
|
2543
|
+
pen.calculative.worldRect.center.y += value;
|
|
2520
2544
|
pen.calculative.patchFlags = true;
|
|
2521
2545
|
}
|
|
2522
2546
|
else if (k === 'rotate') {
|