@pixerate/editor 0.66.0 → 0.66.1
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.
|
@@ -2523,6 +2523,7 @@ function toLottie(scene, options = {}) {
|
|
|
2523
2523
|
}
|
|
2524
2524
|
return items;
|
|
2525
2525
|
};
|
|
2526
|
+
const shown = (list) => list.filter((n) => n.visible !== false);
|
|
2526
2527
|
const nodeGroup = (node) => {
|
|
2527
2528
|
const entry = nodes.get(node.id);
|
|
2528
2529
|
if (timeline.tracks.has(motionTrackKey(node.id, "clipRect")) || timeline.tracks.has(motionTrackKey(node.id, "clipCircle")))
|
|
@@ -2531,7 +2532,7 @@ function toLottie(scene, options = {}) {
|
|
|
2531
2532
|
const innerTr = STATIC_TR();
|
|
2532
2533
|
if (node.type === "path") inner = [...pathShapes(node)];
|
|
2533
2534
|
else {
|
|
2534
|
-
inner =
|
|
2535
|
+
inner = shown(node.children).reverse().map(nodeGroup);
|
|
2535
2536
|
const m = nodeMatrix(node);
|
|
2536
2537
|
if (m !== IDENTITY_MATRIX) {
|
|
2537
2538
|
const parts = staticParts(m);
|
|
@@ -2544,10 +2545,10 @@ function toLottie(scene, options = {}) {
|
|
|
2544
2545
|
}
|
|
2545
2546
|
}
|
|
2546
2547
|
const body = { ty: "gr", nm: `${node.id} (own)`, it: [...inner, innerTr] };
|
|
2547
|
-
return { ty: "gr", nm: node.name ?? node.id,
|
|
2548
|
+
return { ty: "gr", nm: node.name ?? node.id, it: [body, poseTransform(entry)] };
|
|
2548
2549
|
};
|
|
2549
2550
|
const artwork = { ...scene.artwork, nodes: expandVectorAppearances(scene.artwork.nodes) };
|
|
2550
|
-
const content =
|
|
2551
|
+
const content = shown(artwork.nodes).reverse().map(nodeGroup);
|
|
2551
2552
|
if (artwork.background && rgba(artwork.background))
|
|
2552
2553
|
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()] });
|
|
2553
2554
|
const camera = track("", "camera");
|