@pixerate/editor 0.135.0 → 0.137.0
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/animation-editor/index.cjs +63 -55
- package/dist/animation-editor/index.cjs.map +1 -1
- package/dist/animation-editor/index.d.cts +8 -5
- package/dist/animation-editor/index.d.ts +8 -5
- package/dist/animation-editor/index.js +10 -2
- package/dist/animation-editor/index.js.map +1 -1
- package/dist/{bezier-J8i4uqSH.d.cts → bezier-CZ2AhjID.d.cts} +1 -1
- package/dist/{bezier-lNEOp0Jx.d.ts → bezier-Dywv3Bw8.d.ts} +1 -1
- package/dist/blending-D7jCmjO6.d.cts +1026 -0
- package/dist/blending-NgF3qo3d.d.ts +1026 -0
- package/dist/brushes-CnvZSYYU.d.cts +744 -0
- package/dist/brushes-DJmUbIgz.d.ts +744 -0
- package/dist/{brushstrokeRender-SII6MG4R.js → brushstrokeRender-2FAXA3XC.js} +13 -16
- package/dist/{brushstrokeRender-SII6MG4R.js.map → brushstrokeRender-2FAXA3XC.js.map} +1 -1
- package/dist/{brushstrokeRender-JNHVEUFG.cjs → brushstrokeRender-IMFY3FF6.cjs} +16 -19
- package/dist/brushstrokeRender-IMFY3FF6.cjs.map +1 -0
- package/dist/canvas/index.cjs +10 -10
- package/dist/canvas/index.cjs.map +1 -1
- package/dist/canvas/index.d.cts +10 -7
- package/dist/canvas/index.d.ts +10 -7
- package/dist/canvas/index.js +4 -4
- package/dist/{chunk-W4LNKTHT.cjs → chunk-2XS6LTUP.cjs} +63 -63
- package/dist/{chunk-W4LNKTHT.cjs.map → chunk-2XS6LTUP.cjs.map} +1 -1
- package/dist/{chunk-HHTCDFZC.js → chunk-3D77LOBM.js} +234 -136
- package/dist/chunk-3D77LOBM.js.map +1 -0
- package/dist/{chunk-BR7EKQUP.js → chunk-3G6J7UFV.js} +322 -2
- package/dist/chunk-3G6J7UFV.js.map +1 -0
- package/dist/{chunk-62XUO5LB.js → chunk-3X6IAJUQ.js} +2 -2
- package/dist/{chunk-EM3FMJWE.js → chunk-5FSRTP6E.js} +320 -3
- package/dist/chunk-5FSRTP6E.js.map +1 -0
- package/dist/{chunk-Z2H7KECK.cjs → chunk-5OOIUXNJ.cjs} +345 -247
- package/dist/chunk-5OOIUXNJ.cjs.map +1 -0
- package/dist/{chunk-7RJ6P7MI.js → chunk-6S6362D2.js} +2 -2
- package/dist/chunk-A3BVTI3G.js +150 -0
- package/dist/chunk-A3BVTI3G.js.map +1 -0
- package/dist/{chunk-24ATT2PE.cjs → chunk-AEAAN4AD.cjs} +120 -120
- package/dist/{chunk-24ATT2PE.cjs.map → chunk-AEAAN4AD.cjs.map} +1 -1
- package/dist/chunk-ECCXGELC.cjs +727 -0
- package/dist/chunk-ECCXGELC.cjs.map +1 -0
- package/dist/{chunk-SVYE5HIM.js → chunk-EQQMGO42.js} +2 -2
- package/dist/{chunk-FHPVDTI2.cjs → chunk-F2Y4E4GU.cjs} +22 -22
- package/dist/{chunk-FHPVDTI2.cjs.map → chunk-F2Y4E4GU.cjs.map} +1 -1
- package/dist/{chunk-OXSV64JX.js → chunk-G6IKY6PL.js} +4 -4
- package/dist/{chunk-UYQUPUR6.js → chunk-HUO3TI4C.js} +3 -3
- package/dist/chunk-I52DRGGJ.js +727 -0
- package/dist/chunk-I52DRGGJ.js.map +1 -0
- package/dist/{chunk-DDSO4HS7.cjs → chunk-KEENUAFN.cjs} +2 -2
- package/dist/{chunk-DDSO4HS7.cjs.map → chunk-KEENUAFN.cjs.map} +1 -1
- package/dist/{chunk-2HC4DRF4.js → chunk-LLFHCSU2.js} +2 -2
- package/dist/{chunk-J5BA3BQ6.cjs → chunk-O7LUD7MH.cjs} +323 -3
- package/dist/chunk-O7LUD7MH.cjs.map +1 -0
- package/dist/{chunk-ILYFOJUN.js → chunk-OIBIRXRG.js} +3 -3
- package/dist/{chunk-FWEO3HSL.js → chunk-PQQF5KOW.js} +8 -8
- package/dist/{chunk-T6TV6HY6.cjs → chunk-PRSRYHQD.cjs} +36 -36
- package/dist/{chunk-T6TV6HY6.cjs.map → chunk-PRSRYHQD.cjs.map} +1 -1
- package/dist/chunk-Q6OUXEK3.cjs +150 -0
- package/dist/chunk-Q6OUXEK3.cjs.map +1 -0
- package/dist/{chunk-6GFRKLLS.cjs → chunk-QBWEH3IM.cjs} +429 -112
- package/dist/chunk-QBWEH3IM.cjs.map +1 -0
- package/dist/{chunk-ESIWZMMK.js → chunk-SYT2TLQF.js} +35 -37
- package/dist/{chunk-ESIWZMMK.js.map → chunk-SYT2TLQF.js.map} +1 -1
- package/dist/{chunk-YT3JL7YM.cjs → chunk-TLCTTQFF.cjs} +53 -53
- package/dist/{chunk-YT3JL7YM.cjs.map → chunk-TLCTTQFF.cjs.map} +1 -1
- package/dist/{chunk-P3RQ5UJE.cjs → chunk-UTQKC66X.cjs} +4 -4
- package/dist/{chunk-P3RQ5UJE.cjs.map → chunk-UTQKC66X.cjs.map} +1 -1
- package/dist/{chunk-J3B45HTA.cjs → chunk-XB25WOC2.cjs} +6 -6
- package/dist/{chunk-J3B45HTA.cjs.map → chunk-XB25WOC2.cjs.map} +1 -1
- package/dist/{chunk-YAFS2QFZ.cjs → chunk-XN2NBLV5.cjs} +313 -315
- package/dist/chunk-XN2NBLV5.cjs.map +1 -0
- package/dist/effects/index.d.cts +7 -4
- package/dist/effects/index.d.ts +7 -4
- package/dist/{export-DMeG6E06.d.ts → export-41rL6Cne.d.ts} +1 -1
- package/dist/{export-AZSwX087.d.cts → export-CyJdfP_Z.d.cts} +5 -4
- package/dist/{export-KzubBKo7.d.cts → export-D9mXp05Q.d.cts} +1 -1
- package/dist/{export-BDkyDNM8.d.ts → export-DwnZ_hvQ.d.ts} +5 -4
- package/dist/extensions/index.cjs +3 -3
- package/dist/extensions/index.cjs.map +1 -1
- package/dist/extensions/index.js +2 -2
- package/dist/generation/index.cjs +150 -945
- package/dist/generation/index.cjs.map +1 -1
- package/dist/generation/index.d.cts +3 -423
- package/dist/generation/index.d.ts +3 -423
- package/dist/generation/index.js +59 -854
- package/dist/generation/index.js.map +1 -1
- package/dist/grammar/index.cjs +3 -3
- package/dist/grammar/index.cjs.map +1 -1
- package/dist/grammar/index.js +2 -2
- package/dist/{helpers-Coa4e2j_.d.ts → helpers-C-RgeyvH.d.ts} +25 -8
- package/dist/{helpers-DHl28yLO.d.cts → helpers-v6GMazzg.d.cts} +25 -8
- package/dist/image-editor/index.cjs +986 -986
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +15 -11
- package/dist/image-editor/index.d.ts +15 -11
- package/dist/image-editor/index.js +94 -94
- package/dist/index.cjs +28 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +36 -36
- package/dist/{opentype-BWR7Qv8W.d.cts → opentype-KR_jj6b_.d.cts} +1 -1
- package/dist/{opentype-Dfcx6wFx.d.ts → opentype-a1KAW-qs.d.ts} +1 -1
- package/dist/paint/index.cjs +5 -8
- package/dist/paint/index.cjs.map +1 -1
- package/dist/paint/index.d.cts +4 -2
- package/dist/paint/index.d.ts +4 -2
- package/dist/paint/index.js +15 -18
- package/dist/paint-editor/index.cjs +405 -403
- package/dist/paint-editor/index.cjs.map +1 -1
- package/dist/paint-editor/index.d.cts +15 -748
- package/dist/paint-editor/index.d.ts +15 -748
- package/dist/paint-editor/index.js +79 -77
- package/dist/paint-editor/index.js.map +1 -1
- package/dist/{pathfinder-D8KQ6blQ.d.cts → pathfinder-BHS4vQNm.d.cts} +1 -1
- package/dist/{pathfinder-Celbi3e6.d.ts → pathfinder-BVvTIBMo.d.ts} +1 -1
- package/dist/{pool-8JZGWHvR.d.ts → pool-CZQOrSXZ.d.ts} +1 -1
- package/dist/{pool-BfuxBKTd.d.cts → pool-FjZZmZ80.d.cts} +1 -1
- package/dist/provenance-DmlcgdzT.d.cts +426 -0
- package/dist/provenance-uh5r2TQ8.d.ts +426 -0
- package/dist/rand-8xbUb6ur.d.ts +1118 -0
- package/dist/rand-Cw9VLrVC.d.cts +1118 -0
- package/dist/raster/index.cjs +17 -19
- package/dist/raster/index.cjs.map +1 -1
- package/dist/raster/index.js +9 -11
- package/dist/raster/index.js.map +1 -1
- package/dist/{svg-CxxqG3_W.d.ts → svg-CSz3mzkw.d.ts} +2 -2
- package/dist/{svg-pwXWq6s2.d.cts → svg-DTb40ICU.d.cts} +2 -2
- package/dist/{tools-y1M6O3UT.d.ts → tools-B0wXP5cF.d.ts} +1 -1
- package/dist/{tools-3EBjR91b.d.cts → tools-Ca0kI1qo.d.cts} +1 -1
- package/dist/vector/index.cjs +2698 -1674
- package/dist/vector/index.cjs.map +1 -1
- package/dist/vector/index.d.cts +390 -72
- package/dist/vector/index.d.ts +390 -72
- package/dist/vector/index.js +1665 -641
- package/dist/vector/index.js.map +1 -1
- package/dist/video-editor/index.d.cts +7 -4
- package/dist/video-editor/index.d.ts +7 -4
- package/dist/{warp-Ceqdz7kj.d.cts → warp-DTOp0lON.d.cts} +1 -1
- package/dist/{warp-C1gwu2G_.d.ts → warp-pd7hrH4T.d.ts} +1 -1
- package/package.json +1 -1
- package/skills/pixerate-vector/SKILL.md +22 -0
- package/dist/brushstrokeRender-JNHVEUFG.cjs.map +0 -1
- package/dist/chunk-64PYNEHJ.js +0 -340
- package/dist/chunk-64PYNEHJ.js.map +0 -1
- package/dist/chunk-6GFRKLLS.cjs.map +0 -1
- package/dist/chunk-7QN76ESJ.js +0 -323
- package/dist/chunk-7QN76ESJ.js.map +0 -1
- package/dist/chunk-BR7EKQUP.js.map +0 -1
- package/dist/chunk-DCLJNVZS.cjs +0 -323
- package/dist/chunk-DCLJNVZS.cjs.map +0 -1
- package/dist/chunk-EM3FMJWE.js.map +0 -1
- package/dist/chunk-HHTCDFZC.js.map +0 -1
- package/dist/chunk-J5BA3BQ6.cjs.map +0 -1
- package/dist/chunk-YAFS2QFZ.cjs.map +0 -1
- package/dist/chunk-Z2H7KECK.cjs.map +0 -1
- package/dist/chunk-Z6OUCS2K.cjs +0 -340
- package/dist/chunk-Z6OUCS2K.cjs.map +0 -1
- package/dist/rand-BszBST4s.d.ts +0 -2140
- package/dist/rand-DOH_aMvm.d.cts +0 -2140
- /package/dist/{chunk-62XUO5LB.js.map → chunk-3X6IAJUQ.js.map} +0 -0
- /package/dist/{chunk-7RJ6P7MI.js.map → chunk-6S6362D2.js.map} +0 -0
- /package/dist/{chunk-SVYE5HIM.js.map → chunk-EQQMGO42.js.map} +0 -0
- /package/dist/{chunk-OXSV64JX.js.map → chunk-G6IKY6PL.js.map} +0 -0
- /package/dist/{chunk-UYQUPUR6.js.map → chunk-HUO3TI4C.js.map} +0 -0
- /package/dist/{chunk-2HC4DRF4.js.map → chunk-LLFHCSU2.js.map} +0 -0
- /package/dist/{chunk-ILYFOJUN.js.map → chunk-OIBIRXRG.js.map} +0 -0
- /package/dist/{chunk-FWEO3HSL.js.map → chunk-PQQF5KOW.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class;
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkPRSRYHQDcjs = require('../chunk-PRSRYHQD.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -31,7 +31,9 @@ var _chunkWAJQKWQUcjs = require('../chunk-WAJQKWQU.cjs');
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _chunk5OOIUXNJcjs = require('../chunk-5OOIUXNJ.cjs');
|
|
35
|
+
require('../chunk-2XS6LTUP.cjs');
|
|
36
|
+
require('../chunk-Q6OUXEK3.cjs');
|
|
35
37
|
|
|
36
38
|
|
|
37
39
|
|
|
@@ -48,9 +50,15 @@ require('../chunk-IZ4WRXZA.cjs');
|
|
|
48
50
|
|
|
49
51
|
var _chunkJODTP4DPcjs = require('../chunk-JODTP4DP.cjs');
|
|
50
52
|
require('../chunk-RIWPYSKU.cjs');
|
|
53
|
+
require('../chunk-QBWEH3IM.cjs');
|
|
54
|
+
require('../chunk-SYPFUL5B.cjs');
|
|
55
|
+
require('../chunk-O7LUD7MH.cjs');
|
|
56
|
+
require('../chunk-643B2HKC.cjs');
|
|
57
|
+
require('../chunk-FD4LPFAE.cjs');
|
|
51
58
|
|
|
52
59
|
|
|
53
60
|
var _chunkEMQWJA3Gcjs = require('../chunk-EMQWJA3G.cjs');
|
|
61
|
+
require('../chunk-MKA3AHLV.cjs');
|
|
54
62
|
|
|
55
63
|
|
|
56
64
|
var _chunkQKLRAA4Tcjs = require('../chunk-QKLRAA4T.cjs');
|
|
@@ -573,7 +581,7 @@ function smoothMotionTimes(points, start, duration, pacing = "even") {
|
|
|
573
581
|
function motionTextLayout(nodes, id) {
|
|
574
582
|
const group = _optionalChain([nodes, 'access', _5 => _5.get, 'call', _6 => _6(id), 'optionalAccess', _7 => _7.node]);
|
|
575
583
|
if (!group || group.type !== "group") return null;
|
|
576
|
-
const letters =
|
|
584
|
+
const letters = _chunk5OOIUXNJcjs.collectPathNodes.call(void 0, group).map((p) => ({ id: p.id, b: _optionalChain([nodes, 'access', _8 => _8.get, 'call', _9 => _9(p.id), 'optionalAccess', _10 => _10.bounds]) })).filter((l) => !!l.b && l.b.width + l.b.height > 0);
|
|
577
585
|
if (!letters.length) return null;
|
|
578
586
|
const lines = [];
|
|
579
587
|
for (const l of [...letters].sort((a, c) => a.b.y + a.b.height / 2 - (c.b.y + c.b.height / 2))) {
|
|
@@ -658,21 +666,21 @@ function indexMotionNodes(nodes) {
|
|
|
658
666
|
const out = /* @__PURE__ */ new Map();
|
|
659
667
|
const walk = (list, parentWorld, ancestors) => {
|
|
660
668
|
for (const node of list) {
|
|
661
|
-
const local =
|
|
662
|
-
const bounds =
|
|
669
|
+
const local = _chunk5OOIUXNJcjs.vectorNodeBounds.call(void 0, node);
|
|
670
|
+
const bounds = _chunk5OOIUXNJcjs.vectorNodeBounds.call(void 0, node, parentWorld);
|
|
663
671
|
const center = local ? { x: local.x + local.width / 2, y: local.y + local.height / 2 } : { x: 0, y: 0 };
|
|
664
672
|
if (!out.has(node.id)) out.set(node.id, { node, ancestors, parentWorld, center, bounds, box: local });
|
|
665
|
-
if (node.type === "group") walk(node.children,
|
|
673
|
+
if (node.type === "group") walk(node.children, _chunk5OOIUXNJcjs.multiplyMatrices.call(void 0, _chunk5OOIUXNJcjs.nodeMatrix.call(void 0, node), parentWorld), [...ancestors, node.id]);
|
|
666
674
|
}
|
|
667
675
|
};
|
|
668
|
-
walk(nodes,
|
|
676
|
+
walk(nodes, _chunk5OOIUXNJcjs.IDENTITY_MATRIX, []);
|
|
669
677
|
indexCache.set(nodes, out);
|
|
670
678
|
return out;
|
|
671
679
|
}
|
|
672
680
|
var solid = (paint) => typeof paint === "string" && paint !== "none" ? paint : void 0;
|
|
673
681
|
function firstPaint(node, key) {
|
|
674
682
|
if (node.type === "path") return solid(node[key]);
|
|
675
|
-
for (const p of
|
|
683
|
+
for (const p of _chunk5OOIUXNJcjs.collectPathNodes.call(void 0, node)) {
|
|
676
684
|
const s = solid(p[key]);
|
|
677
685
|
if (s) return s;
|
|
678
686
|
}
|
|
@@ -680,7 +688,7 @@ function firstPaint(node, key) {
|
|
|
680
688
|
}
|
|
681
689
|
function strokeReach(node) {
|
|
682
690
|
let reach = 0;
|
|
683
|
-
for (const p of node.type === "path" ? [node] :
|
|
691
|
+
for (const p of node.type === "path" ? [node] : _chunk5OOIUXNJcjs.collectPathNodes.call(void 0, node)) {
|
|
684
692
|
if (p.stroke == null || p.stroke === "none") continue;
|
|
685
693
|
const width = _nullishCoalesce(p.strokeWidth, () => ( 1));
|
|
686
694
|
reach = Math.max(reach, p.strokeAlign === "outside" ? width : p.strokeAlign === "inside" ? 0 : width / 2);
|
|
@@ -750,7 +758,7 @@ function motionRestValue(entry, property, artwork) {
|
|
|
750
758
|
case "stroke":
|
|
751
759
|
return _nullishCoalesce((node && firstPaint(node, property)), () => ( "transparent"));
|
|
752
760
|
case "strokeWidth": {
|
|
753
|
-
const path = _optionalChain([node, 'optionalAccess', _13 => _13.type]) === "path" ? node : node ?
|
|
761
|
+
const path = _optionalChain([node, 'optionalAccess', _13 => _13.type]) === "path" ? node : node ? _chunk5OOIUXNJcjs.collectPathNodes.call(void 0, node)[0] : void 0;
|
|
754
762
|
return _nullishCoalesce(_optionalChain([path, 'optionalAccess', _14 => _14.strokeWidth]), () => ( 1));
|
|
755
763
|
}
|
|
756
764
|
case "shape":
|
|
@@ -861,12 +869,12 @@ function resolveMotionCamera(camera, scene) {
|
|
|
861
869
|
const r = camera;
|
|
862
870
|
return { x: r.x, y: r.y, width: r.width, height: r.height };
|
|
863
871
|
}
|
|
864
|
-
function motionPathLength(node, parentWorld =
|
|
872
|
+
function motionPathLength(node, parentWorld = _chunk5OOIUXNJcjs.IDENTITY_MATRIX) {
|
|
865
873
|
let longest = 0;
|
|
866
|
-
const paths = node.type === "path" ? [node] :
|
|
874
|
+
const paths = node.type === "path" ? [node] : _chunk5OOIUXNJcjs.collectPathNodes.call(void 0, node);
|
|
867
875
|
for (const p of paths) {
|
|
868
876
|
try {
|
|
869
|
-
longest = Math.max(longest, _chunkBJTCSLF6cjs.bezierPathLength.call(void 0,
|
|
877
|
+
longest = Math.max(longest, _chunkBJTCSLF6cjs.bezierPathLength.call(void 0, _chunk5OOIUXNJcjs.vectorPathWorldBezier.call(void 0, p, parentWorld, { effects: false })));
|
|
870
878
|
} catch (e2) {
|
|
871
879
|
}
|
|
872
880
|
}
|
|
@@ -1119,12 +1127,12 @@ function compileMotionScene(scene) {
|
|
|
1119
1127
|
const order2 = _nullishCoalesce(o.order, () => ( "together"));
|
|
1120
1128
|
const pace = _nullishCoalesce(o.pace, () => ( "time"));
|
|
1121
1129
|
if (order2 === "together" && pace === "time") return null;
|
|
1122
|
-
const paths = entry.node.type === "path" ? [entry.node] :
|
|
1130
|
+
const paths = entry.node.type === "path" ? [entry.node] : _chunk5OOIUXNJcjs.collectPathNodes.call(void 0, entry.node);
|
|
1123
1131
|
let list = paths.map((p) => {
|
|
1124
1132
|
const at = nodes.get(p.id);
|
|
1125
1133
|
let first = { x: 0, y: 0 };
|
|
1126
1134
|
try {
|
|
1127
|
-
const m =
|
|
1135
|
+
const m = _chunk5OOIUXNJcjs.vectorPathWorldBezier.call(void 0, p, _nullishCoalesce(_optionalChain([at, 'optionalAccess', _41 => _41.parentWorld]), () => ( _chunk5OOIUXNJcjs.IDENTITY_MATRIX)), { effects: false })[0];
|
|
1128
1136
|
if (m && m.type === "M") first = { x: m.x, y: m.y };
|
|
1129
1137
|
} catch (e3) {
|
|
1130
1138
|
}
|
|
@@ -1236,17 +1244,17 @@ function compileMotionScene(scene) {
|
|
|
1236
1244
|
let dx = _nullishCoalesce(_optionalChain([command3, 'access', _44 => _44.by, 'optionalAccess', _45 => _45.x]), () => ( 0));
|
|
1237
1245
|
let dy = _nullishCoalesce(_optionalChain([command3, 'access', _46 => _46.by, 'optionalAccess', _47 => _47.y]), () => ( 0));
|
|
1238
1246
|
if (command3.to) {
|
|
1239
|
-
const inv =
|
|
1240
|
-
const target =
|
|
1247
|
+
const inv = _chunk5OOIUXNJcjs.invertMatrix.call(void 0, entry.parentWorld);
|
|
1248
|
+
const target = _chunk5OOIUXNJcjs.applyMatrix.call(void 0, inv, command3.to);
|
|
1241
1249
|
dx = target.x - (entry.center.x + num2("x"));
|
|
1242
1250
|
dy = target.y - (entry.center.y + num2("y"));
|
|
1243
1251
|
}
|
|
1244
1252
|
if (_optionalChain([command3, 'access', _48 => _48.via, 'optionalAccess', _49 => _49.length])) {
|
|
1245
|
-
const inv =
|
|
1253
|
+
const inv = _chunk5OOIUXNJcjs.invertMatrix.call(void 0, entry.parentWorld);
|
|
1246
1254
|
const x0 = num2("x");
|
|
1247
1255
|
const y0 = num2("y");
|
|
1248
1256
|
const add = command3.blend === "add";
|
|
1249
|
-
const offsets = [{ x: 0, y: 0 }, ...command3.via.map((p) =>
|
|
1257
|
+
const offsets = [{ x: 0, y: 0 }, ...command3.via.map((p) => _chunk5OOIUXNJcjs.applyMatrix.call(void 0, inv, p)).map((p) => ({ x: p.x - entry.center.x - x0, y: p.y - entry.center.y - y0 })), { x: dx, y: dy }];
|
|
1250
1258
|
const times = smoothMotionTimes(offsets, start, end - start, _nullishCoalesce(command3.pacing, () => ( "even")));
|
|
1251
1259
|
for (const axis of ["x", "y"]) {
|
|
1252
1260
|
const base = add ? 0 : axis === "x" ? x0 : y0;
|
|
@@ -1389,13 +1397,13 @@ function morphBetween(a, b) {
|
|
|
1389
1397
|
let inner = morphCache.get(a);
|
|
1390
1398
|
if (!inner) morphCache.set(a, inner = /* @__PURE__ */ new WeakMap());
|
|
1391
1399
|
let morph = inner.get(b);
|
|
1392
|
-
if (!morph) inner.set(b, morph =
|
|
1400
|
+
if (!morph) inner.set(b, morph = _chunkPRSRYHQDcjs.createVectorMorph.call(void 0, a, b, { id: a.id }));
|
|
1393
1401
|
return morph;
|
|
1394
1402
|
}
|
|
1395
1403
|
function shapeIn(entry, shape) {
|
|
1396
1404
|
if (shape === entry) return entry.node;
|
|
1397
|
-
const m =
|
|
1398
|
-
return { ...shape.node, ...
|
|
1405
|
+
const m = _chunk5OOIUXNJcjs.multiplyMatrices.call(void 0, _chunk5OOIUXNJcjs.multiplyMatrices.call(void 0, _chunk5OOIUXNJcjs.nodeMatrix.call(void 0, shape.node), shape.parentWorld), _chunk5OOIUXNJcjs.invertMatrix.call(void 0, entry.parentWorld));
|
|
1406
|
+
return { ...shape.node, ..._chunk5OOIUXNJcjs.isIdentityMatrix.call(void 0, m) ? { transform: void 0 } : { transform: m } };
|
|
1399
1407
|
}
|
|
1400
1408
|
function shapeAt(entry, timeline, nodes, time) {
|
|
1401
1409
|
const track = timeline.tracks.get(motionTrackKey(entry.node.id, "shape"));
|
|
@@ -1415,7 +1423,7 @@ function shapeAt(entry, timeline, nodes, time) {
|
|
|
1415
1423
|
function motionFollowRoute(entry, path) {
|
|
1416
1424
|
if (!path || path.node.type !== "path") return null;
|
|
1417
1425
|
try {
|
|
1418
|
-
return _chunkBJTCSLF6cjs.transformBezierPath.call(void 0,
|
|
1426
|
+
return _chunkBJTCSLF6cjs.transformBezierPath.call(void 0, _chunk5OOIUXNJcjs.vectorPathWorldBezier.call(void 0, path.node, path.parentWorld, { effects: false }), _chunk5OOIUXNJcjs.invertMatrix.call(void 0, entry.parentWorld));
|
|
1419
1427
|
} catch (e4) {
|
|
1420
1428
|
return null;
|
|
1421
1429
|
}
|
|
@@ -1449,9 +1457,9 @@ function motionNodeOffset(entry, timeline, time, nodes = indexMotionNodes([entry
|
|
|
1449
1457
|
const scaleX = read("scaleX", 1);
|
|
1450
1458
|
const scaleY = read("scaleY", 1);
|
|
1451
1459
|
const c = entry.center;
|
|
1452
|
-
let matrix =
|
|
1460
|
+
let matrix = _chunk5OOIUXNJcjs.multiplyMatrices.call(void 0, _chunk5OOIUXNJcjs.multiplyMatrices.call(void 0, _chunk5OOIUXNJcjs.scaleMatrix.call(void 0, scaleX, scaleY, c), _chunk5OOIUXNJcjs.rotateMatrix.call(void 0, rotation, c)), _chunk5OOIUXNJcjs.translateMatrix.call(void 0, dx, dy));
|
|
1453
1461
|
const along = follow ? followAt(entry, timeline, nodes, time) : null;
|
|
1454
|
-
if (along) matrix =
|
|
1462
|
+
if (along) matrix = _chunk5OOIUXNJcjs.multiplyMatrices.call(void 0, matrix, _chunk5OOIUXNJcjs.multiplyMatrices.call(void 0, _chunk5OOIUXNJcjs.multiplyMatrices.call(void 0, _chunk5OOIUXNJcjs.translateMatrix.call(void 0, -c.x, -c.y), _chunk5OOIUXNJcjs.rotateMatrix.call(void 0, along.angle)), _chunk5OOIUXNJcjs.translateMatrix.call(void 0, along.x, along.y)));
|
|
1455
1463
|
return { matrix, dx, dy, rotation, scaleX, scaleY, follow: along };
|
|
1456
1464
|
}
|
|
1457
1465
|
function motionNodeClips(id, timeline, time) {
|
|
@@ -1518,7 +1526,7 @@ function motionFrameAt(scene, time, options = {}) {
|
|
|
1518
1526
|
const start = Math.min(1, Math.max(0, typeof drawStart === "number" ? drawStart : 0));
|
|
1519
1527
|
const end = Math.min(1, Math.max(0, typeof drawEnd === "number" ? drawEnd : 1));
|
|
1520
1528
|
if (start > 0 || end < 1) {
|
|
1521
|
-
const trim =
|
|
1529
|
+
const trim = _chunk5OOIUXNJcjs.createVectorEffect.call(void 0, "trim", MOTION_DRAW_EFFECT_ID, { start: tidy(start * 100), end: tidy(end * 100) });
|
|
1522
1530
|
p = { ...p, effects: [trim, ...(_nullishCoalesce(p.effects, () => ( []))).filter((e) => e.id !== MOTION_DRAW_EFFECT_ID)] };
|
|
1523
1531
|
}
|
|
1524
1532
|
}
|
|
@@ -1532,8 +1540,8 @@ function motionFrameAt(scene, time, options = {}) {
|
|
|
1532
1540
|
if (o >= 1) delete out.opacity;
|
|
1533
1541
|
}
|
|
1534
1542
|
const offset = options.offsets === false ? null : motionNodeOffset(entry, timeline, time, nodes);
|
|
1535
|
-
if (offset && !
|
|
1536
|
-
const m =
|
|
1543
|
+
if (offset && !_chunk5OOIUXNJcjs.isIdentityMatrix.call(void 0, offset.matrix)) {
|
|
1544
|
+
const m = _chunk5OOIUXNJcjs.multiplyMatrices.call(void 0, _chunk5OOIUXNJcjs.nodeMatrix.call(void 0, out), offset.matrix).map(tidy);
|
|
1537
1545
|
out = { ...out, transform: m };
|
|
1538
1546
|
}
|
|
1539
1547
|
return out;
|
|
@@ -1553,7 +1561,7 @@ function motionFrameToSvg(scene, time, options = {}) {
|
|
|
1553
1561
|
const wrap = { ...options.wrap };
|
|
1554
1562
|
for (const [id, clips] of Object.entries(frame.clips))
|
|
1555
1563
|
wrap[id] = [..._nullishCoalesce(wrap[id], () => ( [])), ...clips.map((clip, i) => ({ clip: { id: `${prefix}reveal-${id}-${i}`, shape: clip.shape, attrs: motionClipAttrs(clip) } }))];
|
|
1556
|
-
return withViewBox(
|
|
1564
|
+
return withViewBox(_chunk5OOIUXNJcjs.vectorDocumentToSvg.call(void 0, frame.document, { ...options, wrap }), frame.camera);
|
|
1557
1565
|
}
|
|
1558
1566
|
function withViewBox(svg, box) {
|
|
1559
1567
|
const f = (n) => String(Math.round(n * 1e3) / 1e3);
|
|
@@ -1736,8 +1744,8 @@ function visibleAt(timeline, id, time, node) {
|
|
|
1736
1744
|
if (Array.isArray(rect) && (rect[2] <= 1e-4 || rect[3] <= 1e-4)) return false;
|
|
1737
1745
|
const circle = clip("clipCircle");
|
|
1738
1746
|
if (Array.isArray(circle) && circle[2] <= 1e-4) return false;
|
|
1739
|
-
const hasFill = node.type === "path" ? !!node.fill && node.fill !== "none" :
|
|
1740
|
-
const drawn = num2("drawEnd", 1) > 0.01 && (node.type === "path" ||
|
|
1747
|
+
const hasFill = node.type === "path" ? !!node.fill && node.fill !== "none" : _chunk5OOIUXNJcjs.collectPathNodes.call(void 0, node).some((p) => p.fill && p.fill !== "none");
|
|
1748
|
+
const drawn = num2("drawEnd", 1) > 0.01 && (node.type === "path" || _chunk5OOIUXNJcjs.collectPathNodes.call(void 0, node).length === 0 || _chunk5OOIUXNJcjs.collectPathNodes.call(void 0, node).some((p) => {
|
|
1741
1749
|
const v = trackValue(timeline.tracks.get(motionTrackKey(p.id, "drawEnd")), time);
|
|
1742
1750
|
return typeof v !== "number" || v > 0.01;
|
|
1743
1751
|
}));
|
|
@@ -1823,7 +1831,7 @@ function checkMotionScene(scene) {
|
|
|
1823
1831
|
}
|
|
1824
1832
|
for (const id of targets) {
|
|
1825
1833
|
const node = nodes.get(id).node;
|
|
1826
|
-
const paths = node.type === "path" ? [node] :
|
|
1834
|
+
const paths = node.type === "path" ? [node] : _chunk5OOIUXNJcjs.collectPathNodes.call(void 0, node);
|
|
1827
1835
|
if (paths.some((p) => p[key] !== void 0 && p[key] !== null && typeof p[key] !== "string"))
|
|
1828
1836
|
issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "paint-not-color", `"${id}" has a gradient ${key}; it switches to ${color} at the end instead of blending.`, { ...where, ids: [id] }));
|
|
1829
1837
|
}
|
|
@@ -1836,7 +1844,7 @@ function checkMotionScene(scene) {
|
|
|
1836
1844
|
else
|
|
1837
1845
|
for (const id of targets) {
|
|
1838
1846
|
const node = nodes.get(id).node;
|
|
1839
|
-
const paths = node.type === "path" ? [node] :
|
|
1847
|
+
const paths = node.type === "path" ? [node] : _chunk5OOIUXNJcjs.collectPathNodes.call(void 0, node);
|
|
1840
1848
|
if (paths.some((p) => typeof p[key] !== "string"))
|
|
1841
1849
|
issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "paint-not-color", `"${id}" has a gradient or no ${key}, so a colour pulse cannot tint it; give it a solid ${key} or pulse the ${key === "fill" ? "stroke" : "fill"}.`, { ...where, ids: [id] }));
|
|
1842
1850
|
}
|
|
@@ -2420,7 +2428,7 @@ function toFlairSvgMotion(scene, options = {}) {
|
|
|
2420
2428
|
raw: (t) => transformAt(t, true)
|
|
2421
2429
|
});
|
|
2422
2430
|
}
|
|
2423
|
-
const paths = node.type === "path" ? [node] :
|
|
2431
|
+
const paths = node.type === "path" ? [node] : _chunk5OOIUXNJcjs.collectPathNodes.call(void 0, node);
|
|
2424
2432
|
for (const path of paths) {
|
|
2425
2433
|
if (pathsSeen.has(path.id)) continue;
|
|
2426
2434
|
pathsSeen.add(path.id);
|
|
@@ -2442,7 +2450,7 @@ function toFlairSvgMotion(scene, options = {}) {
|
|
|
2442
2450
|
if (shapeSegments.length) {
|
|
2443
2451
|
if (node.type !== "path") notes.push(`"${id}" is a group: its morph or effect animation is not exported (Flair tweens one path's "d").`);
|
|
2444
2452
|
else {
|
|
2445
|
-
const inverse =
|
|
2453
|
+
const inverse = _chunk5OOIUXNJcjs.invertMatrix.call(void 0, _chunk5OOIUXNJcjs.nodeMatrix.call(void 0, node));
|
|
2446
2454
|
channels.push({
|
|
2447
2455
|
id,
|
|
2448
2456
|
kind: "attr",
|
|
@@ -2451,9 +2459,9 @@ function toFlairSvgMotion(scene, options = {}) {
|
|
|
2451
2459
|
exact: () => false,
|
|
2452
2460
|
value: (t) => {
|
|
2453
2461
|
const frame = motionFrameAt(scene, t, { draw: false, offsets: false });
|
|
2454
|
-
const now =
|
|
2462
|
+
const now = _chunk5OOIUXNJcjs.expandVectorAppearance.call(void 0, _optionalChain([indexMotionNodes, 'call', _108 => _108(frame.document.nodes), 'access', _109 => _109.get, 'call', _110 => _110(id), 'optionalAccess', _111 => _111.node]));
|
|
2455
2463
|
if (!now || now.type !== "path") return "";
|
|
2456
|
-
const bezier = _chunkBJTCSLF6cjs.transformBezierPath.call(void 0,
|
|
2464
|
+
const bezier = _chunkBJTCSLF6cjs.transformBezierPath.call(void 0, _chunk5OOIUXNJcjs.vectorPathWorldBezier.call(void 0, now, _chunk5OOIUXNJcjs.IDENTITY_MATRIX, { effects: false }), inverse);
|
|
2457
2465
|
return _chunkBJTCSLF6cjs.bezierPathToSvg.call(void 0, bezier, { precision: Math.min(precision, 2) });
|
|
2458
2466
|
}
|
|
2459
2467
|
});
|
|
@@ -2560,7 +2568,7 @@ function toFlairSvgMotion(scene, options = {}) {
|
|
|
2560
2568
|
}
|
|
2561
2569
|
if (scene.motionBlur) notes.push("Motion blur is drawn on the stage only; Flair plays the scene sharp.");
|
|
2562
2570
|
if (trigger && (_nullishCoalesce(scene.loop, () => ( "none"))) !== "none") notes.push(`The scene plays on ${trigger}, so its loop does not apply in Flair.`);
|
|
2563
|
-
let svg =
|
|
2571
|
+
let svg = _chunk5OOIUXNJcjs.vectorDocumentToSvg.call(void 0, { ...scene.artwork, nodes: _chunk5OOIUXNJcjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) }, { pretty: false, precision, wrap });
|
|
2564
2572
|
if (routes.length) svg = svg.replace(/^(<svg[^>]*>)/, `$1<defs>${routes.join("")}</defs>`);
|
|
2565
2573
|
let motion = { svg, animate };
|
|
2566
2574
|
if (_optionalChain([scene, 'access', _114 => _114.controls, 'optionalAccess', _115 => _115.length])) {
|
|
@@ -2644,14 +2652,14 @@ function easingOf(ease, fallback) {
|
|
|
2644
2652
|
return fallback;
|
|
2645
2653
|
}
|
|
2646
2654
|
function poseOf(value, entry) {
|
|
2647
|
-
const t =
|
|
2648
|
-
const o =
|
|
2655
|
+
const t = _chunk5OOIUXNJcjs.parseSvgTransform.call(void 0, String(value));
|
|
2656
|
+
const o = _chunk5OOIUXNJcjs.multiplyMatrices.call(void 0, _nullishCoalesce(_chunk5OOIUXNJcjs.invertMatrix.call(void 0, _chunk5OOIUXNJcjs.nodeMatrix.call(void 0, entry.node)), () => ( [1, 0, 0, 1, 0, 0])), t);
|
|
2649
2657
|
const sx = Math.hypot(o[0], o[1]);
|
|
2650
2658
|
if (!(sx > 1e-9)) return null;
|
|
2651
2659
|
const sy = (o[0] * o[3] - o[1] * o[2]) / sx;
|
|
2652
2660
|
if (Math.abs(o[2] + o[1] / sx * sy) > 1e-6 || Math.abs(o[3] - o[0] / sx * sy) > 1e-6) return null;
|
|
2653
2661
|
const c = entry.center;
|
|
2654
|
-
const moved =
|
|
2662
|
+
const moved = _chunk5OOIUXNJcjs.applyMatrix.call(void 0, o, c);
|
|
2655
2663
|
return { dx: moved.x - c.x, dy: moved.y - c.y, rotation: Math.atan2(o[1], o[0]) * 180 / Math.PI, sx, sy };
|
|
2656
2664
|
}
|
|
2657
2665
|
var near = (a, b, eps = 1e-6) => Math.abs(a - b) < eps;
|
|
@@ -2736,7 +2744,7 @@ function fromFlairSvgMotion(input, options = {}) {
|
|
|
2736
2744
|
const notes = [];
|
|
2737
2745
|
if (!input || typeof input.svg !== "string") throw new Error('Give a Flair SvgMotion: { svg: "<svg \u2026>", animate: [ \u2026 ] }.');
|
|
2738
2746
|
const { motion, controls } = resolvePlaceholders(input, notes);
|
|
2739
|
-
const artwork =
|
|
2747
|
+
const artwork = _chunk5OOIUXNJcjs.parseVectorSvg.call(void 0, motion.svg);
|
|
2740
2748
|
const nodes = indexMotionNodes(artwork.nodes);
|
|
2741
2749
|
const byStep = /* @__PURE__ */ new Map();
|
|
2742
2750
|
for (const anim of _nullishCoalesce(motion.animate, () => ( []))) {
|
|
@@ -2983,9 +2991,9 @@ function toLottie(scene, options = {}) {
|
|
|
2983
2991
|
const items = [];
|
|
2984
2992
|
const shapeSegments = [...timeline.tracks.entries()].filter(([k]) => k.startsWith(`${path.id}\0`) && (k.endsWith("\0shape") || k.includes("\0effect:"))).flatMap(([, v]) => v);
|
|
2985
2993
|
const geometryAt = (t) => {
|
|
2986
|
-
if (!shapeSegments.length) return
|
|
2994
|
+
if (!shapeSegments.length) return _chunk5OOIUXNJcjs.vectorPathWorldBezier.call(void 0, path);
|
|
2987
2995
|
const now = _optionalChain([indexMotionNodes, 'call', _124 => _124(motionFrameAt(scene, t, { draw: false, offsets: false }).document.nodes), 'access', _125 => _125.get, 'call', _126 => _126(path.id), 'optionalAccess', _127 => _127.node]);
|
|
2988
|
-
return now && now.type === "path" ?
|
|
2996
|
+
return now && now.type === "path" ? _chunk5OOIUXNJcjs.vectorPathWorldBezier.call(void 0, _chunk5OOIUXNJcjs.expandVectorAppearances.call(void 0, [now])[0]) : _chunk5OOIUXNJcjs.vectorPathWorldBezier.call(void 0, path);
|
|
2989
2997
|
};
|
|
2990
2998
|
const rest = lottieContours(_chunkBJTCSLF6cjs.toBezierPath.call(void 0, geometryAt(0)), round2);
|
|
2991
2999
|
rest.forEach((contour, n) => {
|
|
@@ -3058,13 +3066,13 @@ function toLottie(scene, options = {}) {
|
|
|
3058
3066
|
const innerTr = STATIC_TR();
|
|
3059
3067
|
if (node.type === "path") inner = [...pathShapes(node)];
|
|
3060
3068
|
else if (node.type === "text" || node.type === "instance") {
|
|
3061
|
-
const drawn =
|
|
3069
|
+
const drawn = _chunk5OOIUXNJcjs.expandVectorAppearance.call(void 0, node);
|
|
3062
3070
|
inner = drawn.type === "path" ? [...pathShapes(drawn)] : drawn.children.filter((c) => c.type === "path").reverse().flatMap((c) => [...pathShapes(c)]);
|
|
3063
|
-
notes.push(`"${node.id}": text is exported as its outlines${
|
|
3071
|
+
notes.push(`"${node.id}": text is exported as its outlines${_chunk5OOIUXNJcjs.vectorTextHasOutlines.call(void 0, ) ? "" : " (glyph boxes: set an outline text shaper for real glyphs)"}.`);
|
|
3064
3072
|
} else {
|
|
3065
3073
|
inner = shown(node.children).reverse().map(nodeGroup);
|
|
3066
|
-
const m =
|
|
3067
|
-
if (m !==
|
|
3074
|
+
const m = _chunk5OOIUXNJcjs.nodeMatrix.call(void 0, node);
|
|
3075
|
+
if (m !== _chunk5OOIUXNJcjs.IDENTITY_MATRIX) {
|
|
3068
3076
|
const parts = staticParts(m);
|
|
3069
3077
|
if (!parts) notes.push(`"${node.id}": its transform skews, which is not exported; it is drawn without the skew.`);
|
|
3070
3078
|
else {
|
|
@@ -3077,7 +3085,7 @@ function toLottie(scene, options = {}) {
|
|
|
3077
3085
|
const body = { ty: "gr", nm: `${node.id} (own)`, it: [...inner, innerTr] };
|
|
3078
3086
|
return { ty: "gr", nm: _nullishCoalesce(node.name, () => ( node.id)), it: [body, poseTransform(entry)] };
|
|
3079
3087
|
};
|
|
3080
|
-
const artwork = { ...scene.artwork, nodes:
|
|
3088
|
+
const artwork = { ...scene.artwork, nodes: _chunk5OOIUXNJcjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) };
|
|
3081
3089
|
const content = shown(artwork.nodes).reverse().map(nodeGroup);
|
|
3082
3090
|
if (artwork.background && rgba(artwork.background))
|
|
3083
3091
|
content.push({ ty: "gr", nm: "Background", it: [{ ty: "rc", nm: "Background", p: { a: 0, k: [artwork.width / 2, artwork.height / 2] }, s: { a: 0, k: [artwork.width, artwork.height] }, r: { a: 0, k: 0 } }, { ty: "fl", c: { a: 0, k: rgba(artwork.background).map(round2) }, o: { a: 0, k: 100 }, r: 1 }, STATIC_TR()] });
|
|
@@ -3176,11 +3184,11 @@ function preset(prst, w, h) {
|
|
|
3176
3184
|
const poly = (pts) => [{ closed: true, anchors: pts.map(([x, y]) => ({ x, y })) }];
|
|
3177
3185
|
switch (prst) {
|
|
3178
3186
|
case "rect":
|
|
3179
|
-
return [
|
|
3187
|
+
return [_chunk5OOIUXNJcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
|
|
3180
3188
|
case "roundRect":
|
|
3181
|
-
return [
|
|
3189
|
+
return [_chunk5OOIUXNJcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h }, Math.min(w, h) * 0.16667)];
|
|
3182
3190
|
case "ellipse":
|
|
3183
|
-
return [
|
|
3191
|
+
return [_chunk5OOIUXNJcjs.ellipseSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
|
|
3184
3192
|
case "triangle":
|
|
3185
3193
|
return poly([[w / 2, 0], [w, h], [0, h]]);
|
|
3186
3194
|
case "rtTriangle":
|
|
@@ -3288,7 +3296,7 @@ function shapes(ctx, tree, map) {
|
|
|
3288
3296
|
let subpaths = cust ? custom(cust, w, h) : prst ? preset(prst, w, h) : null;
|
|
3289
3297
|
if (!subpaths) {
|
|
3290
3298
|
if (prst) ctx.notes.push(`"${name}" is a ${prst}, drawn as its bounding rectangle.`);
|
|
3291
|
-
subpaths = [
|
|
3299
|
+
subpaths = [_chunk5OOIUXNJcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
|
|
3292
3300
|
}
|
|
3293
3301
|
const style = kid(el, "style");
|
|
3294
3302
|
const fill = kid(spPr, "noFill") ? null : _nullishCoalesce(colour(ctx, kid(spPr, "solidFill")), () => ( (el.localName === "cxnSp" ? null : colour(ctx, kid(style, "fillRef")))));
|
|
@@ -3526,7 +3534,7 @@ function nextMotionEffectInstance(scene) {
|
|
|
3526
3534
|
walk(scene.artwork.nodes);
|
|
3527
3535
|
for (let i = 1; ; i++) if (!used.has(`fx${i}`)) return `fx${i}`;
|
|
3528
3536
|
}
|
|
3529
|
-
var motionArtworkSvg = (artwork) =>
|
|
3537
|
+
var motionArtworkSvg = (artwork) => _chunk5OOIUXNJcjs.vectorDocumentToSvg.call(void 0, artwork);
|
|
3530
3538
|
var tag = (commands, source) => commands.map((c) => c.type === "wait" ? c : { ...c, source });
|
|
3531
3539
|
function motionCommandsFromEffect(artwork, motion, source) {
|
|
3532
3540
|
const imported = fromFlairSvgMotion({ svg: motionArtworkSvg(artwork), animate: [..._nullishCoalesce(motion.animate, () => ( []))] });
|
|
@@ -4511,7 +4519,7 @@ function createAnimationEditorToolProvider(controller, options = {}) {
|
|
|
4511
4519
|
handler: ({ svg }) => {
|
|
4512
4520
|
let artwork;
|
|
4513
4521
|
try {
|
|
4514
|
-
artwork =
|
|
4522
|
+
artwork = _chunk5OOIUXNJcjs.parseVectorSvg.call(void 0, svg);
|
|
4515
4523
|
} catch (error) {
|
|
4516
4524
|
throw new Error(`The SVG could not be read: ${error.message}. Nothing was changed.`);
|
|
4517
4525
|
}
|