@pixerate/editor 0.138.0 → 0.139.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 +55 -55
- package/dist/animation-editor/index.d.cts +5 -4
- package/dist/animation-editor/index.d.ts +5 -4
- package/dist/animation-editor/index.js +2 -2
- package/dist/{bezier-DPmdGwgR.d.ts → bezier-B6cK8SR6.d.ts} +1 -1
- package/dist/{bezier-CUaH8hcK.d.cts → bezier-CEJ8Uw4O.d.cts} +1 -1
- package/dist/{grain-GCt_O2kv.d.cts → blending-D7jCmjO6.d.cts} +1 -58
- package/dist/{grain-COgYMMHv.d.ts → blending-NgF3qo3d.d.ts} +1 -58
- package/dist/{brushes-B1ABdDAs.d.ts → brushes-CQpL7_Lc.d.ts} +2 -1
- package/dist/{brushes-DnIdJYxN.d.cts → brushes-aEnjqoji.d.cts} +2 -1
- package/dist/canvas/index.d.cts +8 -7
- package/dist/canvas/index.d.ts +8 -7
- package/dist/{chunk-7MN75BXI.cjs → chunk-3QHPFSQM.cjs} +36 -36
- package/dist/{chunk-7MN75BXI.cjs.map → chunk-3QHPFSQM.cjs.map} +1 -1
- package/dist/{chunk-OV7253FC.js → chunk-NI6RORDS.js} +2 -2
- package/dist/{chunk-CM3LJPR3.cjs → chunk-PMEHFHSP.cjs} +82 -82
- package/dist/{chunk-CM3LJPR3.cjs.map → chunk-PMEHFHSP.cjs.map} +1 -1
- package/dist/{chunk-QBARQGSG.js → chunk-QEIN6JQO.js} +2 -2
- package/dist/{chunk-V45ZTW4R.js → chunk-TJBYBSTN.js} +49 -4
- package/dist/chunk-TJBYBSTN.js.map +1 -0
- package/dist/{chunk-SXOTFV3V.cjs → chunk-XFXHA5MU.cjs} +50 -5
- package/dist/chunk-XFXHA5MU.cjs.map +1 -0
- package/dist/effects/index.d.cts +5 -4
- package/dist/effects/index.d.ts +5 -4
- package/dist/{export-BwFRiItd.d.ts → export-0ZaTK__4.d.ts} +5 -5
- package/dist/{export-41rL6Cne.d.ts → export-C45v6MYq.d.ts} +1 -1
- package/dist/{export-DuN3dpCg.d.cts → export-D-7WCDJ9.d.cts} +5 -5
- package/dist/{export-D9mXp05Q.d.cts → export-DSdCfd6O.d.cts} +1 -1
- package/dist/grain-BWmGZxP4.d.cts +58 -0
- package/dist/grain-BWmGZxP4.d.ts +58 -0
- package/dist/{helpers-v6GMazzg.d.cts → helpers-Cavy1TB7.d.cts} +21 -1
- package/dist/{helpers-C-RgeyvH.d.ts → helpers-LZQ4cpg4.d.ts} +21 -1
- package/dist/image-editor/index.cjs +614 -614
- package/dist/image-editor/index.d.cts +12 -11
- package/dist/image-editor/index.d.ts +12 -11
- package/dist/image-editor/index.js +2 -2
- package/dist/{opentype-n99lqxEZ.d.cts → opentype-BpIJhGpj.d.cts} +1 -1
- package/dist/{opentype-T7bkbR2D.d.ts → opentype-CyxDScVz.d.ts} +1 -1
- package/dist/paint/index.d.cts +6 -4
- package/dist/paint/index.d.ts +6 -4
- package/dist/paint-editor/index.cjs +7 -7
- package/dist/paint-editor/index.d.cts +13 -11
- package/dist/paint-editor/index.d.ts +13 -11
- package/dist/paint-editor/index.js +2 -2
- package/dist/{pathfinder-CQlldanv.d.cts → pathfinder-BMQEcS0k.d.cts} +1 -1
- package/dist/{pathfinder-D-V6JLSw.d.ts → pathfinder-CQIxubuP.d.ts} +1 -1
- package/dist/{pool-CZQOrSXZ.d.ts → pool-Cynuj89K.d.ts} +1 -1
- package/dist/{pool-FjZZmZ80.d.cts → pool-DedjxDKo.d.cts} +1 -1
- package/dist/{rand-DJGxSq9d.d.ts → rand-COS4_E1g.d.ts} +1 -1
- package/dist/{rand-D7nfeD1p.d.cts → rand-D1JqpR-p.d.cts} +1 -1
- package/dist/{svg-DPJMUSNt.d.cts → svg-RcixtBFR.d.cts} +2 -2
- package/dist/{svg-CnDCpIy9.d.ts → svg-nWBJEpnk.d.ts} +2 -2
- package/dist/{tools-Ca0kI1qo.d.cts → tools-CL82d7nw.d.cts} +1 -1
- package/dist/{tools-B0wXP5cF.d.ts → tools-DrxgDnXY.d.ts} +1 -1
- package/dist/vector/index.cjs +994 -954
- package/dist/vector/index.cjs.map +1 -1
- package/dist/vector/index.d.cts +44 -18
- package/dist/vector/index.d.ts +44 -18
- package/dist/vector/index.js +54 -14
- package/dist/vector/index.js.map +1 -1
- package/dist/video-editor/index.d.cts +5 -4
- package/dist/video-editor/index.d.ts +5 -4
- package/dist/{warp-C7rMWUgW.d.cts → warp-CHi_P_G6.d.cts} +1 -1
- package/dist/{warp-Doasjpyr.d.ts → warp-CPaHULUL.d.ts} +1 -1
- package/package.json +1 -1
- package/skills/pixerate-vector/SKILL.md +4 -2
- package/dist/chunk-SXOTFV3V.cjs.map +0 -1
- package/dist/chunk-V45ZTW4R.js.map +0 -1
- /package/dist/{chunk-OV7253FC.js.map → chunk-NI6RORDS.js.map} +0 -0
- /package/dist/{chunk-QBARQGSG.js.map → chunk-QEIN6JQO.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 _chunk3QHPFSQMcjs = require('../chunk-3QHPFSQM.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -31,7 +31,7 @@ var _chunkWAJQKWQUcjs = require('../chunk-WAJQKWQU.cjs');
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _chunkXFXHA5MUcjs = require('../chunk-XFXHA5MU.cjs');
|
|
35
35
|
require('../chunk-C46AZEBE.cjs');
|
|
36
36
|
require('../chunk-Q6OUXEK3.cjs');
|
|
37
37
|
|
|
@@ -581,7 +581,7 @@ function smoothMotionTimes(points, start, duration, pacing = "even") {
|
|
|
581
581
|
function motionTextLayout(nodes, id) {
|
|
582
582
|
const group = _optionalChain([nodes, 'access', _5 => _5.get, 'call', _6 => _6(id), 'optionalAccess', _7 => _7.node]);
|
|
583
583
|
if (!group || group.type !== "group") return null;
|
|
584
|
-
const letters =
|
|
584
|
+
const letters = _chunkXFXHA5MUcjs.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);
|
|
585
585
|
if (!letters.length) return null;
|
|
586
586
|
const lines = [];
|
|
587
587
|
for (const l of [...letters].sort((a, c) => a.b.y + a.b.height / 2 - (c.b.y + c.b.height / 2))) {
|
|
@@ -666,21 +666,21 @@ function indexMotionNodes(nodes) {
|
|
|
666
666
|
const out = /* @__PURE__ */ new Map();
|
|
667
667
|
const walk = (list, parentWorld, ancestors) => {
|
|
668
668
|
for (const node of list) {
|
|
669
|
-
const local =
|
|
670
|
-
const bounds =
|
|
669
|
+
const local = _chunkXFXHA5MUcjs.vectorNodeBounds.call(void 0, node);
|
|
670
|
+
const bounds = _chunkXFXHA5MUcjs.vectorNodeBounds.call(void 0, node, parentWorld);
|
|
671
671
|
const center = local ? { x: local.x + local.width / 2, y: local.y + local.height / 2 } : { x: 0, y: 0 };
|
|
672
672
|
if (!out.has(node.id)) out.set(node.id, { node, ancestors, parentWorld, center, bounds, box: local });
|
|
673
|
-
if (node.type === "group") walk(node.children,
|
|
673
|
+
if (node.type === "group") walk(node.children, _chunkXFXHA5MUcjs.multiplyMatrices.call(void 0, _chunkXFXHA5MUcjs.nodeMatrix.call(void 0, node), parentWorld), [...ancestors, node.id]);
|
|
674
674
|
}
|
|
675
675
|
};
|
|
676
|
-
walk(nodes,
|
|
676
|
+
walk(nodes, _chunkXFXHA5MUcjs.IDENTITY_MATRIX, []);
|
|
677
677
|
indexCache.set(nodes, out);
|
|
678
678
|
return out;
|
|
679
679
|
}
|
|
680
680
|
var solid = (paint) => typeof paint === "string" && paint !== "none" ? paint : void 0;
|
|
681
681
|
function firstPaint(node, key) {
|
|
682
682
|
if (node.type === "path") return solid(node[key]);
|
|
683
|
-
for (const p of
|
|
683
|
+
for (const p of _chunkXFXHA5MUcjs.collectPathNodes.call(void 0, node)) {
|
|
684
684
|
const s = solid(p[key]);
|
|
685
685
|
if (s) return s;
|
|
686
686
|
}
|
|
@@ -688,7 +688,7 @@ function firstPaint(node, key) {
|
|
|
688
688
|
}
|
|
689
689
|
function strokeReach(node) {
|
|
690
690
|
let reach = 0;
|
|
691
|
-
for (const p of node.type === "path" ? [node] :
|
|
691
|
+
for (const p of node.type === "path" ? [node] : _chunkXFXHA5MUcjs.collectPathNodes.call(void 0, node)) {
|
|
692
692
|
if (p.stroke == null || p.stroke === "none") continue;
|
|
693
693
|
const width = _nullishCoalesce(p.strokeWidth, () => ( 1));
|
|
694
694
|
reach = Math.max(reach, p.strokeAlign === "outside" ? width : p.strokeAlign === "inside" ? 0 : width / 2);
|
|
@@ -758,7 +758,7 @@ function motionRestValue(entry, property, artwork) {
|
|
|
758
758
|
case "stroke":
|
|
759
759
|
return _nullishCoalesce((node && firstPaint(node, property)), () => ( "transparent"));
|
|
760
760
|
case "strokeWidth": {
|
|
761
|
-
const path = _optionalChain([node, 'optionalAccess', _13 => _13.type]) === "path" ? node : node ?
|
|
761
|
+
const path = _optionalChain([node, 'optionalAccess', _13 => _13.type]) === "path" ? node : node ? _chunkXFXHA5MUcjs.collectPathNodes.call(void 0, node)[0] : void 0;
|
|
762
762
|
return _nullishCoalesce(_optionalChain([path, 'optionalAccess', _14 => _14.strokeWidth]), () => ( 1));
|
|
763
763
|
}
|
|
764
764
|
case "shape":
|
|
@@ -869,12 +869,12 @@ function resolveMotionCamera(camera, scene) {
|
|
|
869
869
|
const r = camera;
|
|
870
870
|
return { x: r.x, y: r.y, width: r.width, height: r.height };
|
|
871
871
|
}
|
|
872
|
-
function motionPathLength(node, parentWorld =
|
|
872
|
+
function motionPathLength(node, parentWorld = _chunkXFXHA5MUcjs.IDENTITY_MATRIX) {
|
|
873
873
|
let longest = 0;
|
|
874
|
-
const paths = node.type === "path" ? [node] :
|
|
874
|
+
const paths = node.type === "path" ? [node] : _chunkXFXHA5MUcjs.collectPathNodes.call(void 0, node);
|
|
875
875
|
for (const p of paths) {
|
|
876
876
|
try {
|
|
877
|
-
longest = Math.max(longest, _chunkBJTCSLF6cjs.bezierPathLength.call(void 0,
|
|
877
|
+
longest = Math.max(longest, _chunkBJTCSLF6cjs.bezierPathLength.call(void 0, _chunkXFXHA5MUcjs.vectorPathWorldBezier.call(void 0, p, parentWorld, { effects: false })));
|
|
878
878
|
} catch (e2) {
|
|
879
879
|
}
|
|
880
880
|
}
|
|
@@ -1127,12 +1127,12 @@ function compileMotionScene(scene) {
|
|
|
1127
1127
|
const order2 = _nullishCoalesce(o.order, () => ( "together"));
|
|
1128
1128
|
const pace = _nullishCoalesce(o.pace, () => ( "time"));
|
|
1129
1129
|
if (order2 === "together" && pace === "time") return null;
|
|
1130
|
-
const paths = entry.node.type === "path" ? [entry.node] :
|
|
1130
|
+
const paths = entry.node.type === "path" ? [entry.node] : _chunkXFXHA5MUcjs.collectPathNodes.call(void 0, entry.node);
|
|
1131
1131
|
let list = paths.map((p) => {
|
|
1132
1132
|
const at = nodes.get(p.id);
|
|
1133
1133
|
let first = { x: 0, y: 0 };
|
|
1134
1134
|
try {
|
|
1135
|
-
const m =
|
|
1135
|
+
const m = _chunkXFXHA5MUcjs.vectorPathWorldBezier.call(void 0, p, _nullishCoalesce(_optionalChain([at, 'optionalAccess', _41 => _41.parentWorld]), () => ( _chunkXFXHA5MUcjs.IDENTITY_MATRIX)), { effects: false })[0];
|
|
1136
1136
|
if (m && m.type === "M") first = { x: m.x, y: m.y };
|
|
1137
1137
|
} catch (e3) {
|
|
1138
1138
|
}
|
|
@@ -1244,17 +1244,17 @@ function compileMotionScene(scene) {
|
|
|
1244
1244
|
let dx = _nullishCoalesce(_optionalChain([command3, 'access', _44 => _44.by, 'optionalAccess', _45 => _45.x]), () => ( 0));
|
|
1245
1245
|
let dy = _nullishCoalesce(_optionalChain([command3, 'access', _46 => _46.by, 'optionalAccess', _47 => _47.y]), () => ( 0));
|
|
1246
1246
|
if (command3.to) {
|
|
1247
|
-
const inv =
|
|
1248
|
-
const target =
|
|
1247
|
+
const inv = _chunkXFXHA5MUcjs.invertMatrix.call(void 0, entry.parentWorld);
|
|
1248
|
+
const target = _chunkXFXHA5MUcjs.applyMatrix.call(void 0, inv, command3.to);
|
|
1249
1249
|
dx = target.x - (entry.center.x + num2("x"));
|
|
1250
1250
|
dy = target.y - (entry.center.y + num2("y"));
|
|
1251
1251
|
}
|
|
1252
1252
|
if (_optionalChain([command3, 'access', _48 => _48.via, 'optionalAccess', _49 => _49.length])) {
|
|
1253
|
-
const inv =
|
|
1253
|
+
const inv = _chunkXFXHA5MUcjs.invertMatrix.call(void 0, entry.parentWorld);
|
|
1254
1254
|
const x0 = num2("x");
|
|
1255
1255
|
const y0 = num2("y");
|
|
1256
1256
|
const add = command3.blend === "add";
|
|
1257
|
-
const offsets = [{ x: 0, y: 0 }, ...command3.via.map((p) =>
|
|
1257
|
+
const offsets = [{ x: 0, y: 0 }, ...command3.via.map((p) => _chunkXFXHA5MUcjs.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 }];
|
|
1258
1258
|
const times = smoothMotionTimes(offsets, start, end - start, _nullishCoalesce(command3.pacing, () => ( "even")));
|
|
1259
1259
|
for (const axis of ["x", "y"]) {
|
|
1260
1260
|
const base = add ? 0 : axis === "x" ? x0 : y0;
|
|
@@ -1397,13 +1397,13 @@ function morphBetween(a, b) {
|
|
|
1397
1397
|
let inner = morphCache.get(a);
|
|
1398
1398
|
if (!inner) morphCache.set(a, inner = /* @__PURE__ */ new WeakMap());
|
|
1399
1399
|
let morph = inner.get(b);
|
|
1400
|
-
if (!morph) inner.set(b, morph =
|
|
1400
|
+
if (!morph) inner.set(b, morph = _chunk3QHPFSQMcjs.createVectorMorph.call(void 0, a, b, { id: a.id }));
|
|
1401
1401
|
return morph;
|
|
1402
1402
|
}
|
|
1403
1403
|
function shapeIn(entry, shape) {
|
|
1404
1404
|
if (shape === entry) return entry.node;
|
|
1405
|
-
const m =
|
|
1406
|
-
return { ...shape.node, ...
|
|
1405
|
+
const m = _chunkXFXHA5MUcjs.multiplyMatrices.call(void 0, _chunkXFXHA5MUcjs.multiplyMatrices.call(void 0, _chunkXFXHA5MUcjs.nodeMatrix.call(void 0, shape.node), shape.parentWorld), _chunkXFXHA5MUcjs.invertMatrix.call(void 0, entry.parentWorld));
|
|
1406
|
+
return { ...shape.node, ..._chunkXFXHA5MUcjs.isIdentityMatrix.call(void 0, m) ? { transform: void 0 } : { transform: m } };
|
|
1407
1407
|
}
|
|
1408
1408
|
function shapeAt(entry, timeline, nodes, time) {
|
|
1409
1409
|
const track = timeline.tracks.get(motionTrackKey(entry.node.id, "shape"));
|
|
@@ -1423,7 +1423,7 @@ function shapeAt(entry, timeline, nodes, time) {
|
|
|
1423
1423
|
function motionFollowRoute(entry, path) {
|
|
1424
1424
|
if (!path || path.node.type !== "path") return null;
|
|
1425
1425
|
try {
|
|
1426
|
-
return _chunkBJTCSLF6cjs.transformBezierPath.call(void 0,
|
|
1426
|
+
return _chunkBJTCSLF6cjs.transformBezierPath.call(void 0, _chunkXFXHA5MUcjs.vectorPathWorldBezier.call(void 0, path.node, path.parentWorld, { effects: false }), _chunkXFXHA5MUcjs.invertMatrix.call(void 0, entry.parentWorld));
|
|
1427
1427
|
} catch (e4) {
|
|
1428
1428
|
return null;
|
|
1429
1429
|
}
|
|
@@ -1457,9 +1457,9 @@ function motionNodeOffset(entry, timeline, time, nodes = indexMotionNodes([entry
|
|
|
1457
1457
|
const scaleX = read("scaleX", 1);
|
|
1458
1458
|
const scaleY = read("scaleY", 1);
|
|
1459
1459
|
const c = entry.center;
|
|
1460
|
-
let matrix =
|
|
1460
|
+
let matrix = _chunkXFXHA5MUcjs.multiplyMatrices.call(void 0, _chunkXFXHA5MUcjs.multiplyMatrices.call(void 0, _chunkXFXHA5MUcjs.scaleMatrix.call(void 0, scaleX, scaleY, c), _chunkXFXHA5MUcjs.rotateMatrix.call(void 0, rotation, c)), _chunkXFXHA5MUcjs.translateMatrix.call(void 0, dx, dy));
|
|
1461
1461
|
const along = follow ? followAt(entry, timeline, nodes, time) : null;
|
|
1462
|
-
if (along) matrix =
|
|
1462
|
+
if (along) matrix = _chunkXFXHA5MUcjs.multiplyMatrices.call(void 0, matrix, _chunkXFXHA5MUcjs.multiplyMatrices.call(void 0, _chunkXFXHA5MUcjs.multiplyMatrices.call(void 0, _chunkXFXHA5MUcjs.translateMatrix.call(void 0, -c.x, -c.y), _chunkXFXHA5MUcjs.rotateMatrix.call(void 0, along.angle)), _chunkXFXHA5MUcjs.translateMatrix.call(void 0, along.x, along.y)));
|
|
1463
1463
|
return { matrix, dx, dy, rotation, scaleX, scaleY, follow: along };
|
|
1464
1464
|
}
|
|
1465
1465
|
function motionNodeClips(id, timeline, time) {
|
|
@@ -1526,7 +1526,7 @@ function motionFrameAt(scene, time, options = {}) {
|
|
|
1526
1526
|
const start = Math.min(1, Math.max(0, typeof drawStart === "number" ? drawStart : 0));
|
|
1527
1527
|
const end = Math.min(1, Math.max(0, typeof drawEnd === "number" ? drawEnd : 1));
|
|
1528
1528
|
if (start > 0 || end < 1) {
|
|
1529
|
-
const trim =
|
|
1529
|
+
const trim = _chunkXFXHA5MUcjs.createVectorEffect.call(void 0, "trim", MOTION_DRAW_EFFECT_ID, { start: tidy(start * 100), end: tidy(end * 100) });
|
|
1530
1530
|
p = { ...p, effects: [trim, ...(_nullishCoalesce(p.effects, () => ( []))).filter((e) => e.id !== MOTION_DRAW_EFFECT_ID)] };
|
|
1531
1531
|
}
|
|
1532
1532
|
}
|
|
@@ -1540,8 +1540,8 @@ function motionFrameAt(scene, time, options = {}) {
|
|
|
1540
1540
|
if (o >= 1) delete out.opacity;
|
|
1541
1541
|
}
|
|
1542
1542
|
const offset = options.offsets === false ? null : motionNodeOffset(entry, timeline, time, nodes);
|
|
1543
|
-
if (offset && !
|
|
1544
|
-
const m =
|
|
1543
|
+
if (offset && !_chunkXFXHA5MUcjs.isIdentityMatrix.call(void 0, offset.matrix)) {
|
|
1544
|
+
const m = _chunkXFXHA5MUcjs.multiplyMatrices.call(void 0, _chunkXFXHA5MUcjs.nodeMatrix.call(void 0, out), offset.matrix).map(tidy);
|
|
1545
1545
|
out = { ...out, transform: m };
|
|
1546
1546
|
}
|
|
1547
1547
|
return out;
|
|
@@ -1561,7 +1561,7 @@ function motionFrameToSvg(scene, time, options = {}) {
|
|
|
1561
1561
|
const wrap = { ...options.wrap };
|
|
1562
1562
|
for (const [id, clips] of Object.entries(frame.clips))
|
|
1563
1563
|
wrap[id] = [..._nullishCoalesce(wrap[id], () => ( [])), ...clips.map((clip, i) => ({ clip: { id: `${prefix}reveal-${id}-${i}`, shape: clip.shape, attrs: motionClipAttrs(clip) } }))];
|
|
1564
|
-
return withViewBox(
|
|
1564
|
+
return withViewBox(_chunkXFXHA5MUcjs.vectorDocumentToSvg.call(void 0, frame.document, { ...options, wrap }), frame.camera);
|
|
1565
1565
|
}
|
|
1566
1566
|
function withViewBox(svg, box) {
|
|
1567
1567
|
const f = (n) => String(Math.round(n * 1e3) / 1e3);
|
|
@@ -1744,8 +1744,8 @@ function visibleAt(timeline, id, time, node) {
|
|
|
1744
1744
|
if (Array.isArray(rect) && (rect[2] <= 1e-4 || rect[3] <= 1e-4)) return false;
|
|
1745
1745
|
const circle = clip("clipCircle");
|
|
1746
1746
|
if (Array.isArray(circle) && circle[2] <= 1e-4) return false;
|
|
1747
|
-
const hasFill = node.type === "path" ? !!node.fill && node.fill !== "none" :
|
|
1748
|
-
const drawn = num2("drawEnd", 1) > 0.01 && (node.type === "path" ||
|
|
1747
|
+
const hasFill = node.type === "path" ? !!node.fill && node.fill !== "none" : _chunkXFXHA5MUcjs.collectPathNodes.call(void 0, node).some((p) => p.fill && p.fill !== "none");
|
|
1748
|
+
const drawn = num2("drawEnd", 1) > 0.01 && (node.type === "path" || _chunkXFXHA5MUcjs.collectPathNodes.call(void 0, node).length === 0 || _chunkXFXHA5MUcjs.collectPathNodes.call(void 0, node).some((p) => {
|
|
1749
1749
|
const v = trackValue(timeline.tracks.get(motionTrackKey(p.id, "drawEnd")), time);
|
|
1750
1750
|
return typeof v !== "number" || v > 0.01;
|
|
1751
1751
|
}));
|
|
@@ -1831,7 +1831,7 @@ function checkMotionScene(scene) {
|
|
|
1831
1831
|
}
|
|
1832
1832
|
for (const id of targets) {
|
|
1833
1833
|
const node = nodes.get(id).node;
|
|
1834
|
-
const paths = node.type === "path" ? [node] :
|
|
1834
|
+
const paths = node.type === "path" ? [node] : _chunkXFXHA5MUcjs.collectPathNodes.call(void 0, node);
|
|
1835
1835
|
if (paths.some((p) => p[key] !== void 0 && p[key] !== null && typeof p[key] !== "string"))
|
|
1836
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] }));
|
|
1837
1837
|
}
|
|
@@ -1844,7 +1844,7 @@ function checkMotionScene(scene) {
|
|
|
1844
1844
|
else
|
|
1845
1845
|
for (const id of targets) {
|
|
1846
1846
|
const node = nodes.get(id).node;
|
|
1847
|
-
const paths = node.type === "path" ? [node] :
|
|
1847
|
+
const paths = node.type === "path" ? [node] : _chunkXFXHA5MUcjs.collectPathNodes.call(void 0, node);
|
|
1848
1848
|
if (paths.some((p) => typeof p[key] !== "string"))
|
|
1849
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] }));
|
|
1850
1850
|
}
|
|
@@ -2428,7 +2428,7 @@ function toFlairSvgMotion(scene, options = {}) {
|
|
|
2428
2428
|
raw: (t) => transformAt(t, true)
|
|
2429
2429
|
});
|
|
2430
2430
|
}
|
|
2431
|
-
const paths = node.type === "path" ? [node] :
|
|
2431
|
+
const paths = node.type === "path" ? [node] : _chunkXFXHA5MUcjs.collectPathNodes.call(void 0, node);
|
|
2432
2432
|
for (const path of paths) {
|
|
2433
2433
|
if (pathsSeen.has(path.id)) continue;
|
|
2434
2434
|
pathsSeen.add(path.id);
|
|
@@ -2450,7 +2450,7 @@ function toFlairSvgMotion(scene, options = {}) {
|
|
|
2450
2450
|
if (shapeSegments.length) {
|
|
2451
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").`);
|
|
2452
2452
|
else {
|
|
2453
|
-
const inverse =
|
|
2453
|
+
const inverse = _chunkXFXHA5MUcjs.invertMatrix.call(void 0, _chunkXFXHA5MUcjs.nodeMatrix.call(void 0, node));
|
|
2454
2454
|
channels.push({
|
|
2455
2455
|
id,
|
|
2456
2456
|
kind: "attr",
|
|
@@ -2459,9 +2459,9 @@ function toFlairSvgMotion(scene, options = {}) {
|
|
|
2459
2459
|
exact: () => false,
|
|
2460
2460
|
value: (t) => {
|
|
2461
2461
|
const frame = motionFrameAt(scene, t, { draw: false, offsets: false });
|
|
2462
|
-
const now =
|
|
2462
|
+
const now = _chunkXFXHA5MUcjs.expandVectorAppearance.call(void 0, _optionalChain([indexMotionNodes, 'call', _108 => _108(frame.document.nodes), 'access', _109 => _109.get, 'call', _110 => _110(id), 'optionalAccess', _111 => _111.node]));
|
|
2463
2463
|
if (!now || now.type !== "path") return "";
|
|
2464
|
-
const bezier = _chunkBJTCSLF6cjs.transformBezierPath.call(void 0,
|
|
2464
|
+
const bezier = _chunkBJTCSLF6cjs.transformBezierPath.call(void 0, _chunkXFXHA5MUcjs.vectorPathWorldBezier.call(void 0, now, _chunkXFXHA5MUcjs.IDENTITY_MATRIX, { effects: false }), inverse);
|
|
2465
2465
|
return _chunkBJTCSLF6cjs.bezierPathToSvg.call(void 0, bezier, { precision: Math.min(precision, 2) });
|
|
2466
2466
|
}
|
|
2467
2467
|
});
|
|
@@ -2568,7 +2568,7 @@ function toFlairSvgMotion(scene, options = {}) {
|
|
|
2568
2568
|
}
|
|
2569
2569
|
if (scene.motionBlur) notes.push("Motion blur is drawn on the stage only; Flair plays the scene sharp.");
|
|
2570
2570
|
if (trigger && (_nullishCoalesce(scene.loop, () => ( "none"))) !== "none") notes.push(`The scene plays on ${trigger}, so its loop does not apply in Flair.`);
|
|
2571
|
-
let svg =
|
|
2571
|
+
let svg = _chunkXFXHA5MUcjs.vectorDocumentToSvg.call(void 0, { ...scene.artwork, nodes: _chunkXFXHA5MUcjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) }, { pretty: false, precision, wrap });
|
|
2572
2572
|
if (routes.length) svg = svg.replace(/^(<svg[^>]*>)/, `$1<defs>${routes.join("")}</defs>`);
|
|
2573
2573
|
let motion = { svg, animate };
|
|
2574
2574
|
if (_optionalChain([scene, 'access', _114 => _114.controls, 'optionalAccess', _115 => _115.length])) {
|
|
@@ -2652,14 +2652,14 @@ function easingOf(ease, fallback) {
|
|
|
2652
2652
|
return fallback;
|
|
2653
2653
|
}
|
|
2654
2654
|
function poseOf(value, entry) {
|
|
2655
|
-
const t =
|
|
2656
|
-
const o =
|
|
2655
|
+
const t = _chunkXFXHA5MUcjs.parseSvgTransform.call(void 0, String(value));
|
|
2656
|
+
const o = _chunkXFXHA5MUcjs.multiplyMatrices.call(void 0, _nullishCoalesce(_chunkXFXHA5MUcjs.invertMatrix.call(void 0, _chunkXFXHA5MUcjs.nodeMatrix.call(void 0, entry.node)), () => ( [1, 0, 0, 1, 0, 0])), t);
|
|
2657
2657
|
const sx = Math.hypot(o[0], o[1]);
|
|
2658
2658
|
if (!(sx > 1e-9)) return null;
|
|
2659
2659
|
const sy = (o[0] * o[3] - o[1] * o[2]) / sx;
|
|
2660
2660
|
if (Math.abs(o[2] + o[1] / sx * sy) > 1e-6 || Math.abs(o[3] - o[0] / sx * sy) > 1e-6) return null;
|
|
2661
2661
|
const c = entry.center;
|
|
2662
|
-
const moved =
|
|
2662
|
+
const moved = _chunkXFXHA5MUcjs.applyMatrix.call(void 0, o, c);
|
|
2663
2663
|
return { dx: moved.x - c.x, dy: moved.y - c.y, rotation: Math.atan2(o[1], o[0]) * 180 / Math.PI, sx, sy };
|
|
2664
2664
|
}
|
|
2665
2665
|
var near = (a, b, eps = 1e-6) => Math.abs(a - b) < eps;
|
|
@@ -2744,7 +2744,7 @@ function fromFlairSvgMotion(input, options = {}) {
|
|
|
2744
2744
|
const notes = [];
|
|
2745
2745
|
if (!input || typeof input.svg !== "string") throw new Error('Give a Flair SvgMotion: { svg: "<svg \u2026>", animate: [ \u2026 ] }.');
|
|
2746
2746
|
const { motion, controls } = resolvePlaceholders(input, notes);
|
|
2747
|
-
const artwork =
|
|
2747
|
+
const artwork = _chunkXFXHA5MUcjs.parseVectorSvg.call(void 0, motion.svg);
|
|
2748
2748
|
const nodes = indexMotionNodes(artwork.nodes);
|
|
2749
2749
|
const byStep = /* @__PURE__ */ new Map();
|
|
2750
2750
|
for (const anim of _nullishCoalesce(motion.animate, () => ( []))) {
|
|
@@ -2991,9 +2991,9 @@ function toLottie(scene, options = {}) {
|
|
|
2991
2991
|
const items = [];
|
|
2992
2992
|
const shapeSegments = [...timeline.tracks.entries()].filter(([k]) => k.startsWith(`${path.id}\0`) && (k.endsWith("\0shape") || k.includes("\0effect:"))).flatMap(([, v]) => v);
|
|
2993
2993
|
const geometryAt = (t) => {
|
|
2994
|
-
if (!shapeSegments.length) return
|
|
2994
|
+
if (!shapeSegments.length) return _chunkXFXHA5MUcjs.vectorPathWorldBezier.call(void 0, path);
|
|
2995
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]);
|
|
2996
|
-
return now && now.type === "path" ?
|
|
2996
|
+
return now && now.type === "path" ? _chunkXFXHA5MUcjs.vectorPathWorldBezier.call(void 0, _chunkXFXHA5MUcjs.expandVectorAppearances.call(void 0, [now])[0]) : _chunkXFXHA5MUcjs.vectorPathWorldBezier.call(void 0, path);
|
|
2997
2997
|
};
|
|
2998
2998
|
const rest = lottieContours(_chunkBJTCSLF6cjs.toBezierPath.call(void 0, geometryAt(0)), round2);
|
|
2999
2999
|
rest.forEach((contour, n) => {
|
|
@@ -3066,13 +3066,13 @@ function toLottie(scene, options = {}) {
|
|
|
3066
3066
|
const innerTr = STATIC_TR();
|
|
3067
3067
|
if (node.type === "path") inner = [...pathShapes(node)];
|
|
3068
3068
|
else if (node.type === "text" || node.type === "instance") {
|
|
3069
|
-
const drawn =
|
|
3069
|
+
const drawn = _chunkXFXHA5MUcjs.expandVectorAppearance.call(void 0, node);
|
|
3070
3070
|
inner = drawn.type === "path" ? [...pathShapes(drawn)] : drawn.children.filter((c) => c.type === "path").reverse().flatMap((c) => [...pathShapes(c)]);
|
|
3071
|
-
notes.push(`"${node.id}": text is exported as its outlines${
|
|
3071
|
+
notes.push(`"${node.id}": text is exported as its outlines${_chunkXFXHA5MUcjs.vectorTextHasOutlines.call(void 0, ) ? "" : " (glyph boxes: set an outline text shaper for real glyphs)"}.`);
|
|
3072
3072
|
} else {
|
|
3073
3073
|
inner = shown(node.children).reverse().map(nodeGroup);
|
|
3074
|
-
const m =
|
|
3075
|
-
if (m !==
|
|
3074
|
+
const m = _chunkXFXHA5MUcjs.nodeMatrix.call(void 0, node);
|
|
3075
|
+
if (m !== _chunkXFXHA5MUcjs.IDENTITY_MATRIX) {
|
|
3076
3076
|
const parts = staticParts(m);
|
|
3077
3077
|
if (!parts) notes.push(`"${node.id}": its transform skews, which is not exported; it is drawn without the skew.`);
|
|
3078
3078
|
else {
|
|
@@ -3085,7 +3085,7 @@ function toLottie(scene, options = {}) {
|
|
|
3085
3085
|
const body = { ty: "gr", nm: `${node.id} (own)`, it: [...inner, innerTr] };
|
|
3086
3086
|
return { ty: "gr", nm: _nullishCoalesce(node.name, () => ( node.id)), it: [body, poseTransform(entry)] };
|
|
3087
3087
|
};
|
|
3088
|
-
const artwork = { ...scene.artwork, nodes:
|
|
3088
|
+
const artwork = { ...scene.artwork, nodes: _chunkXFXHA5MUcjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) };
|
|
3089
3089
|
const content = shown(artwork.nodes).reverse().map(nodeGroup);
|
|
3090
3090
|
if (artwork.background && rgba(artwork.background))
|
|
3091
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()] });
|
|
@@ -3184,11 +3184,11 @@ function preset(prst, w, h) {
|
|
|
3184
3184
|
const poly = (pts) => [{ closed: true, anchors: pts.map(([x, y]) => ({ x, y })) }];
|
|
3185
3185
|
switch (prst) {
|
|
3186
3186
|
case "rect":
|
|
3187
|
-
return [
|
|
3187
|
+
return [_chunkXFXHA5MUcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
|
|
3188
3188
|
case "roundRect":
|
|
3189
|
-
return [
|
|
3189
|
+
return [_chunkXFXHA5MUcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h }, Math.min(w, h) * 0.16667)];
|
|
3190
3190
|
case "ellipse":
|
|
3191
|
-
return [
|
|
3191
|
+
return [_chunkXFXHA5MUcjs.ellipseSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
|
|
3192
3192
|
case "triangle":
|
|
3193
3193
|
return poly([[w / 2, 0], [w, h], [0, h]]);
|
|
3194
3194
|
case "rtTriangle":
|
|
@@ -3296,7 +3296,7 @@ function shapes(ctx, tree, map) {
|
|
|
3296
3296
|
let subpaths = cust ? custom(cust, w, h) : prst ? preset(prst, w, h) : null;
|
|
3297
3297
|
if (!subpaths) {
|
|
3298
3298
|
if (prst) ctx.notes.push(`"${name}" is a ${prst}, drawn as its bounding rectangle.`);
|
|
3299
|
-
subpaths = [
|
|
3299
|
+
subpaths = [_chunkXFXHA5MUcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
|
|
3300
3300
|
}
|
|
3301
3301
|
const style = kid(el, "style");
|
|
3302
3302
|
const fill = kid(spPr, "noFill") ? null : _nullishCoalesce(colour(ctx, kid(spPr, "solidFill")), () => ( (el.localName === "cxnSp" ? null : colour(ctx, kid(style, "fillRef")))));
|
|
@@ -3534,7 +3534,7 @@ function nextMotionEffectInstance(scene) {
|
|
|
3534
3534
|
walk(scene.artwork.nodes);
|
|
3535
3535
|
for (let i = 1; ; i++) if (!used.has(`fx${i}`)) return `fx${i}`;
|
|
3536
3536
|
}
|
|
3537
|
-
var motionArtworkSvg = (artwork) =>
|
|
3537
|
+
var motionArtworkSvg = (artwork) => _chunkXFXHA5MUcjs.vectorDocumentToSvg.call(void 0, artwork);
|
|
3538
3538
|
var tag = (commands, source) => commands.map((c) => c.type === "wait" ? c : { ...c, source });
|
|
3539
3539
|
function motionCommandsFromEffect(artwork, motion, source) {
|
|
3540
3540
|
const imported = fromFlairSvgMotion({ svg: motionArtworkSvg(artwork), animate: [..._nullishCoalesce(motion.animate, () => ( []))] });
|
|
@@ -4519,7 +4519,7 @@ function createAnimationEditorToolProvider(controller, options = {}) {
|
|
|
4519
4519
|
handler: ({ svg }) => {
|
|
4520
4520
|
let artwork;
|
|
4521
4521
|
try {
|
|
4522
|
-
artwork =
|
|
4522
|
+
artwork = _chunkXFXHA5MUcjs.parseVectorSvg.call(void 0, svg);
|
|
4523
4523
|
} catch (error) {
|
|
4524
4524
|
throw new Error(`The SVG could not be read: ${error.message}. Nothing was changed.`);
|
|
4525
4525
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a6 as MotionCommand, a7 as MotionShot, a8 as MotionScene, L as VectorNode, O as VectorBounds, a9 as MotionDirection, aa as MotionIrisShape, ab as MotionSplitOrientation, ac as MotionDriver, ad as MotionDrivenProperty, ae as MotionRect, af as MotionBeatGrid, ag as MotionCue, ah as MotionCamera, ai as MotionTextUnit, aj as MotionCascade, a4 as VectorDocument, ak as MotionBlur, al as MotionControl, am as MotionPreset, an as MotionClip, ao as FlairSvgMotion, ap as FlairVectorEffect, e as EffectValue, t as EffectVectorMotion, aq as MotionEffectSource, N as VectorGroupNode, v as EffectsSlot, E as EffectProvider, ar as FlairExportOptions, as as FlairMotionExport, at as FlairEffectOptions, au as FlairEffectDocument, av as MotionEnterStyle, aw as MotionExitStyle, ax as MotionCommandType, ay as MotionNarration } from '../helpers-
|
|
2
|
-
export { az as FLAIR_EASES, aA as FLAIR_EXPORT_VERSION, aB as FlairEase, aC as FlairEaseName, aD as FlairSpringEase, aE as FlairSvgAnimation, aF as MOTION_BLENDS, aG as MOTION_CAMERA_MS, aH as MOTION_CASCADES, aI as MOTION_CLIP_TARGET, aJ as MOTION_COMMAND_TYPES, aK as MOTION_DEFAULT_DURATIONS, aL as MOTION_DEFAULT_HOLD, aM as MOTION_DIRECTIONS, aN as MOTION_DRAW_MS_PER_UNIT, aO as MOTION_DRAW_RANGE, aP as MOTION_DRIVEN_PROPERTIES, aQ as MOTION_ENTER_STYLES, aR as MOTION_EXIT_STYLES, aS as MOTION_IRIS_SHAPES, aT as MOTION_REPEAT_MODES, aU as MOTION_SPLIT_ORIENTATIONS, aV as MOTION_TEXT_UNITS, aW as MOTION_TRIGGERS, aX as MotionColorPulseCommand, aY as MotionCommandBase, aZ as MotionDrawCommand, a_ as MotionDrawOrder, a$ as MotionEffectCommand, b0 as MotionEnterCommand, b1 as MotionExitCommand, b2 as MotionFadeCommand, b3 as MotionFollowCommand, b4 as MotionMatchCommand, b5 as MotionMorphCommand, b6 as MotionMoveCommand, b7 as MotionPlayCommand, b8 as MotionPulseCommand, b9 as MotionRotateCommand, ba as MotionScaleCommand, bb as MotionShakeCommand, bc as MotionStyleCommand, bd as MotionTeeterCommand, be as MotionTrigger, bf as MotionWaitCommand, bg as MotionWaveCommand, bh as MotionWiggleCommand, bi as flairAtLeast, bj as flairCurveFor, bk as flairEaseFor, bl as motionFlairPrimitive, bm as toFlairEffectDocument, bn as toFlairSvgMotion, bo as toFlairVectorEffect } from '../helpers-
|
|
1
|
+
import { a6 as MotionCommand, a7 as MotionShot, a8 as MotionScene, L as VectorNode, O as VectorBounds, a9 as MotionDirection, aa as MotionIrisShape, ab as MotionSplitOrientation, ac as MotionDriver, ad as MotionDrivenProperty, ae as MotionRect, af as MotionBeatGrid, ag as MotionCue, ah as MotionCamera, ai as MotionTextUnit, aj as MotionCascade, a4 as VectorDocument, ak as MotionBlur, al as MotionControl, am as MotionPreset, an as MotionClip, ao as FlairSvgMotion, ap as FlairVectorEffect, e as EffectValue, t as EffectVectorMotion, aq as MotionEffectSource, N as VectorGroupNode, v as EffectsSlot, E as EffectProvider, ar as FlairExportOptions, as as FlairMotionExport, at as FlairEffectOptions, au as FlairEffectDocument, av as MotionEnterStyle, aw as MotionExitStyle, ax as MotionCommandType, ay as MotionNarration } from '../helpers-Cavy1TB7.cjs';
|
|
2
|
+
export { az as FLAIR_EASES, aA as FLAIR_EXPORT_VERSION, aB as FlairEase, aC as FlairEaseName, aD as FlairSpringEase, aE as FlairSvgAnimation, aF as MOTION_BLENDS, aG as MOTION_CAMERA_MS, aH as MOTION_CASCADES, aI as MOTION_CLIP_TARGET, aJ as MOTION_COMMAND_TYPES, aK as MOTION_DEFAULT_DURATIONS, aL as MOTION_DEFAULT_HOLD, aM as MOTION_DIRECTIONS, aN as MOTION_DRAW_MS_PER_UNIT, aO as MOTION_DRAW_RANGE, aP as MOTION_DRIVEN_PROPERTIES, aQ as MOTION_ENTER_STYLES, aR as MOTION_EXIT_STYLES, aS as MOTION_IRIS_SHAPES, aT as MOTION_REPEAT_MODES, aU as MOTION_SPLIT_ORIENTATIONS, aV as MOTION_TEXT_UNITS, aW as MOTION_TRIGGERS, aX as MotionColorPulseCommand, aY as MotionCommandBase, aZ as MotionDrawCommand, a_ as MotionDrawOrder, a$ as MotionEffectCommand, b0 as MotionEnterCommand, b1 as MotionExitCommand, b2 as MotionFadeCommand, b3 as MotionFollowCommand, b4 as MotionMatchCommand, b5 as MotionMorphCommand, b6 as MotionMoveCommand, b7 as MotionPlayCommand, b8 as MotionPulseCommand, b9 as MotionRotateCommand, ba as MotionScaleCommand, bb as MotionShakeCommand, bc as MotionStyleCommand, bd as MotionTeeterCommand, be as MotionTrigger, bf as MotionWaitCommand, bg as MotionWaveCommand, bh as MotionWiggleCommand, bi as flairAtLeast, bj as flairCurveFor, bk as flairEaseFor, bl as motionFlairPrimitive, bm as toFlairEffectDocument, bn as toFlairSvgMotion, bo as toFlairVectorEffect } from '../helpers-Cavy1TB7.cjs';
|
|
3
3
|
import { f as MotionBehavior, b as AnimationLoopMode } from '../evaluate-BsxYieLN.cjs';
|
|
4
4
|
import { b as AnimationEasing } from '../easing-lM0Xo9Ni.cjs';
|
|
5
|
-
import { A as AffineMatrix, B as BezierPath } from '../bezier-
|
|
6
|
-
import { V as VectorSvgExportOptions } from '../svg-
|
|
5
|
+
import { A as AffineMatrix, B as BezierPath } from '../bezier-CEJ8Uw4O.cjs';
|
|
6
|
+
import { V as VectorSvgExportOptions } from '../svg-RcixtBFR.cjs';
|
|
7
7
|
import { Z as ZipReadOptions } from '../zip-4nG0YAH7.cjs';
|
|
8
8
|
import { A as AnimationPlayer, C as Clock } from '../player-CmbY3218.cjs';
|
|
9
9
|
import { H as HistoryManager } from '../HistoryManager-DeQQMBCj.cjs';
|
|
@@ -13,6 +13,7 @@ import '../provenance-DmlcgdzT.cjs';
|
|
|
13
13
|
import '../sourcemap-C8AH3MBQ.cjs';
|
|
14
14
|
import '../tokens-D7yXvUU6.cjs';
|
|
15
15
|
import '../types-CwMPoRMU.cjs';
|
|
16
|
+
import '../grain-BWmGZxP4.cjs';
|
|
16
17
|
import '../brushTypes-MX5UVs_m.cjs';
|
|
17
18
|
import '../types-DsiXGmjo.cjs';
|
|
18
19
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a6 as MotionCommand, a7 as MotionShot, a8 as MotionScene, L as VectorNode, O as VectorBounds, a9 as MotionDirection, aa as MotionIrisShape, ab as MotionSplitOrientation, ac as MotionDriver, ad as MotionDrivenProperty, ae as MotionRect, af as MotionBeatGrid, ag as MotionCue, ah as MotionCamera, ai as MotionTextUnit, aj as MotionCascade, a4 as VectorDocument, ak as MotionBlur, al as MotionControl, am as MotionPreset, an as MotionClip, ao as FlairSvgMotion, ap as FlairVectorEffect, e as EffectValue, t as EffectVectorMotion, aq as MotionEffectSource, N as VectorGroupNode, v as EffectsSlot, E as EffectProvider, ar as FlairExportOptions, as as FlairMotionExport, at as FlairEffectOptions, au as FlairEffectDocument, av as MotionEnterStyle, aw as MotionExitStyle, ax as MotionCommandType, ay as MotionNarration } from '../helpers-
|
|
2
|
-
export { az as FLAIR_EASES, aA as FLAIR_EXPORT_VERSION, aB as FlairEase, aC as FlairEaseName, aD as FlairSpringEase, aE as FlairSvgAnimation, aF as MOTION_BLENDS, aG as MOTION_CAMERA_MS, aH as MOTION_CASCADES, aI as MOTION_CLIP_TARGET, aJ as MOTION_COMMAND_TYPES, aK as MOTION_DEFAULT_DURATIONS, aL as MOTION_DEFAULT_HOLD, aM as MOTION_DIRECTIONS, aN as MOTION_DRAW_MS_PER_UNIT, aO as MOTION_DRAW_RANGE, aP as MOTION_DRIVEN_PROPERTIES, aQ as MOTION_ENTER_STYLES, aR as MOTION_EXIT_STYLES, aS as MOTION_IRIS_SHAPES, aT as MOTION_REPEAT_MODES, aU as MOTION_SPLIT_ORIENTATIONS, aV as MOTION_TEXT_UNITS, aW as MOTION_TRIGGERS, aX as MotionColorPulseCommand, aY as MotionCommandBase, aZ as MotionDrawCommand, a_ as MotionDrawOrder, a$ as MotionEffectCommand, b0 as MotionEnterCommand, b1 as MotionExitCommand, b2 as MotionFadeCommand, b3 as MotionFollowCommand, b4 as MotionMatchCommand, b5 as MotionMorphCommand, b6 as MotionMoveCommand, b7 as MotionPlayCommand, b8 as MotionPulseCommand, b9 as MotionRotateCommand, ba as MotionScaleCommand, bb as MotionShakeCommand, bc as MotionStyleCommand, bd as MotionTeeterCommand, be as MotionTrigger, bf as MotionWaitCommand, bg as MotionWaveCommand, bh as MotionWiggleCommand, bi as flairAtLeast, bj as flairCurveFor, bk as flairEaseFor, bl as motionFlairPrimitive, bm as toFlairEffectDocument, bn as toFlairSvgMotion, bo as toFlairVectorEffect } from '../helpers-
|
|
1
|
+
import { a6 as MotionCommand, a7 as MotionShot, a8 as MotionScene, L as VectorNode, O as VectorBounds, a9 as MotionDirection, aa as MotionIrisShape, ab as MotionSplitOrientation, ac as MotionDriver, ad as MotionDrivenProperty, ae as MotionRect, af as MotionBeatGrid, ag as MotionCue, ah as MotionCamera, ai as MotionTextUnit, aj as MotionCascade, a4 as VectorDocument, ak as MotionBlur, al as MotionControl, am as MotionPreset, an as MotionClip, ao as FlairSvgMotion, ap as FlairVectorEffect, e as EffectValue, t as EffectVectorMotion, aq as MotionEffectSource, N as VectorGroupNode, v as EffectsSlot, E as EffectProvider, ar as FlairExportOptions, as as FlairMotionExport, at as FlairEffectOptions, au as FlairEffectDocument, av as MotionEnterStyle, aw as MotionExitStyle, ax as MotionCommandType, ay as MotionNarration } from '../helpers-LZQ4cpg4.js';
|
|
2
|
+
export { az as FLAIR_EASES, aA as FLAIR_EXPORT_VERSION, aB as FlairEase, aC as FlairEaseName, aD as FlairSpringEase, aE as FlairSvgAnimation, aF as MOTION_BLENDS, aG as MOTION_CAMERA_MS, aH as MOTION_CASCADES, aI as MOTION_CLIP_TARGET, aJ as MOTION_COMMAND_TYPES, aK as MOTION_DEFAULT_DURATIONS, aL as MOTION_DEFAULT_HOLD, aM as MOTION_DIRECTIONS, aN as MOTION_DRAW_MS_PER_UNIT, aO as MOTION_DRAW_RANGE, aP as MOTION_DRIVEN_PROPERTIES, aQ as MOTION_ENTER_STYLES, aR as MOTION_EXIT_STYLES, aS as MOTION_IRIS_SHAPES, aT as MOTION_REPEAT_MODES, aU as MOTION_SPLIT_ORIENTATIONS, aV as MOTION_TEXT_UNITS, aW as MOTION_TRIGGERS, aX as MotionColorPulseCommand, aY as MotionCommandBase, aZ as MotionDrawCommand, a_ as MotionDrawOrder, a$ as MotionEffectCommand, b0 as MotionEnterCommand, b1 as MotionExitCommand, b2 as MotionFadeCommand, b3 as MotionFollowCommand, b4 as MotionMatchCommand, b5 as MotionMorphCommand, b6 as MotionMoveCommand, b7 as MotionPlayCommand, b8 as MotionPulseCommand, b9 as MotionRotateCommand, ba as MotionScaleCommand, bb as MotionShakeCommand, bc as MotionStyleCommand, bd as MotionTeeterCommand, be as MotionTrigger, bf as MotionWaitCommand, bg as MotionWaveCommand, bh as MotionWiggleCommand, bi as flairAtLeast, bj as flairCurveFor, bk as flairEaseFor, bl as motionFlairPrimitive, bm as toFlairEffectDocument, bn as toFlairSvgMotion, bo as toFlairVectorEffect } from '../helpers-LZQ4cpg4.js';
|
|
3
3
|
import { f as MotionBehavior, b as AnimationLoopMode } from '../evaluate-BbCeF6pt.js';
|
|
4
4
|
import { b as AnimationEasing } from '../easing-lM0Xo9Ni.js';
|
|
5
|
-
import { A as AffineMatrix, B as BezierPath } from '../bezier-
|
|
6
|
-
import { V as VectorSvgExportOptions } from '../svg-
|
|
5
|
+
import { A as AffineMatrix, B as BezierPath } from '../bezier-B6cK8SR6.js';
|
|
6
|
+
import { V as VectorSvgExportOptions } from '../svg-nWBJEpnk.js';
|
|
7
7
|
import { Z as ZipReadOptions } from '../zip-4nG0YAH7.js';
|
|
8
8
|
import { A as AnimationPlayer, C as Clock } from '../player-BK2kKbfd.js';
|
|
9
9
|
import { H as HistoryManager } from '../HistoryManager-DWSLd6Tf.js';
|
|
@@ -13,6 +13,7 @@ import '../provenance-uh5r2TQ8.js';
|
|
|
13
13
|
import '../sourcemap-DA1Evhrv.js';
|
|
14
14
|
import '../tokens-D7yXvUU6.js';
|
|
15
15
|
import '../types-CwMPoRMU.js';
|
|
16
|
+
import '../grain-BWmGZxP4.js';
|
|
16
17
|
import '../brushTypes-MX5UVs_m.js';
|
|
17
18
|
import '../types-DsiXGmjo.js';
|
|
18
19
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createVectorMorph
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-NI6RORDS.js";
|
|
4
4
|
import {
|
|
5
5
|
MOTION_ISSUE_CODES,
|
|
6
6
|
motionIssue,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
vectorNodeBounds,
|
|
32
32
|
vectorPathWorldBezier,
|
|
33
33
|
vectorTextHasOutlines
|
|
34
|
-
} from "../chunk-
|
|
34
|
+
} from "../chunk-TJBYBSTN.js";
|
|
35
35
|
import "../chunk-CPSMARTX.js";
|
|
36
36
|
import "../chunk-A3BVTI3G.js";
|
|
37
37
|
import {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { P as Point, e as CanvasBrushstroke } from './brushTypes-MX5UVs_m.js';
|
|
2
|
-
import { C as CanvasGradientDef, S as SvgGradientDef } from './helpers-
|
|
2
|
+
import { C as CanvasGradientDef, S as SvgGradientDef } from './helpers-LZQ4cpg4.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Polygon boolean operations (union, intersection, difference, xor and divide) on
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { P as Point, e as CanvasBrushstroke } from './brushTypes-MX5UVs_m.cjs';
|
|
2
|
-
import { C as CanvasGradientDef, S as SvgGradientDef } from './helpers-
|
|
2
|
+
import { C as CanvasGradientDef, S as SvgGradientDef } from './helpers-Cavy1TB7.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Polygon boolean operations (union, intersection, difference, xor and divide) on
|
|
@@ -1023,61 +1023,4 @@ declare class SmudgeTip {
|
|
|
1023
1023
|
dab(medium: TileMedium, d: SmudgeDab, rect: RasterRect, cov: ArrayLike<number>): void;
|
|
1024
1024
|
}
|
|
1025
1025
|
|
|
1026
|
-
|
|
1027
|
-
type GrainPattern = 'smooth' | 'cold-pressed' | 'hot-pressed' | 'rough' | 'vellum' | 'laid' | 'ingres' | 'sanded' | 'canvas' | 'linen' | 'gesso';
|
|
1028
|
-
declare const GRAIN_PATTERNS: readonly GrainPattern[];
|
|
1029
|
-
/** How a height map is tuned for one kind of media. */
|
|
1030
|
-
interface GrainTuning {
|
|
1031
|
-
/** Height contrast around the middle, 0..3 (default 1). */
|
|
1032
|
-
contrast: number;
|
|
1033
|
-
/** Swap peaks and valleys (default false). */
|
|
1034
|
-
invert: boolean;
|
|
1035
|
-
}
|
|
1036
|
-
type PaperTiling = 'repeat' | 'mirror';
|
|
1037
|
-
/** What a `PaperGrain` reads from a paper (the paint editor's `PaperSettings` has it all). */
|
|
1038
|
-
interface PaperGrainSettings {
|
|
1039
|
-
pattern: GrainPattern;
|
|
1040
|
-
/** Grain seed: another seed gives another sheet of the same paper. */
|
|
1041
|
-
seed: number;
|
|
1042
|
-
/** Grain scale: 1 is the pattern's natural size, 2 twice as coarse. */
|
|
1043
|
-
scale: number;
|
|
1044
|
-
tiling: PaperTiling;
|
|
1045
|
-
dry: GrainTuning;
|
|
1046
|
-
wet: GrainTuning;
|
|
1047
|
-
}
|
|
1048
|
-
/** Side of the generated grain tile in pixels (at scale 1). */
|
|
1049
|
-
declare const GRAIN_TILE = 256;
|
|
1050
|
-
/** The raw height map of a pattern (`GRAIN_TILE` square, 0..1), generated once per pattern and seed. */
|
|
1051
|
-
declare function grainHeights(pattern: GrainPattern, seed: number, size?: number): Float32Array;
|
|
1052
|
-
/**
|
|
1053
|
-
* A paper's height field over the canvas (document pixels), tuned for one kind of media. Read it
|
|
1054
|
-
* with `at(x, y)`: bilinear, tiled by `paper.tiling`, at `paper.scale`.
|
|
1055
|
-
*/
|
|
1056
|
-
declare class PaperGrain {
|
|
1057
|
-
readonly size = 256;
|
|
1058
|
-
private readonly heights;
|
|
1059
|
-
private readonly scale;
|
|
1060
|
-
private readonly mirror;
|
|
1061
|
-
readonly flat: boolean;
|
|
1062
|
-
constructor(paper: PaperGrainSettings, media?: 'dry' | 'wet');
|
|
1063
|
-
/** Tile cell index for a coordinate in grain pixels (mirrored on odd tiles when mirroring). */
|
|
1064
|
-
private wrap;
|
|
1065
|
-
/** Height 0..1 at document position (x, y). */
|
|
1066
|
-
at(x: number, y: number): number;
|
|
1067
|
-
}
|
|
1068
|
-
/**
|
|
1069
|
-
* How much of a dry dab lands at grain height `h` (0..1): the media catches the peaks first, and
|
|
1070
|
-
* pressure pushes it into the valleys. `depth` is the paper's grain depth times the brush's grain
|
|
1071
|
-
* response; at 0 everything lands (1).
|
|
1072
|
-
*/
|
|
1073
|
-
declare function grainCatch(h: number, depth: number, pressure: number): number;
|
|
1074
|
-
/**
|
|
1075
|
-
* How much of a finished standalone stroke stays at grain height `h` (0..1): `renderBrushstroke`
|
|
1076
|
-
* applies it once to the whole stroke's coverage. Unlike `grainCatch` (applied dab by dab while a
|
|
1077
|
-
* painter goes over the paper, and filling the valleys at full pressure), it keeps texture at full
|
|
1078
|
-
* pressure, which is all a mouse reports: the valleys lose up to `depth × (1.4 − 0.6 × pressure)`
|
|
1079
|
-
* of the paint, the peaks keep it all.
|
|
1080
|
-
*/
|
|
1081
|
-
declare function strokeGrainCatch(h: number, depth: number, pressure: number): number;
|
|
1082
|
-
|
|
1083
|
-
export { addPaintGradientStop as $, PAINT_GRADIENT_REPEATS as A, type BrushSettings as B, CoverageMap as C, type Dab as D, PAINT_GRADIENT_REPEAT_LABELS as E, PAINT_GRADIENT_SPACES as F, type GrainPattern as G, PAINT_GRADIENT_SPACE_LABELS as H, PAINT_SOURCE_JSON_SCHEMA as I, type PaintColorSource as J, type PaintDabParams as K, type PaintGradientKit as L, type MixerSettings as M, type PaintGradientMapping as N, type PaintGradientMappingKind as O, PaperGrain as P, type PaintGradientRepeat as Q, type RgbTriple as R, type StrokePoint as S, TileMedium as T, type PaintGradientSample as U, PaintGradientSampler as V, type PaintGradientSpace as W, type PaintGradientStop as X, type PaintRgb as Y, PaintSourceError as Z, type PaperGrainSettings as _, type PaintTileTarget as a, grainCatch as a0, grainHeights as a1, hexToPaintRgb as a2, isGradientPaint as a3, normalizeHexColor as a4, paintGradientMappingFor as a5, paintSourceColor as a6, paintSourceCss as a7, parsePaintSource as a8, readPaintSource as a9, blendRadius as aA, blenderDab as aB, cleanMixer as aC, coverageTileCoord as aD, createBlenderScratch as aE, dabCoverage as aF, dabRect as aG, exchangeRates as aH, gradientDabColor as aI, loadMixer as aJ, mixerRates as aK, normalizeBlender as aL, normalizeBrush as aM, normalizeMixer as aN, normalizeSmudge as aO, put255 as aP, rasterizeDab as aQ, smoothPoints as aR, strokeGrainCatch as aS, tipFalloff as aT, tipReach as aU, tipShape as aV, walkDabs as aW, removePaintGradientStop as aa, resolvePaintGradient as ab, reversePaintGradient as ac, scalePaintGradient as ad, solidPaint as ae, updatePaintGradientStop as af, type BlenderScratch as ag, DEFAULT_BLENDER as ah, DEFAULT_BRUSH as ai, DEFAULT_MIXER as aj, DEFAULT_SMUDGE as ak, DabWalker as al, EMPTY_MIXER_LOAD as am, type ExchangeRates as an, MIXER_DRAIN as ao, MIXER_PICKUP_RATE as ap, MIXING_MODELS as aq, PaintExchange as ar, type PaintMedium as as, type PaintSample as at, type SmudgeDab as au, SmudgeTip as av, TIP_GRADIENT_STEPS as aw, type TileMediumOptions as ax, applyStrokeToDeepTile as ay, applyStrokeToTile as az, type PaintGradientSource as b, type MixingModel as c, type BlenderSettings as d, type SmudgeSettings as e, type PaintSource as f, type PaintPixels as g, type MixerLoad as h, StrokeCoverage as i, type MixerTarget as j, MixerStroke as k, type StrokeApply as l, type PaperTiling as m, type GrainTuning as n, DEFAULT_PAINT_GRADIENT as o, DEFAULT_PAINT_GRADIENT_MAPPING as p, GRAIN_PATTERNS as q, GRAIN_TILE as r, MAX_BRUSH_SIZE as s, PAINT_COLOR_JSON_SCHEMA as t, PAINT_GRADIENT_FULL_SPEED as u, PAINT_GRADIENT_JSON_SCHEMA as v, PAINT_GRADIENT_KIT as w, PAINT_GRADIENT_MAPPINGS as x, PAINT_GRADIENT_MAPPING_LABELS as y, PAINT_GRADIENT_PRESETS as z };
|
|
1026
|
+
export { parsePaintSource as $, type PaintColorSource as A, type BrushSettings as B, CoverageMap as C, type Dab as D, type PaintDabParams as E, type PaintGradientKit as F, type PaintGradientMapping as G, type PaintGradientMappingKind as H, type PaintGradientRepeat as I, type PaintGradientSample as J, PaintGradientSampler as K, type PaintGradientSpace as L, type MixerSettings as M, type PaintGradientStop as N, type PaintRgb as O, type PaintTileTarget as P, PaintSourceError as Q, type RgbTriple as R, type StrokePoint as S, TileMedium as T, addPaintGradientStop as U, hexToPaintRgb as V, isGradientPaint as W, normalizeHexColor as X, paintGradientMappingFor as Y, paintSourceColor as Z, paintSourceCss as _, type PaintGradientSource as a, readPaintSource as a0, removePaintGradientStop as a1, resolvePaintGradient as a2, reversePaintGradient as a3, scalePaintGradient as a4, solidPaint as a5, updatePaintGradientStop as a6, type BlenderScratch as a7, DEFAULT_BLENDER as a8, DEFAULT_BRUSH as a9, loadMixer as aA, mixerRates as aB, normalizeBlender as aC, normalizeBrush as aD, normalizeMixer as aE, normalizeSmudge as aF, put255 as aG, rasterizeDab as aH, smoothPoints as aI, tipFalloff as aJ, tipReach as aK, tipShape as aL, walkDabs as aM, DEFAULT_MIXER as aa, DEFAULT_SMUDGE as ab, DabWalker as ac, EMPTY_MIXER_LOAD as ad, type ExchangeRates as ae, MIXER_DRAIN as af, MIXER_PICKUP_RATE as ag, MIXING_MODELS as ah, PaintExchange as ai, type PaintMedium as aj, type PaintSample as ak, type SmudgeDab as al, SmudgeTip as am, TIP_GRADIENT_STEPS as an, type TileMediumOptions as ao, applyStrokeToDeepTile as ap, applyStrokeToTile as aq, blendRadius as ar, blenderDab as as, cleanMixer as at, coverageTileCoord as au, createBlenderScratch as av, dabCoverage as aw, dabRect as ax, exchangeRates as ay, gradientDabColor as az, type MixingModel as b, type BlenderSettings as c, type SmudgeSettings as d, type PaintSource as e, type PaintPixels as f, type MixerLoad as g, StrokeCoverage as h, type MixerTarget as i, MixerStroke as j, type StrokeApply as k, DEFAULT_PAINT_GRADIENT as l, DEFAULT_PAINT_GRADIENT_MAPPING as m, MAX_BRUSH_SIZE as n, PAINT_COLOR_JSON_SCHEMA as o, PAINT_GRADIENT_FULL_SPEED as p, PAINT_GRADIENT_JSON_SCHEMA as q, PAINT_GRADIENT_KIT as r, PAINT_GRADIENT_MAPPINGS as s, PAINT_GRADIENT_MAPPING_LABELS as t, PAINT_GRADIENT_PRESETS as u, PAINT_GRADIENT_REPEATS as v, PAINT_GRADIENT_REPEAT_LABELS as w, PAINT_GRADIENT_SPACES as x, PAINT_GRADIENT_SPACE_LABELS as y, PAINT_SOURCE_JSON_SCHEMA as z };
|
|
@@ -1023,61 +1023,4 @@ declare class SmudgeTip {
|
|
|
1023
1023
|
dab(medium: TileMedium, d: SmudgeDab, rect: RasterRect, cov: ArrayLike<number>): void;
|
|
1024
1024
|
}
|
|
1025
1025
|
|
|
1026
|
-
|
|
1027
|
-
type GrainPattern = 'smooth' | 'cold-pressed' | 'hot-pressed' | 'rough' | 'vellum' | 'laid' | 'ingres' | 'sanded' | 'canvas' | 'linen' | 'gesso';
|
|
1028
|
-
declare const GRAIN_PATTERNS: readonly GrainPattern[];
|
|
1029
|
-
/** How a height map is tuned for one kind of media. */
|
|
1030
|
-
interface GrainTuning {
|
|
1031
|
-
/** Height contrast around the middle, 0..3 (default 1). */
|
|
1032
|
-
contrast: number;
|
|
1033
|
-
/** Swap peaks and valleys (default false). */
|
|
1034
|
-
invert: boolean;
|
|
1035
|
-
}
|
|
1036
|
-
type PaperTiling = 'repeat' | 'mirror';
|
|
1037
|
-
/** What a `PaperGrain` reads from a paper (the paint editor's `PaperSettings` has it all). */
|
|
1038
|
-
interface PaperGrainSettings {
|
|
1039
|
-
pattern: GrainPattern;
|
|
1040
|
-
/** Grain seed: another seed gives another sheet of the same paper. */
|
|
1041
|
-
seed: number;
|
|
1042
|
-
/** Grain scale: 1 is the pattern's natural size, 2 twice as coarse. */
|
|
1043
|
-
scale: number;
|
|
1044
|
-
tiling: PaperTiling;
|
|
1045
|
-
dry: GrainTuning;
|
|
1046
|
-
wet: GrainTuning;
|
|
1047
|
-
}
|
|
1048
|
-
/** Side of the generated grain tile in pixels (at scale 1). */
|
|
1049
|
-
declare const GRAIN_TILE = 256;
|
|
1050
|
-
/** The raw height map of a pattern (`GRAIN_TILE` square, 0..1), generated once per pattern and seed. */
|
|
1051
|
-
declare function grainHeights(pattern: GrainPattern, seed: number, size?: number): Float32Array;
|
|
1052
|
-
/**
|
|
1053
|
-
* A paper's height field over the canvas (document pixels), tuned for one kind of media. Read it
|
|
1054
|
-
* with `at(x, y)`: bilinear, tiled by `paper.tiling`, at `paper.scale`.
|
|
1055
|
-
*/
|
|
1056
|
-
declare class PaperGrain {
|
|
1057
|
-
readonly size = 256;
|
|
1058
|
-
private readonly heights;
|
|
1059
|
-
private readonly scale;
|
|
1060
|
-
private readonly mirror;
|
|
1061
|
-
readonly flat: boolean;
|
|
1062
|
-
constructor(paper: PaperGrainSettings, media?: 'dry' | 'wet');
|
|
1063
|
-
/** Tile cell index for a coordinate in grain pixels (mirrored on odd tiles when mirroring). */
|
|
1064
|
-
private wrap;
|
|
1065
|
-
/** Height 0..1 at document position (x, y). */
|
|
1066
|
-
at(x: number, y: number): number;
|
|
1067
|
-
}
|
|
1068
|
-
/**
|
|
1069
|
-
* How much of a dry dab lands at grain height `h` (0..1): the media catches the peaks first, and
|
|
1070
|
-
* pressure pushes it into the valleys. `depth` is the paper's grain depth times the brush's grain
|
|
1071
|
-
* response; at 0 everything lands (1).
|
|
1072
|
-
*/
|
|
1073
|
-
declare function grainCatch(h: number, depth: number, pressure: number): number;
|
|
1074
|
-
/**
|
|
1075
|
-
* How much of a finished standalone stroke stays at grain height `h` (0..1): `renderBrushstroke`
|
|
1076
|
-
* applies it once to the whole stroke's coverage. Unlike `grainCatch` (applied dab by dab while a
|
|
1077
|
-
* painter goes over the paper, and filling the valleys at full pressure), it keeps texture at full
|
|
1078
|
-
* pressure, which is all a mouse reports: the valleys lose up to `depth × (1.4 − 0.6 × pressure)`
|
|
1079
|
-
* of the paint, the peaks keep it all.
|
|
1080
|
-
*/
|
|
1081
|
-
declare function strokeGrainCatch(h: number, depth: number, pressure: number): number;
|
|
1082
|
-
|
|
1083
|
-
export { addPaintGradientStop as $, PAINT_GRADIENT_REPEATS as A, type BrushSettings as B, CoverageMap as C, type Dab as D, PAINT_GRADIENT_REPEAT_LABELS as E, PAINT_GRADIENT_SPACES as F, type GrainPattern as G, PAINT_GRADIENT_SPACE_LABELS as H, PAINT_SOURCE_JSON_SCHEMA as I, type PaintColorSource as J, type PaintDabParams as K, type PaintGradientKit as L, type MixerSettings as M, type PaintGradientMapping as N, type PaintGradientMappingKind as O, PaperGrain as P, type PaintGradientRepeat as Q, type RgbTriple as R, type StrokePoint as S, TileMedium as T, type PaintGradientSample as U, PaintGradientSampler as V, type PaintGradientSpace as W, type PaintGradientStop as X, type PaintRgb as Y, PaintSourceError as Z, type PaperGrainSettings as _, type PaintTileTarget as a, grainCatch as a0, grainHeights as a1, hexToPaintRgb as a2, isGradientPaint as a3, normalizeHexColor as a4, paintGradientMappingFor as a5, paintSourceColor as a6, paintSourceCss as a7, parsePaintSource as a8, readPaintSource as a9, blendRadius as aA, blenderDab as aB, cleanMixer as aC, coverageTileCoord as aD, createBlenderScratch as aE, dabCoverage as aF, dabRect as aG, exchangeRates as aH, gradientDabColor as aI, loadMixer as aJ, mixerRates as aK, normalizeBlender as aL, normalizeBrush as aM, normalizeMixer as aN, normalizeSmudge as aO, put255 as aP, rasterizeDab as aQ, smoothPoints as aR, strokeGrainCatch as aS, tipFalloff as aT, tipReach as aU, tipShape as aV, walkDabs as aW, removePaintGradientStop as aa, resolvePaintGradient as ab, reversePaintGradient as ac, scalePaintGradient as ad, solidPaint as ae, updatePaintGradientStop as af, type BlenderScratch as ag, DEFAULT_BLENDER as ah, DEFAULT_BRUSH as ai, DEFAULT_MIXER as aj, DEFAULT_SMUDGE as ak, DabWalker as al, EMPTY_MIXER_LOAD as am, type ExchangeRates as an, MIXER_DRAIN as ao, MIXER_PICKUP_RATE as ap, MIXING_MODELS as aq, PaintExchange as ar, type PaintMedium as as, type PaintSample as at, type SmudgeDab as au, SmudgeTip as av, TIP_GRADIENT_STEPS as aw, type TileMediumOptions as ax, applyStrokeToDeepTile as ay, applyStrokeToTile as az, type PaintGradientSource as b, type MixingModel as c, type BlenderSettings as d, type SmudgeSettings as e, type PaintSource as f, type PaintPixels as g, type MixerLoad as h, StrokeCoverage as i, type MixerTarget as j, MixerStroke as k, type StrokeApply as l, type PaperTiling as m, type GrainTuning as n, DEFAULT_PAINT_GRADIENT as o, DEFAULT_PAINT_GRADIENT_MAPPING as p, GRAIN_PATTERNS as q, GRAIN_TILE as r, MAX_BRUSH_SIZE as s, PAINT_COLOR_JSON_SCHEMA as t, PAINT_GRADIENT_FULL_SPEED as u, PAINT_GRADIENT_JSON_SCHEMA as v, PAINT_GRADIENT_KIT as w, PAINT_GRADIENT_MAPPINGS as x, PAINT_GRADIENT_MAPPING_LABELS as y, PAINT_GRADIENT_PRESETS as z };
|
|
1026
|
+
export { parsePaintSource as $, type PaintColorSource as A, type BrushSettings as B, CoverageMap as C, type Dab as D, type PaintDabParams as E, type PaintGradientKit as F, type PaintGradientMapping as G, type PaintGradientMappingKind as H, type PaintGradientRepeat as I, type PaintGradientSample as J, PaintGradientSampler as K, type PaintGradientSpace as L, type MixerSettings as M, type PaintGradientStop as N, type PaintRgb as O, type PaintTileTarget as P, PaintSourceError as Q, type RgbTriple as R, type StrokePoint as S, TileMedium as T, addPaintGradientStop as U, hexToPaintRgb as V, isGradientPaint as W, normalizeHexColor as X, paintGradientMappingFor as Y, paintSourceColor as Z, paintSourceCss as _, type PaintGradientSource as a, readPaintSource as a0, removePaintGradientStop as a1, resolvePaintGradient as a2, reversePaintGradient as a3, scalePaintGradient as a4, solidPaint as a5, updatePaintGradientStop as a6, type BlenderScratch as a7, DEFAULT_BLENDER as a8, DEFAULT_BRUSH as a9, loadMixer as aA, mixerRates as aB, normalizeBlender as aC, normalizeBrush as aD, normalizeMixer as aE, normalizeSmudge as aF, put255 as aG, rasterizeDab as aH, smoothPoints as aI, tipFalloff as aJ, tipReach as aK, tipShape as aL, walkDabs as aM, DEFAULT_MIXER as aa, DEFAULT_SMUDGE as ab, DabWalker as ac, EMPTY_MIXER_LOAD as ad, type ExchangeRates as ae, MIXER_DRAIN as af, MIXER_PICKUP_RATE as ag, MIXING_MODELS as ah, PaintExchange as ai, type PaintMedium as aj, type PaintSample as ak, type SmudgeDab as al, SmudgeTip as am, TIP_GRADIENT_STEPS as an, type TileMediumOptions as ao, applyStrokeToDeepTile as ap, applyStrokeToTile as aq, blendRadius as ar, blenderDab as as, cleanMixer as at, coverageTileCoord as au, createBlenderScratch as av, dabCoverage as aw, dabRect as ax, exchangeRates as ay, gradientDabColor as az, type MixingModel as b, type BlenderSettings as c, type SmudgeSettings as d, type PaintSource as e, type PaintPixels as f, type MixerLoad as g, StrokeCoverage as h, type MixerTarget as i, MixerStroke as j, type StrokeApply as k, DEFAULT_PAINT_GRADIENT as l, DEFAULT_PAINT_GRADIENT_MAPPING as m, MAX_BRUSH_SIZE as n, PAINT_COLOR_JSON_SCHEMA as o, PAINT_GRADIENT_FULL_SPEED as p, PAINT_GRADIENT_JSON_SCHEMA as q, PAINT_GRADIENT_KIT as r, PAINT_GRADIENT_MAPPINGS as s, PAINT_GRADIENT_MAPPING_LABELS as t, PAINT_GRADIENT_PRESETS as u, PAINT_GRADIENT_REPEATS as v, PAINT_GRADIENT_REPEAT_LABELS as w, PAINT_GRADIENT_SPACES as x, PAINT_GRADIENT_SPACE_LABELS as y, PAINT_SOURCE_JSON_SCHEMA as z };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { D as Dab, C as CoverageMap,
|
|
1
|
+
import { D as Dab, C as CoverageMap, B as BrushSettings, S as StrokePoint, P as PaintTileTarget, a as PaintGradientSource, T as TileMedium, M as MixerSettings, b as MixingModel, c as BlenderSettings, d as SmudgeSettings, e as PaintSource } from './blending-NgF3qo3d.js';
|
|
2
2
|
import { R as RasterRect, T as TiledSurface } from './surface-1MRncXpF.js';
|
|
3
|
+
import { P as PaperGrain } from './grain-BWmGZxP4.js';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* The paint editor's dry-media stroke engine, on the shared brush engine (`@pixerate/editor/paint`):
|