reframe-video 0.2.0 → 0.4.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.
@@ -10,6 +10,7 @@ Verified against each asset page's license field on 2026-06-11.
10
10
  | whoosh.wav (wind body), rise.wav (reversed slice) | [Air whoosh](https://opengameart.org/content/air-whoosh) | qubodup | CC0 |
11
11
  | whoosh.wav (transient layer: swish-9) | [Swishes Sound Pack](https://opengameart.org/content/swishes-sound-pack) | artisticdude | CC0 |
12
12
  | thud.wav (trimmed) | [Muffled Distant Explosion](https://opengameart.org/content/muffled-distant-explosion) | NenadSimic | CC0 |
13
+ | footstep_001/002/003.ogg (footstep00/03/06) | [RPG Audio](https://kenney.nl/assets/rpg-audio) | Kenney (kenney.nl) | CC0 |
13
14
  | bgm-song21.mp3 | [Mysterious Ambience (song21)](https://opengameart.org/content/mysterious-ambience-song21) | cynicmusic (pixelsphere.org) | multi-licensed; used under its CC0 option |
14
15
 
15
16
  CC0 requires no attribution; this file records provenance anyway.
Binary file
Binary file
Binary file
package/dist/bin.js CHANGED
@@ -1044,6 +1044,48 @@ var init_devicePreset = __esm({
1044
1044
  }
1045
1045
  });
1046
1046
 
1047
+ // ../core/src/rig.ts
1048
+ var init_rig = __esm({
1049
+ "../core/src/rig.ts"() {
1050
+ "use strict";
1051
+ init_dsl();
1052
+ }
1053
+ });
1054
+
1055
+ // ../core/src/characterPreset.ts
1056
+ var init_characterPreset = __esm({
1057
+ "../core/src/characterPreset.ts"() {
1058
+ "use strict";
1059
+ init_dsl();
1060
+ init_rig();
1061
+ }
1062
+ });
1063
+
1064
+ // ../core/src/figure.ts
1065
+ var init_figure = __esm({
1066
+ "../core/src/figure.ts"() {
1067
+ "use strict";
1068
+ init_dsl();
1069
+ init_rig();
1070
+ }
1071
+ });
1072
+
1073
+ // ../core/src/textMetrics.ts
1074
+ var init_textMetrics = __esm({
1075
+ "../core/src/textMetrics.ts"() {
1076
+ "use strict";
1077
+ }
1078
+ });
1079
+
1080
+ // ../core/src/textFx.ts
1081
+ var init_textFx = __esm({
1082
+ "../core/src/textFx.ts"() {
1083
+ "use strict";
1084
+ init_dsl();
1085
+ init_textMetrics();
1086
+ }
1087
+ });
1088
+
1047
1089
  // ../core/src/motionOps.ts
1048
1090
  var init_motionOps = __esm({
1049
1091
  "../core/src/motionOps.ts"() {
@@ -1262,6 +1304,10 @@ var init_src = __esm({
1262
1304
  init_path();
1263
1305
  init_presets();
1264
1306
  init_devicePreset();
1307
+ init_rig();
1308
+ init_characterPreset();
1309
+ init_figure();
1310
+ init_textFx();
1265
1311
  init_motionOps();
1266
1312
  init_audio();
1267
1313
  init_evaluate();
@@ -1361,7 +1407,7 @@ function buildLogoSting(d) {
1361
1407
  const inks = d.paths.map(
1362
1408
  (p, i) => path({ id: `ink-${i}`, d: p.d, originX: vcx, originY: vcy, x: 0, y: 0, stroke: p.fill, strokeWidth: sw, progress: 0 })
1363
1409
  );
1364
- const rig = {
1410
+ const rig2 = {
1365
1411
  group: "logo",
1366
1412
  center: [CX, CY],
1367
1413
  baseScale: fit,
@@ -1381,7 +1427,7 @@ function buildLogoSting(d) {
1381
1427
  ],
1382
1428
  timeline: seq(
1383
1429
  motionPreset(d.motion ?? "reveal-orbit", {
1384
- target: rig,
1430
+ target: rig2,
1385
1431
  ...d.energy !== void 0 && { energy: d.energy },
1386
1432
  ...d.speed !== void 0 && { speed: d.speed },
1387
1433
  ...d.intensity !== void 0 && { intensity: d.intensity },
@@ -458,8 +458,57 @@
458
458
  a[3] + (b[3] - a[3]) * u
459
459
  ]);
460
460
  }
461
+ if (looksLikePath(from) && looksLikePath(to)) {
462
+ const a = tokenizePath(from);
463
+ const b = tokenizePath(to);
464
+ if (a && b && morphCompatible(a, b)) return morphPath(a, b, u);
465
+ return u < 0.5 ? from : to;
466
+ }
461
467
  return to;
462
468
  }
469
+ var PATH_BODY = /^[\sMmLlHhVvCcSsQqTtAaZz0-9.,eE+-]+$/;
470
+ function looksLikePath(v) {
471
+ return typeof v === "string" && /^\s*[Mm]/.test(v) && PATH_BODY.test(v);
472
+ }
473
+ var PATH_TOKEN = /([MmLlHhVvCcSsQqTtAaZz])|(-?(?:\d+\.?\d*|\.\d+)(?:[eE][-+]?\d+)?)/g;
474
+ function tokenizePath(d) {
475
+ const out = [];
476
+ let cur = null;
477
+ let m;
478
+ PATH_TOKEN.lastIndex = 0;
479
+ while (m = PATH_TOKEN.exec(d)) {
480
+ if (m[1]) out.push(cur = { cmd: m[1], nums: [] });
481
+ else if (m[2]) {
482
+ if (!cur) return null;
483
+ cur.nums.push(parseFloat(m[2]));
484
+ }
485
+ }
486
+ return out.length ? out : null;
487
+ }
488
+ function morphCompatible(a, b) {
489
+ if (a.length !== b.length) return false;
490
+ for (let i = 0; i < a.length; i++) {
491
+ const ca = a[i];
492
+ const cb = b[i];
493
+ if (ca.cmd !== cb.cmd || ca.nums.length !== cb.nums.length) return false;
494
+ if (ca.cmd === "A" || ca.cmd === "a") return false;
495
+ }
496
+ return true;
497
+ }
498
+ var fmtNum = (v) => {
499
+ const r = Number(v.toFixed(3));
500
+ return Object.is(r, -0) ? "0" : String(r);
501
+ };
502
+ function morphPath(a, b, u) {
503
+ let s = "";
504
+ for (let i = 0; i < a.length; i++) {
505
+ const an = a[i].nums;
506
+ const bn = b[i].nums;
507
+ s += (i ? " " : "") + a[i].cmd;
508
+ for (let j = 0; j < an.length; j++) s += " " + fmtNum(an[j] + (bn[j] - an[j]) * u);
509
+ }
510
+ return s;
511
+ }
463
512
 
464
513
  // ../core/src/evaluate.ts
465
514
  var IDENTITY = [1, 0, 0, 1, 0, 0];