pixi-effects 0.33.0 → 0.35.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 (55) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +5 -5
  3. package/ai/chat-template.html +3 -3
  4. package/dist/Composition-NDXKQHB4.js +7 -0
  5. package/dist/{Composition-7XNPTM7L.js.map → Composition-NDXKQHB4.js.map} +1 -1
  6. package/dist/Composition-OLH7RC5Z.cjs +16 -0
  7. package/dist/{Composition-L6OALWHI.cjs.map → Composition-OLH7RC5Z.cjs.map} +1 -1
  8. package/dist/Controller.cjs +130 -1
  9. package/dist/Controller.cjs.map +1 -1
  10. package/dist/Controller.d.cts +23 -1
  11. package/dist/Controller.d.ts +23 -1
  12. package/dist/Controller.js +130 -1
  13. package/dist/Controller.js.map +1 -1
  14. package/dist/{Movie-CL6SsAWe.d.cts → Movie-Db4QnMIH.d.cts} +24 -1
  15. package/dist/{Movie-f0tQG9y5.d.ts → Movie-VYtUN4TS.d.ts} +24 -1
  16. package/dist/{Spans-KPZ2QDCN.js → Spans-QHHWC2PB.js} +4 -4
  17. package/dist/{Spans-KPZ2QDCN.js.map → Spans-QHHWC2PB.js.map} +1 -1
  18. package/dist/{Spans-VXNQXSI3.cjs → Spans-QRMN2EZO.cjs} +9 -9
  19. package/dist/{Spans-VXNQXSI3.cjs.map → Spans-QRMN2EZO.cjs.map} +1 -1
  20. package/dist/{chunk-WST432AP.js → chunk-2GNK6DPV.js} +88 -10
  21. package/dist/chunk-2GNK6DPV.js.map +1 -0
  22. package/dist/{chunk-SBBXKPBP.cjs → chunk-5IJENZOG.cjs} +62 -62
  23. package/dist/{chunk-SBBXKPBP.cjs.map → chunk-5IJENZOG.cjs.map} +1 -1
  24. package/dist/{chunk-LD4VKNPQ.cjs → chunk-7TTCPHAV.cjs} +120 -42
  25. package/dist/chunk-7TTCPHAV.cjs.map +1 -0
  26. package/dist/{chunk-BVMZUPDU.cjs → chunk-LEECUCTG.cjs} +22 -5
  27. package/dist/chunk-LEECUCTG.cjs.map +1 -0
  28. package/dist/{chunk-BMH4OCDX.js → chunk-XV4L72FW.js} +3 -3
  29. package/dist/{chunk-BMH4OCDX.js.map → chunk-XV4L72FW.js.map} +1 -1
  30. package/dist/{chunk-E53QWHBK.js → chunk-Y253JQOH.js} +22 -5
  31. package/dist/chunk-Y253JQOH.js.map +1 -0
  32. package/dist/index.cjs +31 -31
  33. package/dist/index.d.cts +2 -2
  34. package/dist/index.d.ts +2 -2
  35. package/dist/index.js +3 -3
  36. package/dist/loader.css +1 -1
  37. package/dist/present.cjs +3 -3
  38. package/dist/present.d.cts +1 -1
  39. package/dist/present.d.ts +1 -1
  40. package/dist/present.js +3 -3
  41. package/dist/three.cjs +5 -5
  42. package/dist/three.js +1 -1
  43. package/docs/api.md +10 -0
  44. package/docs/dsl.md +7 -2
  45. package/llms-full.txt +20 -3
  46. package/package.json +1 -1
  47. package/skills/pixi-effects/SKILL.md +1 -1
  48. package/skills/pixi-effects/reference/pitfalls.md +2 -0
  49. package/skills/pixi-effects/template.html +6 -6
  50. package/dist/Composition-7XNPTM7L.js +0 -7
  51. package/dist/Composition-L6OALWHI.cjs +0 -16
  52. package/dist/chunk-BVMZUPDU.cjs.map +0 -1
  53. package/dist/chunk-E53QWHBK.js.map +0 -1
  54. package/dist/chunk-LD4VKNPQ.cjs.map +0 -1
  55. package/dist/chunk-WST432AP.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkSBBXKPBP_cjs = require('./chunk-SBBXKPBP.cjs');
4
- var chunkBVMZUPDU_cjs = require('./chunk-BVMZUPDU.cjs');
3
+ var chunk5IJENZOG_cjs = require('./chunk-5IJENZOG.cjs');
4
+ var chunkLEECUCTG_cjs = require('./chunk-LEECUCTG.cjs');
5
5
  var chunkIMQJVRMT_cjs = require('./chunk-IMQJVRMT.cjs');
6
6
  var chunkTWZNOUM7_cjs = require('./chunk-TWZNOUM7.cjs');
7
7
  var pixi_js = require('pixi.js');
@@ -1490,8 +1490,8 @@ function expandTransitions(spec) {
1490
1490
  }
1491
1491
  const transitions = out.transitions;
1492
1492
  const sequences = out.sequences ?? [];
1493
- const remap = out.duration !== void 0 ? chunkBVMZUPDU_cjs.timeRemapOf(out) : null;
1494
- const parentDuration = remap ? chunkBVMZUPDU_cjs.contentLength(remap, out.duration) : out.duration ?? Infinity;
1493
+ const remap = out.duration !== void 0 ? chunkLEECUCTG_cjs.timeRemapOf(out) : null;
1494
+ const parentDuration = remap ? chunkLEECUCTG_cjs.contentLength(remap, out.duration) : out.duration ?? Infinity;
1495
1495
  const compW = out.width;
1496
1496
  const compH = out.height;
1497
1497
  const threeDByName = new Set(sequences.filter((s) => s.name && s.threeD).map((s) => s.name));
@@ -1559,16 +1559,16 @@ function expandTransitions(spec) {
1559
1559
  if (toUses > 1) {
1560
1560
  throw new Error(`pixi-effects: ${tag} sequence "${t.to}" is used as \`to\` in more than one transition`);
1561
1561
  }
1562
- const tStart = chunkBVMZUPDU_cjs.resolveAt(t.at, parentDuration);
1562
+ const tStart = chunkLEECUCTG_cjs.resolveAt(t.at, parentDuration);
1563
1563
  const tEnd = tStart + t.duration;
1564
1564
  const fromSeq = fromEntry.seq;
1565
- const fromStart = chunkBVMZUPDU_cjs.resolveAt(fromSeq.at, parentDuration);
1565
+ const fromStart = chunkLEECUCTG_cjs.resolveAt(fromSeq.at, parentDuration);
1566
1566
  const fromEnd = fromStart + (fromSeq.duration ?? parentDuration);
1567
1567
  if (tStart < fromStart - EPS || tEnd > fromEnd + EPS) {
1568
1568
  throw new Error(`pixi-effects: ${tag} window [${tStart}, ${tEnd}] is not covered by \`from\` "${t.from}" (lives [${fromStart}, ${fromEnd}], so it ends at ${fromEnd})`);
1569
1569
  }
1570
1570
  const toSeq = toEntry.seq;
1571
- const toStart = chunkBVMZUPDU_cjs.resolveAt(toSeq.at, parentDuration);
1571
+ const toStart = chunkLEECUCTG_cjs.resolveAt(toSeq.at, parentDuration);
1572
1572
  const toEnd = toStart + (toSeq.duration ?? parentDuration);
1573
1573
  if (tStart < toStart - EPS || tEnd > toEnd + EPS) {
1574
1574
  throw new Error(`pixi-effects: ${tag} window [${tStart}, ${tEnd}] is not covered by \`to\` "${t.to}" (lives [${toStart}, ${toEnd}], so it starts at ${toStart})`);
@@ -1628,7 +1628,7 @@ function wrapAsFullComposition(seq, compW, compH) {
1628
1628
  delete inner.at;
1629
1629
  delete inner.duration;
1630
1630
  const m = inner.mask;
1631
- const carriesMatte = m !== void 0 && chunkSBBXKPBP_cjs.maskSourceOf(m).kind === "refs";
1631
+ const carriesMatte = m !== void 0 && chunk5IJENZOG_cjs.maskSourceOf(m).kind === "refs";
1632
1632
  if (carriesMatte) delete inner.mask;
1633
1633
  return {
1634
1634
  ...carriesMatte ? { mask: m } : {},
@@ -1907,8 +1907,8 @@ function motionOf(keyframes, local, lives, keys = (k) => GEOMETRY.has(k)) {
1907
1907
  let length = 0;
1908
1908
  if (typeof kf.duration === "number") length = kf.duration;
1909
1909
  else if (kf.duration === "auto") {
1910
- const sp = chunkBVMZUPDU_cjs.parseSpring(kf.ease);
1911
- length = sp ? Math.round(chunkBVMZUPDU_cjs.springDuration(sp) * 1e3) / 1e3 : 0.5;
1910
+ const sp = chunkLEECUCTG_cjs.parseSpring(kf.ease);
1911
+ length = sp ? Math.round(chunkLEECUCTG_cjs.springDuration(sp) * 1e3) / 1e3 : 0.5;
1912
1912
  }
1913
1913
  if (!(length > 0)) continue;
1914
1914
  const kat = kf.at ?? 0;
@@ -1974,7 +1974,7 @@ function inspectScene(root, frame, time, canvas, opts = {}) {
1974
1974
  if (motion.ever) hasMotion.add(info);
1975
1975
  let shown = bounds ? clip(bounds, view) : null;
1976
1976
  const maskTarget = seq.maskSequence?.target;
1977
- const maskSrc = chunkSBBXKPBP_cjs.maskSourceOf(seq.spec.mask);
1977
+ const maskSrc = chunk5IJENZOG_cjs.maskSourceOf(seq.spec.mask);
1978
1978
  if (shown && maskTarget && !(maskSrc.kind === "inline" && maskSrc.invert)) {
1979
1979
  const m = maskTarget.getBounds();
1980
1980
  shown = clip(shown, { x: m.x, y: m.y, width: m.width, height: m.height });
@@ -1983,7 +1983,7 @@ function inspectScene(root, frame, time, canvas, opts = {}) {
1983
1983
  const group = parentScene ?? (name !== void 0 && blending.has(name) ? name : void 0);
1984
1984
  if (group) scene.set(info, group);
1985
1985
  if (zero || seq.showsNothingYet) scaledToNothing.add(info);
1986
- if (seq instanceof chunkSBBXKPBP_cjs.CompositionSequence) walk2(seq, prefix + label + "/", insideThreeD || threeD, visible, group, motion, zero);
1986
+ if (seq instanceof chunk5IJENZOG_cjs.CompositionSequence) walk2(seq, prefix + label + "/", insideThreeD || threeD, visible, group, motion, zero);
1987
1987
  });
1988
1988
  };
1989
1989
  walk2(root, "", false, true);
@@ -2031,7 +2031,7 @@ var round = (n) => Math.round(n * 1e6) / 1e6;
2031
2031
  var family = (name) => name.replace(/\d+/g, "#");
2032
2032
  function detailOf(seq) {
2033
2033
  const s = seq.spec;
2034
- const spans = chunkBVMZUPDU_cjs.spansMeta.get(seq.spec)?.preview;
2034
+ const spans = chunkLEECUCTG_cjs.spansMeta.get(seq.spec)?.preview;
2035
2035
  if (spans) return spans.length > 60 ? spans.slice(0, 57) + "\u2026" : spans;
2036
2036
  if (typeof s.text === "string") return s.text.length > 60 ? s.text.slice(0, 57) + "\u2026" : s.text;
2037
2037
  if (typeof s.asset === "string") return `asset \u201C${s.asset}\u201D`;
@@ -2047,10 +2047,10 @@ function walk(comp, parentStart, parentEnd, depth, prefix, rows, transitions, lo
2047
2047
  const start = parentStart + (seq.at ?? 0);
2048
2048
  const end = Math.min(parentEnd, seq.duration !== void 0 ? start + seq.duration : parentEnd);
2049
2049
  const span = end - start;
2050
- const keys = (seq.spec.keyframes ?? []).map((kf) => round(start + chunkBVMZUPDU_cjs.resolveAt(kf.at, span))).sort((a, b) => a - b).slice(0, MAX_KEYS);
2050
+ const keys = (seq.spec.keyframes ?? []).map((kf) => round(start + chunkLEECUCTG_cjs.resolveAt(kf.at, span))).sort((a, b) => a - b).slice(0, MAX_KEYS);
2051
2051
  const row = { path: prefix + name, name, type: seq.spec.type, depth, start: round(start), end: round(end), keys, detail: detailOf(seq), ...local ? { local } : {} };
2052
2052
  const inner = [];
2053
- const isComp = seq instanceof chunkSBBXKPBP_cjs.CompositionSequence;
2053
+ const isComp = seq instanceof chunk5IJENZOG_cjs.CompositionSequence;
2054
2054
  if (isComp) {
2055
2055
  const label = seq.remapLabel();
2056
2056
  walk(seq, label ? 0 : start, label ? seq.contentSpan : end, depth + 1, prefix + name + "/", inner, transitions, label ? `${name} ${label}` : local);
@@ -2209,7 +2209,7 @@ function sheetLayout(n, columns, cellW, srcW, srcH, labelH) {
2209
2209
  }
2210
2210
 
2211
2211
  // src/core/vars.ts
2212
- var RESERVED_NAMES = ["w", "h", "W", "H", "GW", "GH", "t", "d", "T", "contain", "cover", "value", ...chunkBVMZUPDU_cjs.EXPRESSION_NAMES];
2212
+ var RESERVED_NAMES = ["w", "h", "W", "H", "GW", "GH", "t", "d", "T", "contain", "cover", "value", ...chunkLEECUCTG_cjs.EXPRESSION_NAMES];
2213
2213
  var NAME = /^[A-Za-z_][A-Za-z0-9_]*$/;
2214
2214
  var isPlain = (v) => !!v && typeof v === "object" && (Object.getPrototypeOf(v) === Object.prototype || Object.getPrototypeOf(v) === null);
2215
2215
  function normalizeVars(raw, where, warn = (m) => console.warn(m)) {
@@ -2645,6 +2645,10 @@ var Movie = class {
2645
2645
  _silent = 0;
2646
2646
  /** render() / peek() in flight: a rebuild does not swap the composition under them. */
2647
2647
  _busy = 0;
2648
+ /** > 0 while the movie is moving its scene to another moment (a seek, a motion-blurred frame, the poster): a thumbnail does not start then. */
2649
+ _moving = 0;
2650
+ /** The thumbnail being drawn, if any: a seek waits for it (it has the scene on another moment for a few microtasks). */
2651
+ _thumbRun = null;
2648
2652
  _idleWaiters = [];
2649
2653
  /** What went into the mix, and its peak before limiting — kept for inspectAudio(). */
2650
2654
  _audioSources = [];
@@ -2692,6 +2696,7 @@ var Movie = class {
2692
2696
  if (this._posterFrame === null || !this.timeline) return;
2693
2697
  const back = this.currentFrame;
2694
2698
  this.currentFrame = this._posterFrame;
2699
+ this._moving++;
2695
2700
  try {
2696
2701
  this.timeline.time(this._timeOf(this._posterFrame));
2697
2702
  await this._awaitVideoFrames();
@@ -2699,6 +2704,7 @@ var Movie = class {
2699
2704
  this._renderNow();
2700
2705
  } finally {
2701
2706
  this.currentFrame = back;
2707
+ this._moving--;
2702
2708
  }
2703
2709
  this._atPoster = true;
2704
2710
  }
@@ -2742,8 +2748,8 @@ var Movie = class {
2742
2748
  this.stops = normalizeStops(applyVars(options.composition, this._vars)?.stops, this.duration, this.frameRate);
2743
2749
  this._posterFrame = poster.frame;
2744
2750
  this.background = options.background ?? "#000000";
2745
- this.timeline = chunkBVMZUPDU_cjs.createTimeline({ paused: true, defaults: { ease: "none" } });
2746
- chunkBVMZUPDU_cjs.lengthen(this.timeline, this.duration);
2751
+ this.timeline = chunkLEECUCTG_cjs.createTimeline({ paused: true, defaults: { ease: "none" } });
2752
+ chunkLEECUCTG_cjs.lengthen(this.timeline, this.duration);
2747
2753
  const baseAppOptions = {
2748
2754
  width: this.width,
2749
2755
  height: this.height,
@@ -2837,7 +2843,7 @@ var Movie = class {
2837
2843
  height: sizeWins ? height : spec.height ?? height,
2838
2844
  duration: spec.duration ?? this.duration
2839
2845
  } : void 0;
2840
- await chunkBVMZUPDU_cjs.ensureFilterLibrary(seededComposition);
2846
+ await chunkLEECUCTG_cjs.ensureFilterLibrary(seededComposition);
2841
2847
  if (chunkIMQJVRMT_cjs.usesAdvancedBlend(seededComposition)) await chunkIMQJVRMT_cjs.enableAdvancedBlend(this.app.renderer);
2842
2848
  const userComposition = seededComposition ? expandTransitions(seededComposition) : void 0;
2843
2849
  const rootSeqSpec = {
@@ -2848,7 +2854,7 @@ var Movie = class {
2848
2854
  ...userComposition
2849
2855
  };
2850
2856
  if (userComposition) carryTransitionWindows(userComposition, rootSeqSpec);
2851
- const sequence = new chunkSBBXKPBP_cjs.CompositionSequence(rootSeqSpec, null, rootShape);
2857
+ const sequence = new chunk5IJENZOG_cjs.CompositionSequence(rootSeqSpec, null, rootShape);
2852
2858
  lp?.begin("build", countLayers(rootSeqSpec));
2853
2859
  try {
2854
2860
  await sequence.build();
@@ -2984,8 +2990,8 @@ var Movie = class {
2984
2990
  if (!changed) return { reason, ms: 0, audio: "none", frame: this.currentFrame, playing: this.isPlaying, unchanged: true };
2985
2991
  sequence = await this._construct(composition, vars, width, height, void 0, this._resized || sizeChanged);
2986
2992
  alive();
2987
- const timeline = chunkBVMZUPDU_cjs.createTimeline({ paused: true, defaults: { ease: "none" } });
2988
- chunkBVMZUPDU_cjs.lengthen(timeline, this.duration);
2993
+ const timeline = chunkLEECUCTG_cjs.createTimeline({ paused: true, defaults: { ease: "none" } });
2994
+ chunkLEECUCTG_cjs.lengthen(timeline, this.duration);
2989
2995
  sequence.bindTimeline(timeline);
2990
2996
  const hadSound = this.audioBuffer !== null;
2991
2997
  const audio = await this._mixSound(sequence, this._ensureAudioContext());
@@ -3085,12 +3091,18 @@ var Movie = class {
3085
3091
  this.emit("error", { where, message: error instanceof Error ? error.message : String(error), error });
3086
3092
  }
3087
3093
  async _goto(frame) {
3088
- this._atPoster = false;
3089
- this.currentFrame = Math.max(0, Math.min(frame, this.totalFrames));
3090
- this.timeline.time(this._timeOf(this.currentFrame));
3091
- await this._awaitVideoFrames();
3092
- this._updateSpace();
3093
- this._renderNow();
3094
+ if (this._thumbRun) await this._thumbRun;
3095
+ this._moving++;
3096
+ try {
3097
+ this._atPoster = false;
3098
+ this.currentFrame = Math.max(0, Math.min(frame, this.totalFrames));
3099
+ this.timeline.time(this._timeOf(this.currentFrame));
3100
+ await this._awaitVideoFrames();
3101
+ this._updateSpace();
3102
+ this._renderNow();
3103
+ } finally {
3104
+ this._moving--;
3105
+ }
3094
3106
  this.emit("frame", { frame: this.currentFrame, totalFrames: this.totalFrames });
3095
3107
  }
3096
3108
  /**
@@ -3138,6 +3150,69 @@ var Movie = class {
3138
3150
  if (o.as === "imageData") return out.getContext("2d").getImageData(0, 0, out.width, out.height);
3139
3151
  return encodeCanvas(out, o.type, o.as, o.quality);
3140
3152
  }
3153
+ /**
3154
+ * Why `thumbnail()` is off for this movie: `'variables'` (it declares `vars`: the picture depends on them and changes when they do) or `'video'` (a video
3155
+ * layer: its frame must be waited for, which would seek the playing video). `null`: it works.
3156
+ */
3157
+ get thumbnailsOff() {
3158
+ if (this._declared.size > 0) return "variables";
3159
+ if (!this._rootSequence) return null;
3160
+ const found = [];
3161
+ collectVideoSequences(this._rootSequence, found);
3162
+ return found.some((v) => v.spec?.type === "video") ? "video" : null;
3163
+ }
3164
+ /**
3165
+ * A small picture of any frame, drawn WITHOUT moving the playhead or changing what is on the canvas, so it can be made while the movie plays or is
3166
+ * paused (a seek-bar preview). The scene is put on that moment, drawn, copied, and put back, all within the microtasks of one task: the browser never
3167
+ * shows the in-between. Gives `null` when it cannot be made right now: the movie has thumbnails off (see `thumbnailsOff`), is moving somewhere else
3168
+ * (a seek, a render, a peek), or is another thumbnail's turn. It is the picture `snapshot()` gives at that size (without motion blur).
3169
+ */
3170
+ async thumbnail(frame, opts = {}) {
3171
+ chunkTWZNOUM7_cjs.warnUnknownOptions("movie.thumbnail()", opts, ["width", "scale"]);
3172
+ this._requireReady("thumbnail");
3173
+ if (opts.width !== void 0 && !(opts.width > 0 && opts.width <= this.width * 4)) throw new Error(`pixi-effects: movie.thumbnail(): width must be above 0 and at most ${this.width * 4} px, got ${opts.width}`);
3174
+ if (opts.scale !== void 0 && !(opts.scale > 0 && opts.scale <= 4)) throw new Error(`pixi-effects: movie.thumbnail(): scale must be above 0 and at most 4, got ${opts.scale}`);
3175
+ if (this.thumbnailsOff || this._moving > 0 || this._busy > 0 || this._thumbRun) return null;
3176
+ const w = Math.max(1, Math.round(opts.width ?? (opts.scale !== void 0 ? this.width * opts.scale : 160)));
3177
+ const h = Math.max(1, Math.round(w * this.height / this.width));
3178
+ let done;
3179
+ this._thumbRun = new Promise((r) => {
3180
+ done = r;
3181
+ });
3182
+ try {
3183
+ return await this._drawThumbnail(clampFrame(frame, this.totalFrames), w, h);
3184
+ } finally {
3185
+ this._thumbRun = null;
3186
+ done();
3187
+ }
3188
+ }
3189
+ async _drawThumbnail(frame, w, h) {
3190
+ const stage = this.app.canvas;
3191
+ const out = document.createElement("canvas");
3192
+ out.width = w;
3193
+ out.height = h;
3194
+ const keep = this.timeline.time();
3195
+ const t = this._timeOf(frame);
3196
+ this._nominalTime = t;
3197
+ try {
3198
+ this.timeline.time(t);
3199
+ await this._awaitVideoFrames(t);
3200
+ this._updateSpace(t);
3201
+ this._renderNow();
3202
+ out.getContext("2d").drawImage(stage, 0, 0, w, h);
3203
+ } finally {
3204
+ this._nominalTime = keep;
3205
+ try {
3206
+ this.timeline.time(keep);
3207
+ await this._awaitVideoFrames(keep);
3208
+ this._updateSpace(keep);
3209
+ this._renderNow();
3210
+ } finally {
3211
+ this._nominalTime = null;
3212
+ }
3213
+ }
3214
+ return out;
3215
+ }
3141
3216
  async onionSkin(opts = {}) {
3142
3217
  chunkTWZNOUM7_cjs.warnUnknownOptions("movie.onionSkin()", opts, ["from", "to", "count", "scale", "as", "motionBlur"]);
3143
3218
  this._requireReady("onionSkin");
@@ -3316,9 +3391,11 @@ var Movie = class {
3316
3391
  async _exposeFrame(frame, mb, target, settle) {
3317
3392
  const g = target.getContext("2d");
3318
3393
  const stage = this.app.canvas;
3394
+ if (this._thumbRun) await this._thumbRun;
3319
3395
  this._atPoster = false;
3320
3396
  const times = blurTimes(frame, this.frameRate, mb, Math.max(0, this.duration - END_MARGIN));
3321
3397
  this._nominalTime = this._timeOf(Math.max(0, Math.min(frame, this.totalFrames)));
3398
+ this._moving++;
3322
3399
  try {
3323
3400
  for (let k = 0; k < times.length; k++) {
3324
3401
  const t = times[k];
@@ -3332,6 +3409,7 @@ var Movie = class {
3332
3409
  }
3333
3410
  } finally {
3334
3411
  this._nominalTime = null;
3412
+ this._moving--;
3335
3413
  }
3336
3414
  g.globalAlpha = 1;
3337
3415
  if (settle) await this._goto(frame);
@@ -3627,7 +3705,7 @@ function countLayers(spec) {
3627
3705
  n += 1 + countLayers(s);
3628
3706
  const spans = s.spans;
3629
3707
  if (Array.isArray(spans)) n += spans.length;
3630
- const src = chunkSBBXKPBP_cjs.maskSourceOf(mask);
3708
+ const src = chunk5IJENZOG_cjs.maskSourceOf(mask);
3631
3709
  if (src.kind === "inline") n += 1 + countLayers(src.spec);
3632
3710
  }
3633
3711
  return n;
@@ -3685,8 +3763,8 @@ function splitText(text, style = {}, opts = {}) {
3685
3763
 
3686
3764
  // src/presets/_ease.ts
3687
3765
  function parseEase2(name) {
3688
- chunkBVMZUPDU_cjs.checkEase(name, "a preset");
3689
- return chunkBVMZUPDU_cjs.parseEase(name);
3766
+ chunkLEECUCTG_cjs.checkEase(name, "a preset");
3767
+ return chunkLEECUCTG_cjs.parseEase(name);
3690
3768
  }
3691
3769
 
3692
3770
  // src/presets/kenBurns.ts
@@ -3821,17 +3899,17 @@ function orbit(opts) {
3821
3899
  throw new Error("pixi-effects: orbit() cannot combine `radius` with `dollyZoom` \u2014 the radius follows the animated fov");
3822
3900
  }
3823
3901
  const [cx, cy] = opts.center ?? [width / 2, height / 2];
3824
- const fixedR = opts.radius ?? chunkBVMZUPDU_cjs.homeDistance(height, fov ?? chunkBVMZUPDU_cjs.DEFAULT_FOV);
3902
+ const fixedR = opts.radius ?? chunkLEECUCTG_cjs.homeDistance(height, fov ?? chunkLEECUCTG_cjs.DEFAULT_FOV);
3825
3903
  const start = opts.start ?? -degrees / 2;
3826
3904
  const steps = Math.max(1, Math.round(duration * stepsPerSecond));
3827
3905
  const easeFn = parseEase2(ease);
3828
3906
  const dollyEase = dolly ? parseEase2(dolly.ease ?? ease) : null;
3829
3907
  const pos = (i) => {
3830
3908
  const p = i / steps;
3831
- const a = (start + degrees * easeFn(p)) * chunkBVMZUPDU_cjs.DEG;
3909
+ const a = (start + degrees * easeFn(p)) * chunkLEECUCTG_cjs.DEG;
3832
3910
  if (!dolly) return { x: cx + fixedR * Math.sin(a), z: fixedR * Math.cos(a) };
3833
3911
  const f = dolly.from + (dolly.to - dolly.from) * dollyEase(p);
3834
- const R = chunkBVMZUPDU_cjs.homeDistance(height, f);
3912
+ const R = chunkLEECUCTG_cjs.homeDistance(height, f);
3835
3913
  return { x: cx + R * Math.sin(a), z: R * Math.cos(a), fov: f };
3836
3914
  };
3837
3915
  const keyframes = [];
@@ -3886,7 +3964,7 @@ function particles(opts) {
3886
3964
  const round2 = (v) => Math.round(v * 1e6) / 1e6;
3887
3965
  const out = [];
3888
3966
  for (let i = 0; i < count; i++) {
3889
- const r = chunkBVMZUPDU_cjs.random(seed * 1000003 + i * 7919 + 17);
3967
+ const r = chunkLEECUCTG_cjs.random(seed * 1000003 + i * 7919 + 17);
3890
3968
  const pick = ([a2, b]) => a2 + r() * (b - a2);
3891
3969
  const born = at + r() * emit;
3892
3970
  const lifetime = pick(life);
@@ -3899,7 +3977,7 @@ function particles(opts) {
3899
3977
  const turn = spin ? pick(spin) : 0;
3900
3978
  const startAngle = spin ? r() * 360 : 0;
3901
3979
  const swayAmp = sway?.amp ?? 0, swayFreq = sway?.freq ?? 1;
3902
- const n0 = sway ? chunkBVMZUPDU_cjs.noise(0, seed * 1000003 + i) : 0;
3980
+ const n0 = sway ? chunkLEECUCTG_cjs.noise(0, seed * 1000003 + i) : 0;
3903
3981
  const at_ = (t) => {
3904
3982
  const axis = (p0, v0, acc) => {
3905
3983
  if (drag > 0) {
@@ -3908,7 +3986,7 @@ function particles(opts) {
3908
3986
  }
3909
3987
  return p0 + v0 * t + 0.5 * acc * t * t;
3910
3988
  };
3911
- const sw = sway ? swayAmp * (chunkBVMZUPDU_cjs.noise(t * swayFreq, seed * 1000003 + i) - n0) : 0;
3989
+ const sw = sway ? swayAmp * (chunkLEECUCTG_cjs.noise(t * swayFreq, seed * 1000003 + i) - n0) : 0;
3912
3990
  return { x: axis(x0, vx, wind) + sw, y: axis(y0, vy, gravity) };
3913
3991
  };
3914
3992
  const kfs = [];
@@ -3970,7 +4048,7 @@ function followPath(opts) {
3970
4048
  if (steps > MAX_STEPS) throw new Error(`followPath(): ${steps} samples is too many (max ${MAX_STEPS}); lower frameRate or duration`);
3971
4049
  const segments = [];
3972
4050
  let total = 0;
3973
- for (const line of chunkBVMZUPDU_cjs.flattenSvgPath(d)) {
4051
+ for (const line of chunkLEECUCTG_cjs.flattenSvgPath(d)) {
3974
4052
  const p = line.closed ? [...line.pts, line.pts[0], line.pts[1]] : line.pts;
3975
4053
  for (let i = 2; i < p.length; i += 2) {
3976
4054
  const len = Math.hypot(p[i] - p[i - 2], p[i + 1] - p[i - 1]);
@@ -4124,7 +4202,7 @@ function distances(n, from, grid, seed) {
4124
4202
  if (n === 0) return [];
4125
4203
  if (from === "random") {
4126
4204
  const order = Array.from({ length: n }, (_, i) => i);
4127
- const r = chunkBVMZUPDU_cjs.random(seed);
4205
+ const r = chunkLEECUCTG_cjs.random(seed);
4128
4206
  for (let i = n - 1; i > 0; i--) {
4129
4207
  const j = Math.floor(r() * (i + 1));
4130
4208
  [order[i], order[j]] = [order[j], order[i]];
@@ -4186,7 +4264,7 @@ function wiggle(opts) {
4186
4264
  to[n] = p.around;
4187
4265
  return;
4188
4266
  }
4189
- const off = (chunkBVMZUPDU_cjs.rand(seed * 7919 + pi * 104729 + s * 31 + 1) * 2 - 1) * p.amp;
4267
+ const off = (chunkLEECUCTG_cjs.rand(seed * 7919 + pi * 104729 + s * 31 + 1) * 2 - 1) * p.amp;
4190
4268
  to[n] = typeof p.around === "number" ? p.around + off : `(${p.around}) ${off < 0 ? "-" : "+"} ${Math.abs(off)}`;
4191
4269
  });
4192
4270
  out.push({ at: at + s * stepLen, to, duration: stepLen, ease });
@@ -4644,5 +4722,5 @@ exports.splitText = splitText;
4644
4722
  exports.stagger = stagger;
4645
4723
  exports.wiggle = wiggle;
4646
4724
  exports.withFade = withFade;
4647
- //# sourceMappingURL=chunk-LD4VKNPQ.cjs.map
4648
- //# sourceMappingURL=chunk-LD4VKNPQ.cjs.map
4725
+ //# sourceMappingURL=chunk-7TTCPHAV.cjs.map
4726
+ //# sourceMappingURL=chunk-7TTCPHAV.cjs.map