pixi-effects 0.48.1 → 0.49.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.
Files changed (88) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +51 -7
  3. package/ai/chat-template.html +8 -4
  4. package/ai/tools/check.mjs +6 -6
  5. package/dist/3d.cjs +963 -0
  6. package/dist/3d.cjs.map +1 -0
  7. package/dist/3d.d.cts +303 -0
  8. package/dist/3d.d.ts +303 -0
  9. package/dist/3d.js +956 -0
  10. package/dist/3d.js.map +1 -0
  11. package/dist/Canvas-BfZkAFJm.d.cts +12 -0
  12. package/dist/Canvas-BfZkAFJm.d.ts +12 -0
  13. package/dist/Composition-464AWDV6.cjs +16 -0
  14. package/dist/{Composition-ZZEOEETS.cjs.map → Composition-464AWDV6.cjs.map} +1 -1
  15. package/dist/Composition-5U63LMPX.js +7 -0
  16. package/dist/{Composition-BOLWGT2R.js.map → Composition-5U63LMPX.js.map} +1 -1
  17. package/dist/Controller.d.cts +2 -2
  18. package/dist/Controller.d.ts +2 -2
  19. package/dist/{Movie--qSYKgAQ.d.ts → Movie-6EWOz6Yw.d.ts} +21 -5
  20. package/dist/{Movie-svZQF-9Z.d.cts → Movie-BxB7bauG.d.cts} +21 -5
  21. package/dist/{Spans-MWYFG7RI.cjs → Spans-DUR2W5EH.cjs} +11 -11
  22. package/dist/{Spans-MWYFG7RI.cjs.map → Spans-DUR2W5EH.cjs.map} +1 -1
  23. package/dist/{Spans-PGXRMD6J.js → Spans-W5VJRMGC.js} +6 -6
  24. package/dist/{Spans-PGXRMD6J.js.map → Spans-W5VJRMGC.js.map} +1 -1
  25. package/dist/{blendModes-V5XHC7U4.cjs → blendModes-NC76DNVX.cjs} +5 -5
  26. package/dist/{blendModes-V5XHC7U4.cjs.map → blendModes-NC76DNVX.cjs.map} +1 -1
  27. package/dist/{blendModes-535EMYGK.js → blendModes-ZOBLPSR3.js} +4 -4
  28. package/dist/{blendModes-535EMYGK.js.map → blendModes-ZOBLPSR3.js.map} +1 -1
  29. package/dist/{chunk-V3VBHSK6.cjs → chunk-33USHRV5.cjs} +94 -104
  30. package/dist/chunk-33USHRV5.cjs.map +1 -0
  31. package/dist/{chunk-WYR2AU4W.cjs → chunk-5YNME6AH.cjs} +5 -5
  32. package/dist/{chunk-WYR2AU4W.cjs.map → chunk-5YNME6AH.cjs.map} +1 -1
  33. package/dist/{chunk-NGJXVJB7.cjs → chunk-ABWRISRK.cjs} +3 -2
  34. package/dist/chunk-ABWRISRK.cjs.map +1 -0
  35. package/dist/{chunk-M2LFQY2E.cjs → chunk-BSFWVTSR.cjs} +93 -93
  36. package/dist/chunk-BSFWVTSR.cjs.map +1 -0
  37. package/dist/{chunk-L3MEZZAV.js → chunk-DOGY3EAW.js} +25 -17
  38. package/dist/chunk-DOGY3EAW.js.map +1 -0
  39. package/dist/{chunk-L3XC464G.cjs → chunk-GUDLIAIG.cjs} +89 -66
  40. package/dist/chunk-GUDLIAIG.cjs.map +1 -0
  41. package/dist/{chunk-BFRWSV3R.js → chunk-H363KMJR.js} +3 -3
  42. package/dist/chunk-H363KMJR.js.map +1 -0
  43. package/dist/{chunk-JBDBICS2.js → chunk-MXACRKAN.js} +4 -4
  44. package/dist/{chunk-JBDBICS2.js.map → chunk-MXACRKAN.js.map} +1 -1
  45. package/dist/{chunk-IY5YTIK3.js → chunk-PBMDZT2T.js} +47 -24
  46. package/dist/chunk-PBMDZT2T.js.map +1 -0
  47. package/dist/{chunk-AJWUCFGM.js → chunk-USUUAYTE.js} +6 -6
  48. package/dist/chunk-USUUAYTE.js.map +1 -0
  49. package/dist/index.cjs +35 -35
  50. package/dist/index.d.cts +3 -3
  51. package/dist/index.d.ts +3 -3
  52. package/dist/index.js +5 -5
  53. package/dist/loader.css +1 -1
  54. package/dist/{music-P4JRT73P.js → music-ATX22VAT.js} +3 -3
  55. package/dist/{music-P4JRT73P.js.map → music-ATX22VAT.js.map} +1 -1
  56. package/dist/{music-XQEPBIDT.cjs → music-OFVM3PYH.cjs} +3 -3
  57. package/dist/{music-XQEPBIDT.cjs.map → music-OFVM3PYH.cjs.map} +1 -1
  58. package/dist/present.cjs +5 -5
  59. package/dist/present.d.cts +2 -2
  60. package/dist/present.d.ts +2 -2
  61. package/dist/present.js +5 -5
  62. package/dist/three.cjs +7 -8
  63. package/dist/three.cjs.map +1 -1
  64. package/dist/three.d.cts +2 -12
  65. package/dist/three.d.ts +2 -12
  66. package/dist/three.js +2 -3
  67. package/dist/three.js.map +1 -1
  68. package/dist/{types-CTSrPvY3.d.cts → types-kt7DQKfO.d.cts} +1 -1
  69. package/dist/{types-CTSrPvY3.d.ts → types-kt7DQKfO.d.ts} +1 -1
  70. package/docs/api.md +41 -1
  71. package/docs/dsl.md +81 -1
  72. package/llms-full.txt +218 -5
  73. package/package.json +19 -3
  74. package/skills/pixi-effects/SKILL.md +3 -2
  75. package/skills/pixi-effects/reference/cheatsheet.md +2 -0
  76. package/skills/pixi-effects/reference/pitfalls.md +14 -0
  77. package/skills/pixi-effects/reference/recipes.md +77 -1
  78. package/skills/pixi-effects/template.html +13 -8
  79. package/dist/Composition-BOLWGT2R.js +0 -7
  80. package/dist/Composition-ZZEOEETS.cjs +0 -16
  81. package/dist/chunk-AJWUCFGM.js.map +0 -1
  82. package/dist/chunk-BFRWSV3R.js.map +0 -1
  83. package/dist/chunk-IY5YTIK3.js.map +0 -1
  84. package/dist/chunk-L3MEZZAV.js.map +0 -1
  85. package/dist/chunk-L3XC464G.cjs.map +0 -1
  86. package/dist/chunk-M2LFQY2E.cjs.map +0 -1
  87. package/dist/chunk-NGJXVJB7.cjs.map +0 -1
  88. package/dist/chunk-V3VBHSK6.cjs.map +0 -1
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var chunkM2LFQY2E_cjs = require('./chunk-M2LFQY2E.cjs');
3
+ var chunkBSFWVTSR_cjs = require('./chunk-BSFWVTSR.cjs');
4
4
  var chunkVQXZ2NOI_cjs = require('./chunk-VQXZ2NOI.cjs');
5
- var chunkV3VBHSK6_cjs = require('./chunk-V3VBHSK6.cjs');
5
+ var chunk33USHRV5_cjs = require('./chunk-33USHRV5.cjs');
6
6
  var chunkZAHCGFGC_cjs = require('./chunk-ZAHCGFGC.cjs');
7
- var chunkWYR2AU4W_cjs = require('./chunk-WYR2AU4W.cjs');
8
- var chunkNGJXVJB7_cjs = require('./chunk-NGJXVJB7.cjs');
7
+ var chunk5YNME6AH_cjs = require('./chunk-5YNME6AH.cjs');
8
+ var chunkABWRISRK_cjs = require('./chunk-ABWRISRK.cjs');
9
9
  var chunkDOLTCXCL_cjs = require('./chunk-DOLTCXCL.cjs');
10
10
  var pixi_js = require('pixi.js');
11
11
 
@@ -1268,8 +1268,8 @@ function expandTransitions(spec) {
1268
1268
  }
1269
1269
  const transitions = out.transitions;
1270
1270
  const sequences = out.sequences ?? [];
1271
- const remap = out.duration !== void 0 ? chunkV3VBHSK6_cjs.timeRemapOf(out) : null;
1272
- const parentDuration = remap ? chunkV3VBHSK6_cjs.contentLength(remap, out.duration) : out.duration ?? Infinity;
1271
+ const remap = out.duration !== void 0 ? chunk33USHRV5_cjs.timeRemapOf(out) : null;
1272
+ const parentDuration = remap ? chunk33USHRV5_cjs.contentLength(remap, out.duration) : out.duration ?? Infinity;
1273
1273
  const compW = out.width;
1274
1274
  const compH = out.height;
1275
1275
  const threeDByName = new Set(sequences.filter((s) => s.name && s.threeD).map((s) => s.name));
@@ -1337,16 +1337,16 @@ function expandTransitions(spec) {
1337
1337
  if (toUses > 1) {
1338
1338
  throw new Error(`pixi-effects: ${tag} sequence "${t.to}" is used as \`to\` in more than one transition`);
1339
1339
  }
1340
- const tStart = chunkV3VBHSK6_cjs.resolveAt(t.at, parentDuration);
1340
+ const tStart = chunk33USHRV5_cjs.resolveAt(t.at, parentDuration);
1341
1341
  const tEnd = tStart + t.duration;
1342
1342
  const fromSeq = fromEntry.seq;
1343
- const fromStart = chunkV3VBHSK6_cjs.resolveAt(fromSeq.at, parentDuration);
1343
+ const fromStart = chunk33USHRV5_cjs.resolveAt(fromSeq.at, parentDuration);
1344
1344
  const fromEnd = fromStart + (fromSeq.duration ?? parentDuration);
1345
1345
  if (tStart < fromStart - EPS || tEnd > fromEnd + EPS) {
1346
1346
  throw new Error(`pixi-effects: ${tag} window [${tStart}, ${tEnd}] is not covered by \`from\` "${t.from}" (lives [${fromStart}, ${fromEnd}], so it ends at ${fromEnd})`);
1347
1347
  }
1348
1348
  const toSeq = toEntry.seq;
1349
- const toStart = chunkV3VBHSK6_cjs.resolveAt(toSeq.at, parentDuration);
1349
+ const toStart = chunk33USHRV5_cjs.resolveAt(toSeq.at, parentDuration);
1350
1350
  const toEnd = toStart + (toSeq.duration ?? parentDuration);
1351
1351
  if (tStart < toStart - EPS || tEnd > toEnd + EPS) {
1352
1352
  throw new Error(`pixi-effects: ${tag} window [${tStart}, ${tEnd}] is not covered by \`to\` "${t.to}" (lives [${toStart}, ${toEnd}], so it starts at ${toStart})`);
@@ -1406,7 +1406,7 @@ function wrapAsFullComposition(seq, compW, compH) {
1406
1406
  delete inner.at;
1407
1407
  delete inner.duration;
1408
1408
  const m = inner.mask;
1409
- const carriesMatte = m !== void 0 && chunkM2LFQY2E_cjs.maskSourceOf(m).kind === "refs";
1409
+ const carriesMatte = m !== void 0 && chunkBSFWVTSR_cjs.maskSourceOf(m).kind === "refs";
1410
1410
  if (carriesMatte) delete inner.mask;
1411
1411
  return {
1412
1412
  ...carriesMatte ? { mask: m } : {},
@@ -1671,12 +1671,14 @@ function canvasReport(root) {
1671
1671
  const length = seq.duration ?? 0;
1672
1672
  const moments = [0.15, 0.4, 0.65, 0.9].map((f) => Math.round(f * length * 1e3) / 1e3);
1673
1673
  const { differs, drawMs, threw } = seq.checkDeterminism(moments);
1674
- const name = chunkNGJXVJB7_cjs.describeLayer(seq.spec);
1675
- const kind = seq.spec.type === "three" ? "three" : "canvas";
1676
- const problem = threw.length ? `${name} could not draw at ${threw.map((t) => `${t} s`).join(", ")} (its ${kind === "three" ? "update or render threw" : "draw threw"}, or the layer failed to build): ${kind === "three" ? "the warning above says why" : "it shows a magenta checkerboard there; the warning above says why"}, so the layer cannot be called deterministic` : differs.length ? `${name} does not draw the same picture for the same time (checked at ${differs.map(describeDiff).join(", ")}; drawn in two orders after one draw that was thrown away): ` + (kind === "three" ? "usually its update uses Math.random, Date.now, a clock, or state that builds up from call to call: a mixer advanced with mixer.update(dt) is one (pose a clip with mixer.setTime(t), or threeGltf(url).pose(t)), and so is a value moved by the time since the last call. A skinned model of your own (not loaded by threeGltf) that moves and casts a shadow does it too: three culls a skinned mesh by a bounding sphere that does not follow it, so set mesh.frustumCulled = false. Set every object from t, so playback, a seek and an export agree" : "usually its draw uses Math.random, Date.now or state that outlives the call (a value it keeps from the last call), so playback, a seek and an export would not agree: use info.random() (seeded) and derive everything from t. If it uses none of these, look at the canvases it draws from: make sprites and masks with info.canvas(w, h) (not document.createElement) and draw them into the picture before the strokes that depend on them") : "";
1674
+ const name = chunkABWRISRK_cjs.describeLayer(seq.spec);
1675
+ const type = seq.spec.type;
1676
+ const kind = type === "three" ? "three" : type === "scene3d" ? "scene3d" : "canvas";
1677
+ const drawn = kind === "canvas" ? "draw threw" : "update or render threw";
1678
+ const problem = threw.length ? `${name} could not draw at ${threw.map((t) => `${t} s`).join(", ")} (its ${drawn}, or the layer failed to build): ${kind === "canvas" ? "it shows a magenta checkerboard there; the warning above says why" : "the warning above says why"}, so the layer cannot be called deterministic` : differs.length ? `${name} does not draw the same picture for the same time (checked at ${differs.map(describeDiff).join(", ")}; drawn in two orders after one draw that was thrown away): ` + (kind === "three" ? "usually its update uses Math.random, Date.now, a clock, or state that builds up from call to call: a mixer advanced with mixer.update(dt) is one (pose a clip with mixer.setTime(t), or threeGltf(url).pose(t)), and so is a value moved by the time since the last call. A skinned model of your own (not loaded by threeGltf) that moves and casts a shadow does it too: three culls a skinned mesh by a bounding sphere that does not follow it, so set mesh.frustumCulled = false. Set every object from t, so playback, a seek and an export agree" : kind === "scene3d" ? "usually its update keeps state from call to call (a value moved by the time since the last call), uses Math.random or a clock, or a model's player or a particle system runs on its own clock (pose a clip with model.player.getState(name).gotoAndStop(t)), or a MotionBlurEffect reads the camera of the frame drawn before. Set every object from t, so playback, a seek and an export agree" : "usually its draw uses Math.random, Date.now or state that outlives the call (a value it keeps from the last call), so playback, a seek and an export would not agree: use info.random() (seeded) and derive everything from t. If it uses none of these, look at the canvases it draws from: make sprites and masks with info.canvas(w, h) (not document.createElement) and draw them into the picture before the strokes that depend on them") : "";
1677
1679
  out.push({ name: seq.spec.name ?? name, moments, drawMs, ok: !differs.length && !threw.length, problem, kind });
1678
1680
  }
1679
- if (seq instanceof chunkM2LFQY2E_cjs.CompositionSequence) walk3(seq);
1681
+ if (seq instanceof chunkBSFWVTSR_cjs.CompositionSequence) walk3(seq);
1680
1682
  };
1681
1683
  const walk3 = (comp) => {
1682
1684
  for (const { seq } of comp.layers()) {
@@ -1728,8 +1730,8 @@ function motionOf(keyframes, local, lives, keys = (k) => GEOMETRY.has(k)) {
1728
1730
  let length = 0;
1729
1731
  if (typeof kf.duration === "number") length = kf.duration;
1730
1732
  else if (kf.duration === "auto") {
1731
- const sp = chunkV3VBHSK6_cjs.parseSpring(kf.ease);
1732
- length = sp ? Math.round(chunkV3VBHSK6_cjs.springDuration(sp) * 1e3) / 1e3 : 0.5;
1733
+ const sp = chunk33USHRV5_cjs.parseSpring(kf.ease);
1734
+ length = sp ? Math.round(chunk33USHRV5_cjs.springDuration(sp) * 1e3) / 1e3 : 0.5;
1733
1735
  }
1734
1736
  if (!(length > 0)) continue;
1735
1737
  const kat = kf.at ?? 0;
@@ -1809,7 +1811,7 @@ function inspectScene(root, frame, time, canvas, opts = {}) {
1809
1811
  if (motion.ever) hasMotion.add(info);
1810
1812
  let shown = bounds ? clip(bounds, view) : null;
1811
1813
  const maskTarget = seq.maskSequence?.target;
1812
- const maskSrc = chunkM2LFQY2E_cjs.maskSourceOf(seq.spec.mask);
1814
+ const maskSrc = chunkBSFWVTSR_cjs.maskSourceOf(seq.spec.mask);
1813
1815
  if (shown && maskTarget && !(maskSrc.kind === "inline" && maskSrc.invert)) {
1814
1816
  const m = maskTarget.getBounds();
1815
1817
  shown = clip(shown, { x: m.x, y: m.y, width: m.width, height: m.height });
@@ -1818,7 +1820,7 @@ function inspectScene(root, frame, time, canvas, opts = {}) {
1818
1820
  const group = parentScene ?? (name !== void 0 && blending.has(name) ? name : void 0);
1819
1821
  if (group) scene.set(info, group);
1820
1822
  if (zero || seq.showsNothingYet) scaledToNothing.add(info);
1821
- if (seq instanceof chunkM2LFQY2E_cjs.CompositionSequence) walk3(seq, prefix + label + "/", insideThreeD || threeD, visible, group, motion, zero, parentAlpha * alpha);
1823
+ if (seq instanceof chunkBSFWVTSR_cjs.CompositionSequence) walk3(seq, prefix + label + "/", insideThreeD || threeD, visible, group, motion, zero, parentAlpha * alpha);
1822
1824
  });
1823
1825
  };
1824
1826
  walk3(root, "", false, true);
@@ -1990,12 +1992,12 @@ function pickScene(root, x, y, opts = {}, deps = {}) {
1990
1992
  const alive = (threeD ? d.visible : (t?.renderable ?? true) && t?.visible !== false) && carriers.every((c) => c.target?.renderable ?? true);
1991
1993
  const visible = parentVisible && alive && alpha > 0;
1992
1994
  if (!visible) {
1993
- if (seq instanceof chunkM2LFQY2E_cjs.CompositionSequence && !threeD && parentVisible && alpha > 0 && t?.visible === false && (t?.renderable ?? true) && carriers.every((c) => c.target?.renderable ?? true)) hiddenSources.set(seq, path);
1995
+ if (seq instanceof chunkBSFWVTSR_cjs.CompositionSequence && !threeD && parentVisible && alpha > 0 && t?.visible === false && (t?.renderable ?? true) && carriers.every((c) => c.target?.renderable ?? true)) hiddenSources.set(seq, path);
1994
1996
  return;
1995
1997
  }
1996
- const isComposition = seq instanceof chunkM2LFQY2E_cjs.CompositionSequence;
1998
+ const isComposition = seq instanceof chunkBSFWVTSR_cjs.CompositionSequence;
1997
1999
  if (isComposition && !threeD) {
1998
- const gm = seq.maskSequence?.target, gs = chunkM2LFQY2E_cjs.maskSourceOf(seq.spec.mask);
2000
+ const gm = seq.maskSequence?.target, gs = chunkBSFWVTSR_cjs.maskSourceOf(seq.spec.mask);
1999
2001
  if (gm && gs.kind === "inline" && !gs.invert && !inMask(gm, at)) return;
2000
2002
  walk3(seq, path + "/", visible, at, orderBase, via);
2001
2003
  return;
@@ -2031,7 +2033,8 @@ function pickScene(root, x, y, opts = {}, deps = {}) {
2031
2033
  } };
2032
2034
  };
2033
2035
  }
2034
- hit = { name, path, type: seq.spec.type, kind: "three", point, three };
2036
+ const type = seq.spec.type;
2037
+ hit = type === "scene3d" ? { name, path, type, kind: "scene3d", point, scene3d: { object: String(three.object), point: three.point, distance: three.distance, node: three.object3d, ...three.grab ? { grab: three.grab } : {} } } : { name, path, type, kind: "three", point, three };
2035
2038
  } else if (three === void 0 && (typeof d.containsPoint !== "function" || d.containsPoint(local))) {
2036
2039
  let opaque = true;
2037
2040
  const tex = opts.alpha !== void 0 && seq.spec.type !== "shader" ? d.texture ?? deps.textureOf?.(d) : void 0;
@@ -2051,7 +2054,7 @@ function pickScene(root, x, y, opts = {}, deps = {}) {
2051
2054
  }
2052
2055
  if (!hit) return;
2053
2056
  const maskTarget = seq.maskSequence?.target;
2054
- const maskSrc = chunkM2LFQY2E_cjs.maskSourceOf(seq.spec.mask);
2057
+ const maskSrc = chunkBSFWVTSR_cjs.maskSourceOf(seq.spec.mask);
2055
2058
  if (maskTarget && !(maskSrc.kind === "inline" && maskSrc.invert) && !(maskSrc.kind === "inline" ? inMask(maskTarget, point) : inside(maskTarget.getBounds(), point))) return;
2056
2059
  found.push({ hit: via ? { ...hit, point: { x, y }, via } : hit, order: orderBase ? [...orderBase, ...orderOf(d)] : orderOf(d) });
2057
2060
  });
@@ -2061,7 +2064,7 @@ function pickScene(root, x, y, opts = {}, deps = {}) {
2061
2064
  const path = hiddenSources.get(f.source);
2062
2065
  if (path === void 0) continue;
2063
2066
  const g = f.source.target.toGlobal({ x: f.at.x * f.source.intrinsicWidth, y: f.at.y * f.source.intrinsicHeight });
2064
- const sm = f.source.maskSequence?.target, ss = chunkM2LFQY2E_cjs.maskSourceOf(f.source.spec.mask);
2067
+ const sm = f.source.maskSequence?.target, ss = chunkBSFWVTSR_cjs.maskSourceOf(f.source.spec.mask);
2065
2068
  if (sm && ss.kind === "inline" && !ss.invert && !inMask(sm, g)) continue;
2066
2069
  walk3(f.source, path + "/", true, g, f.order, f.via);
2067
2070
  }
@@ -2097,7 +2100,7 @@ function walk(root, visit) {
2097
2100
  visit(seq);
2098
2101
  const mask = seq.maskSequence;
2099
2102
  if (mask) visit(mask);
2100
- if (seq instanceof chunkM2LFQY2E_cjs.CompositionSequence) walk(seq, visit);
2103
+ if (seq instanceof chunkBSFWVTSR_cjs.CompositionSequence) walk(seq, visit);
2101
2104
  }
2102
2105
  }
2103
2106
  function reusePoolOf(old) {
@@ -2198,7 +2201,7 @@ var round = (n) => Math.round(n * 1e6) / 1e6;
2198
2201
  var family = (name) => name.replace(/\d+/g, "#");
2199
2202
  function detailOf(seq) {
2200
2203
  const s = seq.spec;
2201
- const spans = chunkV3VBHSK6_cjs.spansMeta.get(seq.spec)?.preview;
2204
+ const spans = chunk33USHRV5_cjs.spansMeta.get(seq.spec)?.preview;
2202
2205
  if (spans) return spans.length > 60 ? spans.slice(0, 57) + "\u2026" : spans;
2203
2206
  if (typeof s.text === "string") return s.text.length > 60 ? s.text.slice(0, 57) + "\u2026" : s.text;
2204
2207
  if (typeof s.asset === "string") return `asset \u201C${s.asset}\u201D`;
@@ -2214,10 +2217,10 @@ function walk2(comp, parentStart, parentEnd, depth, prefix, rows, transitions, l
2214
2217
  const start = parentStart + (seq.at ?? 0);
2215
2218
  const end = Math.min(parentEnd, seq.duration !== void 0 ? start + seq.duration : parentEnd);
2216
2219
  const span = end - start;
2217
- const keys = (seq.spec.keyframes ?? []).map((kf) => round(start + chunkV3VBHSK6_cjs.resolveAt(kf.at, span))).sort((a, b) => a - b).slice(0, MAX_KEYS);
2220
+ const keys = (seq.spec.keyframes ?? []).map((kf) => round(start + chunk33USHRV5_cjs.resolveAt(kf.at, span))).sort((a, b) => a - b).slice(0, MAX_KEYS);
2218
2221
  const row = { path: prefix + name, name, type: seq.spec.type, depth, start: round(start), end: round(end), keys, detail: detailOf(seq), ...local ? { local } : {} };
2219
2222
  const inner = [];
2220
- const isComp = seq instanceof chunkM2LFQY2E_cjs.CompositionSequence;
2223
+ const isComp = seq instanceof chunkBSFWVTSR_cjs.CompositionSequence;
2221
2224
  if (isComp) {
2222
2225
  const label = seq.remapLabel();
2223
2226
  walk2(seq, label ? 0 : start, label ? seq.contentSpan : end, depth + 1, prefix + name + "/", inner, transitions, label ? `${name} ${label}` : local);
@@ -2376,7 +2379,7 @@ function sheetLayout(n, columns, cellW, srcW, srcH, labelH) {
2376
2379
  }
2377
2380
 
2378
2381
  // src/core/vars.ts
2379
- var RESERVED_NAMES = ["w", "h", "W", "H", "GW", "GH", "t", "d", "T", "contain", "cover", "value", ...chunkV3VBHSK6_cjs.EXPRESSION_NAMES];
2382
+ var RESERVED_NAMES = ["w", "h", "W", "H", "GW", "GH", "t", "d", "T", "contain", "cover", "value", ...chunk33USHRV5_cjs.EXPRESSION_NAMES];
2380
2383
  var NAME = /^[A-Za-z_][A-Za-z0-9_]*$/;
2381
2384
  var isPlain = (v) => !!v && typeof v === "object" && (Object.getPrototypeOf(v) === Object.prototype || Object.getPrototypeOf(v) === null);
2382
2385
  function normalizeVars(raw, where, warn = (m) => console.warn(m)) {
@@ -2920,8 +2923,8 @@ var Movie = class {
2920
2923
  this.stops = normalizeStops(applyVars(options.composition, this._vars)?.stops, this.duration, this.frameRate);
2921
2924
  this._posterFrame = poster.frame;
2922
2925
  this.background = options.background ?? "#000000";
2923
- this.timeline = chunkV3VBHSK6_cjs.createTimeline({ paused: true, defaults: { ease: "none" } });
2924
- chunkV3VBHSK6_cjs.lengthen(this.timeline, this.duration);
2926
+ this.timeline = chunk33USHRV5_cjs.createTimeline({ paused: true, defaults: { ease: "none" } });
2927
+ chunk33USHRV5_cjs.lengthen(this.timeline, this.duration);
2925
2928
  const baseAppOptions = {
2926
2929
  width: this.width,
2927
2930
  height: this.height,
@@ -2932,6 +2935,7 @@ var Movie = class {
2932
2935
  preserveDrawingBuffer: true,
2933
2936
  canvas: options.canvas
2934
2937
  };
2938
+ installQuietUnbind();
2935
2939
  this.app = new pixi_js.Application();
2936
2940
  try {
2937
2941
  await this.app.init({ ...baseAppOptions, preference: "webgpu" });
@@ -3020,8 +3024,8 @@ var Movie = class {
3020
3024
  height: sizeWins ? height : spec.height ?? height,
3021
3025
  duration: spec.duration ?? this.duration
3022
3026
  } : void 0;
3023
- await chunkV3VBHSK6_cjs.ensureFilterLibrary(seededComposition);
3024
- if (chunkWYR2AU4W_cjs.usesAdvancedBlend(seededComposition)) await chunkWYR2AU4W_cjs.enableAdvancedBlend(this.app.renderer);
3027
+ await chunk33USHRV5_cjs.ensureFilterLibrary(seededComposition);
3028
+ if (chunk5YNME6AH_cjs.usesAdvancedBlend(seededComposition)) await chunk5YNME6AH_cjs.enableAdvancedBlend(this.app.renderer);
3025
3029
  const userComposition = seededComposition ? expandTransitions(seededComposition) : void 0;
3026
3030
  const rootSeqSpec = {
3027
3031
  type: "composition",
@@ -3031,7 +3035,7 @@ var Movie = class {
3031
3035
  ...userComposition
3032
3036
  };
3033
3037
  if (userComposition) carryTransitionWindows(userComposition, rootSeqSpec);
3034
- const sequence = new chunkM2LFQY2E_cjs.CompositionSequence(rootSeqSpec, null, rootShape);
3038
+ const sequence = new chunkBSFWVTSR_cjs.CompositionSequence(rootSeqSpec, null, rootShape);
3035
3039
  lp?.begin("build", countLayers(rootSeqSpec));
3036
3040
  try {
3037
3041
  await sequence.build();
@@ -3170,8 +3174,8 @@ var Movie = class {
3170
3174
  if (!changed) return { reason, ms: 0, audio: "none", frame: this.currentFrame, playing: this.isPlaying, unchanged: true };
3171
3175
  sequence = await this._construct(composition, vars, width, height, void 0, this._resized || sizeChanged, reusePoolOf(this._rootSequence));
3172
3176
  alive();
3173
- const timeline = chunkV3VBHSK6_cjs.createTimeline({ paused: true, defaults: { ease: "none" } });
3174
- chunkV3VBHSK6_cjs.lengthen(timeline, this.duration);
3177
+ const timeline = chunk33USHRV5_cjs.createTimeline({ paused: true, defaults: { ease: "none" } });
3178
+ chunk33USHRV5_cjs.lengthen(timeline, this.duration);
3175
3179
  sequence.bindTimeline(timeline);
3176
3180
  const hadSound = this.audioBuffer !== null;
3177
3181
  const audio = await this._mixSound(sequence, this._ensureAudioContext());
@@ -3211,11 +3215,11 @@ var Movie = class {
3211
3215
  commitReuse(sequence);
3212
3216
  this.timeline = timeline;
3213
3217
  this._timeFilters = collectTimeFilters(sequence);
3214
- const unmute = muteBoundTextureWarning();
3218
+ const loud = quietUnbind();
3215
3219
  try {
3216
3220
  safeRun(() => old?.destroy());
3217
3221
  } finally {
3218
- unmute();
3222
+ loud();
3219
3223
  }
3220
3224
  safeRun(() => oldTimeline?.kill());
3221
3225
  this._vars = vars;
@@ -3888,7 +3892,7 @@ var Movie = class {
3888
3892
  async destroy() {
3889
3893
  safeRun(() => this.pause());
3890
3894
  this._timeFilters = [];
3891
- const unmute = muteBoundTextureWarning();
3895
+ const loud = quietUnbind();
3892
3896
  try {
3893
3897
  safeRun(() => this._rootSequence?.destroy());
3894
3898
  this._rootSequence = null;
@@ -3897,7 +3901,7 @@ var Movie = class {
3897
3901
  safeRun(() => this.app?.destroy(true, { children: true, texture: true }));
3898
3902
  this.app = null;
3899
3903
  } finally {
3900
- unmute();
3904
+ loud();
3901
3905
  }
3902
3906
  this.audioBuffer = null;
3903
3907
  this._audioSources = [];
@@ -3910,15 +3914,34 @@ var Movie = class {
3910
3914
  }
3911
3915
  };
3912
3916
  var END_MARGIN = 1e-4;
3913
- function muteBoundTextureWarning() {
3914
- const original = console.warn;
3915
- const ours = (...args) => {
3916
- if (args.some((a) => /destroyed while still bound/.test(String(a)))) return;
3917
- original.apply(console, args);
3917
+ var quietDepth = 0;
3918
+ var quietInstalled = false;
3919
+ function installQuietUnbind() {
3920
+ if (quietInstalled) return;
3921
+ quietInstalled = true;
3922
+ const proto = pixi_js.BindGroup.prototype;
3923
+ const original = proto.onResourceChange;
3924
+ if (typeof original !== "function") return;
3925
+ proto.onResourceChange = function(resource) {
3926
+ if (!quietDepth || !resource?.destroyed) {
3927
+ original.call(this, resource);
3928
+ return;
3929
+ }
3930
+ this._dirty = true;
3931
+ const resources = this.resources;
3932
+ if (resources) {
3933
+ for (const i in resources) if (resources[i] === resource) resources[i] = null;
3934
+ }
3918
3935
  };
3919
- console.warn = ours;
3936
+ }
3937
+ function quietUnbind() {
3938
+ quietDepth++;
3939
+ let done = false;
3920
3940
  return () => {
3921
- if (console.warn === ours) console.warn = original;
3941
+ if (!done) {
3942
+ done = true;
3943
+ quietDepth--;
3944
+ }
3922
3945
  };
3923
3946
  }
3924
3947
  var clampFrame = (f, last) => Math.max(0, Math.min(Math.round(f), last));
@@ -3951,7 +3974,7 @@ function countLayers(spec) {
3951
3974
  n += 1 + countLayers(s);
3952
3975
  const spans = s.spans;
3953
3976
  if (Array.isArray(spans)) n += spans.length;
3954
- const src = chunkM2LFQY2E_cjs.maskSourceOf(mask);
3977
+ const src = chunkBSFWVTSR_cjs.maskSourceOf(mask);
3955
3978
  if (src.kind === "inline") n += 1 + countLayers(src.spec);
3956
3979
  }
3957
3980
  return n;
@@ -4040,8 +4063,8 @@ function splitVertical(text, style, ts, right, top, align, by) {
4040
4063
 
4041
4064
  // src/presets/_ease.ts
4042
4065
  function parseEase2(name) {
4043
- chunkV3VBHSK6_cjs.checkEase(name, "a preset");
4044
- return chunkV3VBHSK6_cjs.parseEase(name);
4066
+ chunk33USHRV5_cjs.checkEase(name, "a preset");
4067
+ return chunk33USHRV5_cjs.parseEase(name);
4045
4068
  }
4046
4069
 
4047
4070
  // src/presets/kenBurns.ts
@@ -4176,17 +4199,17 @@ function orbit(opts) {
4176
4199
  throw new Error("pixi-effects: orbit() cannot combine `radius` with `dollyZoom` \u2014 the radius follows the animated fov");
4177
4200
  }
4178
4201
  const [cx, cy] = opts.center ?? [width / 2, height / 2];
4179
- const fixedR = opts.radius ?? chunkV3VBHSK6_cjs.homeDistance(height, fov ?? chunkV3VBHSK6_cjs.DEFAULT_FOV);
4202
+ const fixedR = opts.radius ?? chunk33USHRV5_cjs.homeDistance(height, fov ?? chunk33USHRV5_cjs.DEFAULT_FOV);
4180
4203
  const start = opts.start ?? -degrees / 2;
4181
4204
  const steps = Math.max(1, Math.round(duration * stepsPerSecond));
4182
4205
  const easeFn = parseEase2(ease);
4183
4206
  const dollyEase = dolly ? parseEase2(dolly.ease ?? ease) : null;
4184
4207
  const pos = (i) => {
4185
4208
  const p = i / steps;
4186
- const a = (start + degrees * easeFn(p)) * chunkV3VBHSK6_cjs.DEG;
4209
+ const a = (start + degrees * easeFn(p)) * chunk33USHRV5_cjs.DEG;
4187
4210
  if (!dolly) return { x: cx + fixedR * Math.sin(a), z: fixedR * Math.cos(a) };
4188
4211
  const f = dolly.from + (dolly.to - dolly.from) * dollyEase(p);
4189
- const R = chunkV3VBHSK6_cjs.homeDistance(height, f);
4212
+ const R = chunk33USHRV5_cjs.homeDistance(height, f);
4190
4213
  return { x: cx + R * Math.sin(a), z: R * Math.cos(a), fov: f };
4191
4214
  };
4192
4215
  const keyframes = [];
@@ -4241,7 +4264,7 @@ function particles(opts) {
4241
4264
  const round2 = (v) => Math.round(v * 1e6) / 1e6;
4242
4265
  const out = [];
4243
4266
  for (let i = 0; i < count; i++) {
4244
- const r = chunkV3VBHSK6_cjs.random(seed * 1000003 + i * 7919 + 17);
4267
+ const r = chunk33USHRV5_cjs.random(seed * 1000003 + i * 7919 + 17);
4245
4268
  const pick = ([a2, b]) => a2 + r() * (b - a2);
4246
4269
  const born = at + r() * emit;
4247
4270
  const lifetime = pick(life);
@@ -4254,7 +4277,7 @@ function particles(opts) {
4254
4277
  const turn = spin ? pick(spin) : 0;
4255
4278
  const startAngle = spin ? r() * 360 : 0;
4256
4279
  const swayAmp = sway?.amp ?? 0, swayFreq = sway?.freq ?? 1;
4257
- const n0 = sway ? chunkV3VBHSK6_cjs.noise(0, seed * 1000003 + i) : 0;
4280
+ const n0 = sway ? chunk33USHRV5_cjs.noise(0, seed * 1000003 + i) : 0;
4258
4281
  const at_ = (t) => {
4259
4282
  const axis = (p0, v0, acc) => {
4260
4283
  if (drag > 0) {
@@ -4263,7 +4286,7 @@ function particles(opts) {
4263
4286
  }
4264
4287
  return p0 + v0 * t + 0.5 * acc * t * t;
4265
4288
  };
4266
- const sw = sway ? swayAmp * (chunkV3VBHSK6_cjs.noise(t * swayFreq, seed * 1000003 + i) - n0) : 0;
4289
+ const sw = sway ? swayAmp * (chunk33USHRV5_cjs.noise(t * swayFreq, seed * 1000003 + i) - n0) : 0;
4267
4290
  return { x: axis(x0, vx, wind) + sw, y: axis(y0, vy, gravity) };
4268
4291
  };
4269
4292
  const kfs = [];
@@ -4325,7 +4348,7 @@ function followPath(opts) {
4325
4348
  if (steps > MAX_STEPS) throw new Error(`followPath(): ${steps} samples is too many (max ${MAX_STEPS}); lower frameRate or duration`);
4326
4349
  const segments = [];
4327
4350
  let total = 0;
4328
- for (const line of chunkV3VBHSK6_cjs.flattenSvgPath(d)) {
4351
+ for (const line of chunk33USHRV5_cjs.flattenSvgPath(d)) {
4329
4352
  const p = line.closed ? [...line.pts, line.pts[0], line.pts[1]] : line.pts;
4330
4353
  for (let i = 2; i < p.length; i += 2) {
4331
4354
  const len = Math.hypot(p[i] - p[i - 2], p[i + 1] - p[i - 1]);
@@ -4378,7 +4401,7 @@ function followPath(opts) {
4378
4401
  // src/core/pathSample.ts
4379
4402
  function samplePath(d) {
4380
4403
  if (typeof d !== "string" || d.trim() === "") throw new Error('samplePath(): d must be SVG path data, e.g. "M 40 300 C 200 20 400 20 560 300"');
4381
- const lines = chunkV3VBHSK6_cjs.flattenSvgPath(d);
4404
+ const lines = chunk33USHRV5_cjs.flattenSvgPath(d);
4382
4405
  const segments = [];
4383
4406
  let length = 0;
4384
4407
  for (const line of lines) {
@@ -4409,7 +4432,7 @@ function samplePath(d) {
4409
4432
  return { x: g.x0 + (g.x1 - g.x0) * t, y: g.y0 + (g.y1 - g.y0) * t, angle: Math.atan2(g.y1 - g.y0, g.x1 - g.x0) };
4410
4433
  },
4411
4434
  trim(start = 0, end = 1) {
4412
- return chunkV3VBHSK6_cjs.trimPolylines(lines, start, end).map((l) => l.closed ? [...l.pts, l.pts[0], l.pts[1]] : l.pts);
4435
+ return chunk33USHRV5_cjs.trimPolylines(lines, start, end).map((l) => l.closed ? [...l.pts, l.pts[0], l.pts[1]] : l.pts);
4413
4436
  }
4414
4437
  };
4415
4438
  }
@@ -4520,7 +4543,7 @@ function distances(n, from, grid, seed) {
4520
4543
  if (n === 0) return [];
4521
4544
  if (from === "random") {
4522
4545
  const order = Array.from({ length: n }, (_, i) => i);
4523
- const r = chunkV3VBHSK6_cjs.random(seed);
4546
+ const r = chunk33USHRV5_cjs.random(seed);
4524
4547
  for (let i = n - 1; i > 0; i--) {
4525
4548
  const j = Math.floor(r() * (i + 1));
4526
4549
  [order[i], order[j]] = [order[j], order[i]];
@@ -4582,7 +4605,7 @@ function wiggle(opts) {
4582
4605
  to[n] = p.around;
4583
4606
  return;
4584
4607
  }
4585
- const off = (chunkV3VBHSK6_cjs.rand(seed * 7919 + pi * 104729 + s * 31 + 1) * 2 - 1) * p.amp;
4608
+ const off = (chunk33USHRV5_cjs.rand(seed * 7919 + pi * 104729 + s * 31 + 1) * 2 - 1) * p.amp;
4586
4609
  to[n] = typeof p.around === "number" ? p.around + off : `(${p.around}) ${off < 0 ? "-" : "+"} ${Math.abs(off)}`;
4587
4610
  });
4588
4611
  out.push({ at: at + s * stepLen, to, duration: stepLen, ease });
@@ -4970,7 +4993,7 @@ async function audioEnvelope(source, options = {}) {
4970
4993
 
4971
4994
  // src/audio/musicEnvelope.ts
4972
4995
  async function musicEnvelope(music, options = {}) {
4973
- const { resolveMusic, renderMusic, musicLength, musicBeatTimes, TempoMap } = await import('./music-XQEPBIDT.cjs');
4996
+ const { resolveMusic, renderMusic, musicLength, musicBeatTimes, TempoMap } = await import('./music-OFVM3PYH.cjs');
4974
4997
  const messages = [];
4975
4998
  const m = resolveMusic(music, "musicEnvelope()", (msg) => messages.push(msg));
4976
4999
  if (!m) throw new Error(`pixi-effects: musicEnvelope(): ${messages.join(" ") || "the music has nothing to play"}`);
@@ -4983,7 +5006,7 @@ async function musicEnvelope(music, options = {}) {
4983
5006
 
4984
5007
  // src/audio/musicBuffer.ts
4985
5008
  async function musicBuffer(music, options = {}) {
4986
- const { resolveMusic, renderMusic, musicLength } = await import('./music-XQEPBIDT.cjs');
5009
+ const { resolveMusic, renderMusic, musicLength } = await import('./music-OFVM3PYH.cjs');
4987
5010
  const messages = [];
4988
5011
  const m = resolveMusic(music, "musicBuffer()", (msg) => messages.push(msg));
4989
5012
  if (!m) throw new Error(`pixi-effects: musicBuffer(): ${messages.join(" ") || "the music has nothing to play"}`);
@@ -5000,7 +5023,7 @@ async function musicBuffer(music, options = {}) {
5000
5023
 
5001
5024
  // src/audio/musicEvents.ts
5002
5025
  async function musicEvents(music) {
5003
- const { resolveMusic } = await import('./music-XQEPBIDT.cjs');
5026
+ const { resolveMusic } = await import('./music-OFVM3PYH.cjs');
5004
5027
  const { describeEvents } = await import('./events-EE3SM5LM.cjs');
5005
5028
  const messages = [];
5006
5029
  const m = resolveMusic(music, "musicEvents()", (msg) => messages.push(msg));
@@ -5053,5 +5076,5 @@ exports.splitText = splitText;
5053
5076
  exports.stagger = stagger;
5054
5077
  exports.wiggle = wiggle;
5055
5078
  exports.withFade = withFade;
5056
- //# sourceMappingURL=chunk-L3XC464G.cjs.map
5057
- //# sourceMappingURL=chunk-L3XC464G.cjs.map
5079
+ //# sourceMappingURL=chunk-GUDLIAIG.cjs.map
5080
+ //# sourceMappingURL=chunk-GUDLIAIG.cjs.map