pixi-effects 0.27.2 → 0.28.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 (63) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +6 -6
  3. package/ai/chat-template.html +3 -3
  4. package/ai/tools/check.mjs +30 -0
  5. package/dist/{Base-CKGl6jCo.d.ts → Base-C6f0fE8j.d.ts} +1 -1
  6. package/dist/{Base-DjhdL8B1.d.cts → Base-DI1FCGcH.d.cts} +1 -1
  7. package/dist/Composition-HFEVIYHN.js +7 -0
  8. package/dist/{Composition-TZHVYIGH.js.map → Composition-HFEVIYHN.js.map} +1 -1
  9. package/dist/Composition-NI74UJT3.cjs +16 -0
  10. package/dist/{Composition-DRCTWIYH.cjs.map → Composition-NI74UJT3.cjs.map} +1 -1
  11. package/dist/Controller.d.cts +2 -2
  12. package/dist/Controller.d.ts +2 -2
  13. package/dist/{Movie-CbYwTs6U.d.cts → Movie-CHcM8HNB.d.ts} +3 -1
  14. package/dist/{Movie-ILKq2fw_.d.ts → Movie-Cx5ozUGb.d.cts} +3 -1
  15. package/dist/Presenter.d.cts +2 -2
  16. package/dist/Presenter.d.ts +2 -2
  17. package/dist/chunk-4LEX3G3M.cjs +259 -0
  18. package/dist/chunk-4LEX3G3M.cjs.map +1 -0
  19. package/dist/{chunk-BQNNZEAX.js → chunk-AK54FIWM.js} +7 -4
  20. package/dist/chunk-AK54FIWM.js.map +1 -0
  21. package/dist/{chunk-YOV6MEXH.cjs → chunk-MZCDBRTY.cjs} +7 -4
  22. package/dist/chunk-MZCDBRTY.cjs.map +1 -0
  23. package/dist/{chunk-C7HJJ7MZ.cjs → chunk-SBOVUZZY.cjs} +61 -61
  24. package/dist/{chunk-C7HJJ7MZ.cjs.map → chunk-SBOVUZZY.cjs.map} +1 -1
  25. package/dist/{chunk-K3F2YKL4.js → chunk-WEJAQAFX.js} +3 -3
  26. package/dist/{chunk-K3F2YKL4.js.map → chunk-WEJAQAFX.js.map} +1 -1
  27. package/dist/chunk-ZHUUIF6A.js +250 -0
  28. package/dist/chunk-ZHUUIF6A.js.map +1 -0
  29. package/dist/events-EE3SM5LM.cjs +16 -0
  30. package/dist/events-EE3SM5LM.cjs.map +1 -0
  31. package/dist/events-KXBWR4IV.js +3 -0
  32. package/dist/events-KXBWR4IV.js.map +1 -0
  33. package/dist/index.cjs +49 -33
  34. package/dist/index.cjs.map +1 -1
  35. package/dist/index.d.cts +19 -5
  36. package/dist/index.d.ts +19 -5
  37. package/dist/index.js +18 -7
  38. package/dist/index.js.map +1 -1
  39. package/dist/loader.css +1 -1
  40. package/dist/{music-6MTHQEXS.cjs → music-6WFTPVHU.cjs} +43 -202
  41. package/dist/music-6WFTPVHU.cjs.map +1 -0
  42. package/dist/{music-72YJAMXH.js → music-JKOM5YK6.js} +8 -192
  43. package/dist/music-JKOM5YK6.js.map +1 -0
  44. package/dist/three.cjs +5 -5
  45. package/dist/three.d.cts +2 -2
  46. package/dist/three.d.ts +2 -2
  47. package/dist/three.js +1 -1
  48. package/dist/{types-BNVsBBZf.d.ts → types-DpK1vwcl.d.cts} +79 -1
  49. package/dist/{types-BNVsBBZf.d.cts → types-DpK1vwcl.d.ts} +79 -1
  50. package/docs/api.md +28 -0
  51. package/docs/dsl.md +8 -4
  52. package/llms-full.txt +39 -6
  53. package/package.json +1 -1
  54. package/skills/pixi-effects/SKILL.md +1 -1
  55. package/skills/pixi-effects/reference/cheatsheet.md +1 -1
  56. package/skills/pixi-effects/reference/pitfalls.md +1 -0
  57. package/skills/pixi-effects/template.html +6 -6
  58. package/dist/Composition-DRCTWIYH.cjs +0 -16
  59. package/dist/Composition-TZHVYIGH.js +0 -7
  60. package/dist/chunk-BQNNZEAX.js.map +0 -1
  61. package/dist/chunk-YOV6MEXH.cjs.map +0 -1
  62. package/dist/music-6MTHQEXS.cjs.map +0 -1
  63. package/dist/music-72YJAMXH.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkYOV6MEXH_cjs = require('./chunk-YOV6MEXH.cjs');
3
+ var chunkMZCDBRTY_cjs = require('./chunk-MZCDBRTY.cjs');
4
4
  var chunkP4GY3Z4G_cjs = require('./chunk-P4GY3Z4G.cjs');
5
5
  var chunkZMAD3KJU_cjs = require('./chunk-ZMAD3KJU.cjs');
6
6
  var chunkTWZNOUM7_cjs = require('./chunk-TWZNOUM7.cjs');
@@ -33,10 +33,10 @@ var KIND_ALIASES = {
33
33
  fill: "ambient"
34
34
  };
35
35
  function lightKindProblem(kind) {
36
- if (kind === void 0 || typeof kind === "string" && chunkYOV6MEXH_cjs.LIGHT_KINDS.includes(kind)) return null;
37
- const guess = typeof kind === "string" ? KIND_ALIASES[kind.toLowerCase()] ?? chunkTWZNOUM7_cjs.suggestName(kind, chunkYOV6MEXH_cjs.LIGHT_KINDS) : null;
36
+ if (kind === void 0 || typeof kind === "string" && chunkMZCDBRTY_cjs.LIGHT_KINDS.includes(kind)) return null;
37
+ const guess = typeof kind === "string" ? KIND_ALIASES[kind.toLowerCase()] ?? chunkTWZNOUM7_cjs.suggestName(kind, chunkMZCDBRTY_cjs.LIGHT_KINDS) : null;
38
38
  const shown = typeof kind === "string" ? `"${kind}"` : String(kind);
39
- return `kind ${shown} is not a light kind${guess ? `; did you mean "${guess}"?` : ""} (use ${chunkYOV6MEXH_cjs.LIGHT_KINDS.join(", ")}); point is used`;
39
+ return `kind ${shown} is not a light kind${guess ? `; did you mean "${guess}"?` : ""} (use ${chunkMZCDBRTY_cjs.LIGHT_KINDS.join(", ")}); point is used`;
40
40
  }
41
41
  var LIGHT_ALIASES = {
42
42
  pointOfInterest: 'did you mean "lookAtX / lookAtY / lookAtZ"?',
@@ -61,24 +61,24 @@ function lightLayerProblems(spec) {
61
61
  const raw = spec;
62
62
  const kind = lightKindProblem(raw.kind);
63
63
  if (kind) out.push(kind);
64
- if (raw.falloff !== void 0 && !chunkYOV6MEXH_cjs.FALLOFFS.includes(raw.falloff)) {
65
- const guess = typeof raw.falloff === "string" ? chunkTWZNOUM7_cjs.suggestName(raw.falloff, chunkYOV6MEXH_cjs.FALLOFFS) : null;
66
- out.push(`falloff ${JSON.stringify(raw.falloff)} is not supported${guess ? `; did you mean "${guess}"?` : ""} (use ${chunkYOV6MEXH_cjs.FALLOFFS.join(", ")}); none is used`);
64
+ if (raw.falloff !== void 0 && !chunkMZCDBRTY_cjs.FALLOFFS.includes(raw.falloff)) {
65
+ const guess = typeof raw.falloff === "string" ? chunkTWZNOUM7_cjs.suggestName(raw.falloff, chunkMZCDBRTY_cjs.FALLOFFS) : null;
66
+ out.push(`falloff ${JSON.stringify(raw.falloff)} is not supported${guess ? `; did you mean "${guess}"?` : ""} (use ${chunkMZCDBRTY_cjs.FALLOFFS.join(", ")}); none is used`);
67
67
  }
68
68
  for (const k of Object.keys(raw)) {
69
- if (chunkYOV6MEXH_cjs.LIGHT_PROPS.includes(k) || k === "intensity" || k === "shadowDarkness" || k === "shadowDiffusion") {
69
+ if (chunkMZCDBRTY_cjs.LIGHT_PROPS.includes(k) || k === "intensity" || k === "shadowDarkness" || k === "shadowDiffusion") {
70
70
  out.push(`"${k}" must go inside initial / keyframes, not on the light itself`);
71
71
  } else if (LIGHT_ALIASES[k]) out.push(`"${k}" is not a property \u2014 ${LIGHT_ALIASES[k]}`);
72
72
  }
73
73
  const explained = new Set(Object.keys(LIGHT_ALIASES));
74
74
  for (const k of chunkZMAD3KJU_cjs.collectPropKeys(spec)) {
75
75
  if (LIGHT_ALIASES[k]) out.push(`"${k}" is not a property \u2014 ${LIGHT_ALIASES[k]}`);
76
- else if (!explained.has(k) && !chunkYOV6MEXH_cjs.LIGHT_PROPS.includes(k)) out.push(`"${k}" has no effect on a light (use ${chunkYOV6MEXH_cjs.LIGHT_PROPS.join(", ")})`);
76
+ else if (!explained.has(k) && !chunkMZCDBRTY_cjs.LIGHT_PROPS.includes(k)) out.push(`"${k}" has no effect on a light (use ${chunkMZCDBRTY_cjs.LIGHT_PROPS.join(", ")})`);
77
77
  }
78
78
  if (numbersOf(spec, "coneFeather").some((v) => v > 1 || v < 0)) out.push("coneFeather is 0..1 (the soft part of the cone edge, as a fraction of the half angle); it is clamped");
79
79
  const big = numbersOf(spec, "intensity").find((v) => v > 10);
80
80
  if (big !== void 0) out.push(`intensity ${big} looks like a percentage: it is a multiplier (1 = full, 0.25 = a quarter); did you mean ${big / 100}?`);
81
- const kindNow = typeof raw.kind === "string" && chunkYOV6MEXH_cjs.LIGHT_KINDS.includes(raw.kind) ? raw.kind : "point";
81
+ const kindNow = typeof raw.kind === "string" && chunkMZCDBRTY_cjs.LIGHT_KINDS.includes(raw.kind) ? raw.kind : "point";
82
82
  const has = (...keys) => keys.filter((k) => bagsOf(spec).some((b) => b[k] !== void 0));
83
83
  const falloffOn = raw.falloff === "smooth" || raw.falloff === "inverseSquare";
84
84
  if (kindNow === "ambient" && raw.castsShadows) out.push("an ambient light has no direction, so it makes no shadow: castsShadows is ignored (put it on a point, spot or parallel light)");
@@ -106,17 +106,17 @@ function lightSetProblems(layers) {
106
106
  out.push("there is no ambient light, so what no light reaches is black; add { type: 'light', kind: 'ambient', initial: { intensity: 0.25 } }");
107
107
  }
108
108
  const direct = lights.filter((l) => kindOf(l) !== "ambient");
109
- if (direct.length > chunkYOV6MEXH_cjs.MAX_LIGHTS) {
110
- const dropped = direct.slice(chunkYOV6MEXH_cjs.MAX_LIGHTS).map((l) => nameOf(l, layers.indexOf(l)));
111
- out.push(`${direct.length} lights, but at most ${chunkYOV6MEXH_cjs.MAX_LIGHTS} are used (the first ${chunkYOV6MEXH_cjs.MAX_LIGHTS}, in layer order); ${dropped.join(", ")} and later are dropped. Use fewer lights`);
109
+ if (direct.length > chunkMZCDBRTY_cjs.MAX_LIGHTS) {
110
+ const dropped = direct.slice(chunkMZCDBRTY_cjs.MAX_LIGHTS).map((l) => nameOf(l, layers.indexOf(l)));
111
+ out.push(`${direct.length} lights, but at most ${chunkMZCDBRTY_cjs.MAX_LIGHTS} are used (the first ${chunkMZCDBRTY_cjs.MAX_LIGHTS}, in layer order); ${dropped.join(", ")} and later are dropped. Use fewer lights`);
112
112
  }
113
113
  const lightsCast = lights.some((l) => kindOf(l) !== "ambient" && l.castsShadows);
114
114
  const casters = layers.filter((l) => l.type !== "light" && l.castsShadows && l.threeD);
115
115
  if (casters.length > 0 && !lightsCast) out.push(`${casters.length} layer${casters.length > 1 ? "s have" : " has"} castsShadows but no light has castsShadows: add castsShadows: true to the light that should make the shadows`);
116
116
  if (lightsCast && casters.length === 0) out.push("a light has castsShadows but no layer has castsShadows: add castsShadows: true to the threeD layers that should cast a shadow");
117
- if (lightsCast && casters.length > chunkYOV6MEXH_cjs.MAX_CASTERS) {
118
- const dropped = casters.slice(chunkYOV6MEXH_cjs.MAX_CASTERS).map((c) => nameOf(c, layers.indexOf(c)));
119
- out.push(`${casters.length} layers cast shadows, but a layer receives shadows from at most ${chunkYOV6MEXH_cjs.MAX_CASTERS} (the first ${chunkYOV6MEXH_cjs.MAX_CASTERS}, in layer order); ${dropped.join(", ")} and later cast none`);
117
+ if (lightsCast && casters.length > chunkMZCDBRTY_cjs.MAX_CASTERS) {
118
+ const dropped = casters.slice(chunkMZCDBRTY_cjs.MAX_CASTERS).map((c) => nameOf(c, layers.indexOf(c)));
119
+ out.push(`${casters.length} layers cast shadows, but a layer receives shadows from at most ${chunkMZCDBRTY_cjs.MAX_CASTERS} (the first ${chunkMZCDBRTY_cjs.MAX_CASTERS}, in layer order); ${dropped.join(", ")} and later cast none`);
120
120
  }
121
121
  const softLights = lights.filter((l) => l.castsShadows && numbersOf(l, "shadowDiffusion").some((v) => v > 0));
122
122
  if (softLights.length >= SOFT_LIGHTS) {
@@ -301,9 +301,9 @@ var roundPixelsBit = {
301
301
  name: "round-pixels-bit",
302
302
  vertex: { header: `fn roundPixels(position: vec2<f32>, targetSize: vec2<f32>) -> vec2<f32> { return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0; }` }
303
303
  };
304
- var ML = chunkYOV6MEXH_cjs.MAX_LIGHTS;
305
- var MC = chunkYOV6MEXH_cjs.MAX_CASTERS;
306
- var TAPS = chunkYOV6MEXH_cjs.SHADOW_TAPS;
304
+ var ML = chunkMZCDBRTY_cjs.MAX_LIGHTS;
305
+ var MC = chunkMZCDBRTY_cjs.MAX_CASTERS;
306
+ var TAPS = chunkMZCDBRTY_cjs.SHADOW_TAPS;
307
307
  var SHADOW_KEYS = Array.from({ length: MC }, (_, j) => `uShadow${j}`);
308
308
  var WGSL_SHADOW_DECLS = SHADOW_KEYS.map((k, j) => ` @group(2) @binding(${4 + j}) var ${k}: texture_2d<f32>;`).join("\n");
309
309
  var WGSL_SHADOW_PICK = SHADOW_KEYS.map((k, j) => (j === 0 ? "" : "else ") + `if (j == ${j}) { a = textureSampleLevel(${k}, uSampler, uv, 0.0).a; }`).join(" ");
@@ -663,8 +663,8 @@ function readLayerTransform(target) {
663
663
  x: c.x,
664
664
  y: c.y,
665
665
  z: c.z ?? 0,
666
- rotationX: (c.rotationX ?? 0) * chunkYOV6MEXH_cjs.DEG,
667
- rotationY: (c.rotationY ?? 0) * chunkYOV6MEXH_cjs.DEG,
666
+ rotationX: (c.rotationX ?? 0) * chunkMZCDBRTY_cjs.DEG,
667
+ rotationY: (c.rotationY ?? 0) * chunkMZCDBRTY_cjs.DEG,
668
668
  rotationZ: c.rotation,
669
669
  scaleX: c.scale.x,
670
670
  scaleY: c.scale.y,
@@ -727,20 +727,20 @@ var Layer3D = class {
727
727
  if (!(needW >= 1 && needH >= 1) || !Number.isFinite(bounds.x) || !Number.isFinite(bounds.y)) return this.hide();
728
728
  const size = this.sizeFor(needW, needH);
729
729
  const frame = { x: bounds.x - pad, y: bounds.y - pad, width: size.w, height: size.h };
730
- const projected = chunkYOV6MEXH_cjs.projectLayer(readLayerTransform(target), frame, basis);
730
+ const projected = chunkMZCDBRTY_cjs.projectLayer(readLayerTransform(target), frame, basis);
731
731
  this.depth = projected.depth;
732
732
  {
733
733
  const lt = readLayerTransform(target);
734
- const o = chunkYOV6MEXH_cjs.layerToWorld(lt, frame.x, frame.y);
735
- const pu = chunkYOV6MEXH_cjs.layerToWorld(lt, frame.x + frame.width, frame.y);
736
- const pv = chunkYOV6MEXH_cjs.layerToWorld(lt, frame.x, frame.y + frame.height);
734
+ const o = chunkMZCDBRTY_cjs.layerToWorld(lt, frame.x, frame.y);
735
+ const pu = chunkMZCDBRTY_cjs.layerToWorld(lt, frame.x + frame.width, frame.y);
736
+ const pv = chunkMZCDBRTY_cjs.layerToWorld(lt, frame.x, frame.y + frame.height);
737
737
  this.world = { o, u: { x: pu.x - o.x, y: pu.y - o.y, z: pu.z - o.z }, v: { x: pv.x - o.x, y: pv.y - o.y, z: pv.z - o.z } };
738
738
  }
739
739
  if (!projected.visible) {
740
740
  if (!this.warnedBehind) {
741
741
  this.warnedBehind = true;
742
742
  if (this.seq.spec.hideBehindCamera) return this.hide();
743
- if (projected.depth > chunkYOV6MEXH_cjs.NEAR) {
743
+ if (projected.depth > chunkMZCDBRTY_cjs.NEAR) {
744
744
  console.warn(
745
745
  `pixi-effects: ${chunkZMAD3KJU_cjs.describeLayer(this.seq.spec)}: part of it (a corner) reaches the camera plane (z = ${(target.z ?? 0).toFixed(0)}, rotationX ${(target.rotationX ?? 0).toFixed(0)}\xB0, rotationY ${(target.rotationY ?? 0).toFixed(0)}\xB0), and a layer is hidden whole when any corner is at or behind it. Tilt it less (rotationX / rotationY), make it smaller, or keep the camera further away from it (the default camera sits at z = (height/2)/tan(fov/2), about 989 for 720p at fov 40).`
746
746
  );
@@ -771,7 +771,7 @@ var Layer3D = class {
771
771
  */
772
772
  setBlur(radius) {
773
773
  const d = this.display;
774
- const r = radius > chunkYOV6MEXH_cjs.MIN_BLUR ? Math.min(radius, chunkYOV6MEXH_cjs.MAX_BLUR) : 0;
774
+ const r = radius > chunkMZCDBRTY_cjs.MIN_BLUR ? Math.min(radius, chunkMZCDBRTY_cjs.MAX_BLUR) : 0;
775
775
  this.blur = r;
776
776
  if (r === 0) {
777
777
  if (this.blurFilter) {
@@ -958,7 +958,7 @@ function lintSequence(spec, warn = defaultWarn) {
958
958
  function lintFocus(camera, siblings, warn = defaultWarn) {
959
959
  if (camera.type !== "camera") return;
960
960
  const who = chunkZMAD3KJU_cjs.describeLayer(camera);
961
- for (const p of chunkYOV6MEXH_cjs.focusProblems(camera, siblings)) {
961
+ for (const p of chunkMZCDBRTY_cjs.focusProblems(camera, siblings)) {
962
962
  if (p.kind === "missing") {
963
963
  warn(`pixi-effects: ${who}: focus: no layer named "${p.name}"${p.hint ? `; did you mean "${p.hint}"?` : ""} (the z = 0 plane is used). Write a threeD layer's name or a z number`);
964
964
  } else if (p.kind === "not-threeD") {
@@ -1241,7 +1241,7 @@ var MatteSet = class {
1241
1241
  };
1242
1242
 
1243
1243
  // src/sequences/Composition.ts
1244
- var CompositionSequence = class extends chunkYOV6MEXH_cjs.Sequence {
1244
+ var CompositionSequence = class extends chunkMZCDBRTY_cjs.Sequence {
1245
1245
  _innerContainer = null;
1246
1246
  _compositionShape = null;
1247
1247
  _children = [];
@@ -1308,9 +1308,9 @@ var CompositionSequence = class extends chunkYOV6MEXH_cjs.Sequence {
1308
1308
  this.intrinsicWidth = width;
1309
1309
  this.intrinsicHeight = height;
1310
1310
  this._innerContainer = inner;
1311
- const base = chunkYOV6MEXH_cjs.timeRemapOf(this.spec);
1312
- const span = base ? chunkYOV6MEXH_cjs.contentLength(base, this.duration) : this.duration;
1313
- this._remap = base ? chunkYOV6MEXH_cjs.remapOf(this.spec, "time", span) : null;
1311
+ const base = chunkMZCDBRTY_cjs.timeRemapOf(this.spec);
1312
+ const span = base ? chunkMZCDBRTY_cjs.contentLength(base, this.duration) : this.duration;
1313
+ this._remap = base ? chunkMZCDBRTY_cjs.remapOf(this.spec, "time", span) : null;
1314
1314
  this._contentSpan = span;
1315
1315
  this._compositionShape = { width, height, duration: span };
1316
1316
  const lateKeyframes = [];
@@ -1327,7 +1327,7 @@ var CompositionSequence = class extends chunkYOV6MEXH_cjs.Sequence {
1327
1327
  if (crowd >= chunkP4GY3Z4G_cjs.MANY_ADVANCED) {
1328
1328
  console.warn(`pixi-effects: ${chunkZMAD3KJU_cjs.describeLayer(this.spec)}: ${crowd} layers with an advanced blendMode are on screen at once (a composition with one counts each layer inside it, since its children blend one by one); each is a full-frame pass (about 2 ms on WebGL). Put fewer layers in the blend (or draw the glow as one layer), or use add / screen / multiply`);
1329
1329
  }
1330
- this._children = await chunkYOV6MEXH_cjs.buildSequenceTree(
1330
+ this._children = await chunkMZCDBRTY_cjs.buildSequenceTree(
1331
1331
  this.spec.sequences ?? [],
1332
1332
  this._compositionShape,
1333
1333
  this.root
@@ -1338,22 +1338,22 @@ var CompositionSequence = class extends chunkYOV6MEXH_cjs.Sequence {
1338
1338
  if (matteNames.size > 0) {
1339
1339
  this._mattes = new MatteSet(inner, width, height);
1340
1340
  for (const name of matteNames) {
1341
- const source = this._children.find((c) => c.spec.name === name && !(c instanceof chunkYOV6MEXH_cjs.CameraSequence));
1341
+ const source = this._children.find((c) => c.spec.name === name && !(c instanceof chunkMZCDBRTY_cjs.CameraSequence));
1342
1342
  if (!source || !source.target || !canBeMatte(source.spec)) continue;
1343
1343
  const chain = [];
1344
1344
  for (let p = this._parentOf.get(source); p; p = this._parentOf.get(p)) chain.push(p);
1345
1345
  this._mattes.add(name, source, chain);
1346
1346
  }
1347
1347
  }
1348
- if (this._children.some((c) => c instanceof chunkYOV6MEXH_cjs.LightSequence)) {
1348
+ if (this._children.some((c) => c instanceof chunkMZCDBRTY_cjs.LightSequence)) {
1349
1349
  for (const message of lightSetProblems(this.spec.sequences ?? [])) console.warn(`pixi-effects: ${chunkZMAD3KJU_cjs.describeLayer(this.spec)}: ${message}`);
1350
1350
  }
1351
1351
  const layerNames = new Set(this._children.map((c) => c.spec.name).filter((n) => !!n));
1352
1352
  for (const cam of this._children) {
1353
- if (!(cam instanceof chunkYOV6MEXH_cjs.CameraSequence)) continue;
1353
+ if (!(cam instanceof chunkMZCDBRTY_cjs.CameraSequence)) continue;
1354
1354
  cam.resolveFocusNames((name) => {
1355
1355
  const hit = this._children.find((c) => c.spec.name === name && c.spec.threeD);
1356
- return hit ? chunkYOV6MEXH_cjs.layerInitialZ(hit.spec, hit.scope()) : void 0;
1356
+ return hit ? chunkMZCDBRTY_cjs.layerInitialZ(hit.spec, hit.scope()) : void 0;
1357
1357
  }, layerNames);
1358
1358
  }
1359
1359
  const blendSaid = /* @__PURE__ */ new Map();
@@ -1363,11 +1363,11 @@ var CompositionSequence = class extends chunkYOV6MEXH_cjs.Sequence {
1363
1363
  else blendSaid.set(message, { spec, n: 1 });
1364
1364
  };
1365
1365
  for (const child of this._children) {
1366
- if (child instanceof chunkYOV6MEXH_cjs.CameraSequence) {
1366
+ if (child instanceof chunkMZCDBRTY_cjs.CameraSequence) {
1367
1367
  this._cameras.push(child);
1368
1368
  continue;
1369
1369
  }
1370
- if (child instanceof chunkYOV6MEXH_cjs.LightSequence) {
1370
+ if (child instanceof chunkMZCDBRTY_cjs.LightSequence) {
1371
1371
  this._lights.push(child);
1372
1372
  continue;
1373
1373
  }
@@ -1401,7 +1401,7 @@ var CompositionSequence = class extends chunkYOV6MEXH_cjs.Sequence {
1401
1401
  if (maskSrc.kind === "inline") {
1402
1402
  const maskSpec = maskSrc.spec;
1403
1403
  const lifetime = maskSpec.at === void 0 ? { at: child.at, duration: maskSpec.duration ?? child.duration } : {};
1404
- const built = await chunkYOV6MEXH_cjs.buildSequenceTree([{ ...maskSpec, ...lifetime }], this._compositionShape, this.root);
1404
+ const built = await chunkMZCDBRTY_cjs.buildSequenceTree([{ ...maskSpec, ...lifetime }], this._compositionShape, this.root);
1405
1405
  const maskSeq = built[0];
1406
1406
  if (maskSeq?.target) {
1407
1407
  child.maskSequence = maskSeq;
@@ -1457,9 +1457,9 @@ var CompositionSequence = class extends chunkYOV6MEXH_cjs.Sequence {
1457
1457
  const remap = this._remap;
1458
1458
  const childOffset = remap ? 0 : offset + this.at;
1459
1459
  this._childBase = childOffset;
1460
- const target = remap ? chunkYOV6MEXH_cjs.createTimeline({ paused: true, defaults: { ease: "none" } }) : timeline;
1460
+ const target = remap ? chunkMZCDBRTY_cjs.createTimeline({ paused: true, defaults: { ease: "none" } }) : timeline;
1461
1461
  for (const child of this._children) {
1462
- const own = chunkYOV6MEXH_cjs.createTimeline({ defaults: { ease: "none" } });
1462
+ const own = chunkMZCDBRTY_cjs.createTimeline({ defaults: { ease: "none" } });
1463
1463
  child.bindTimeline(own, childOffset);
1464
1464
  child.maskSequence?.bindTimeline(own, childOffset);
1465
1465
  target.add(own, 0);
@@ -1489,8 +1489,8 @@ var CompositionSequence = class extends chunkYOV6MEXH_cjs.Sequence {
1489
1489
  this._clock = clock;
1490
1490
  const scope = this.scope();
1491
1491
  if (remap.start !== void 0 && remap.timeKfs.length === 0) clock.time = remap.start;
1492
- chunkYOV6MEXH_cjs.bindClock(timeline, clock, "time", remap, this.duration, offset + this.at, scope);
1493
- this._warnUnreachable(chunkYOV6MEXH_cjs.clockTable(remap, "time", this.duration, offset + this.at, scope, offset + this.at + this.duration), offset + this.at, offset + this.at + this.duration);
1492
+ chunkMZCDBRTY_cjs.bindClock(timeline, clock, "time", remap, this.duration, offset + this.at, scope);
1493
+ this._warnUnreachable(chunkMZCDBRTY_cjs.clockTable(remap, "time", this.duration, offset + this.at, scope, offset + this.at + this.duration), offset + this.at, offset + this.at + this.duration);
1494
1494
  }
1495
1495
  /**
1496
1496
  * A child the clock never dwells in is never visible: say so. Its `at` is in THIS composition's local time, so the usual mistake is
@@ -1528,7 +1528,7 @@ var CompositionSequence = class extends chunkYOV6MEXH_cjs.Sequence {
1528
1528
  for (let p = this._parentOf.get(seq); p; p = this._parentOf.get(p)) out.push(p);
1529
1529
  return out;
1530
1530
  };
1531
- return [...this._visual.map((v) => v.seq), ...this._nested].filter((seq) => !(seq instanceof chunkYOV6MEXH_cjs.NullSequence)).map((seq) => {
1531
+ return [...this._visual.map((v) => v.seq), ...this._nested].filter((seq) => !(seq instanceof chunkMZCDBRTY_cjs.NullSequence)).map((seq) => {
1532
1532
  const layer = this._visual.find((v) => v.seq === seq)?.layer ?? null;
1533
1533
  return {
1534
1534
  seq,
@@ -1537,24 +1537,24 @@ var CompositionSequence = class extends chunkYOV6MEXH_cjs.Sequence {
1537
1537
  carriers: carriersOf(seq),
1538
1538
  depthBlur: layer?.blur ?? 0,
1539
1539
  // how lit it is (threeD layers that receive the lights of the last frame only); computed here, not per frame
1540
- light: layer && this._lighting && layer.world && layer.spec.lit !== false ? chunkYOV6MEXH_cjs.lightLevel(layer.world, this._lighting.cam, this._lighting.states) : void 0
1540
+ light: layer && this._lighting && layer.world && layer.spec.lit !== false ? chunkMZCDBRTY_cjs.lightLevel(layer.world, this._lighting.cam, this._lighting.states) : void 0
1541
1541
  };
1542
1542
  });
1543
1543
  }
1544
1544
  /** Match every `parent: 'name'` to a null layer; anything that cannot work is said out loud and drawn unparented. */
1545
1545
  _resolveParents() {
1546
- const nulls = this._children.filter((c) => c instanceof chunkYOV6MEXH_cjs.NullSequence);
1546
+ const nulls = this._children.filter((c) => c instanceof chunkMZCDBRTY_cjs.NullSequence);
1547
1547
  const nullNames = nulls.map((n) => n.spec.name).filter((n) => !!n);
1548
1548
  const warned = /* @__PURE__ */ new Set();
1549
1549
  for (const child of this._children) {
1550
1550
  const want = child.spec.parent;
1551
1551
  if (want === void 0) continue;
1552
1552
  const who = chunkZMAD3KJU_cjs.describeLayer(child.spec);
1553
- if (child instanceof chunkYOV6MEXH_cjs.CameraSequence) {
1553
+ if (child instanceof chunkMZCDBRTY_cjs.CameraSequence) {
1554
1554
  console.warn(`pixi-effects: ${who}: a camera cannot have a parent; ignored`);
1555
1555
  continue;
1556
1556
  }
1557
- if (child instanceof chunkYOV6MEXH_cjs.LightSequence) {
1557
+ if (child instanceof chunkMZCDBRTY_cjs.LightSequence) {
1558
1558
  console.warn(`pixi-effects: ${who}: a light cannot have a parent (parent "${want}" ignored: move the light with its own x / y / z keyframes)`);
1559
1559
  continue;
1560
1560
  }
@@ -1568,7 +1568,7 @@ var CompositionSequence = class extends chunkYOV6MEXH_cjs.Sequence {
1568
1568
  console.warn(`pixi-effects: ${who}: parent "${want}": no layer with that name${hint ? `; did you mean "${hint}"?` : ""} (the layer is drawn without a parent)`);
1569
1569
  continue;
1570
1570
  }
1571
- const holder = same.find((c) => c instanceof chunkYOV6MEXH_cjs.NullSequence);
1571
+ const holder = same.find((c) => c instanceof chunkMZCDBRTY_cjs.NullSequence);
1572
1572
  if (!holder) {
1573
1573
  console.warn(`pixi-effects: ${who}: parent "${want}" is a ${same[0].spec.type} layer; only { type: 'null' } layers can be parents (the layer is drawn without a parent)`);
1574
1574
  continue;
@@ -1613,8 +1613,8 @@ var CompositionSequence = class extends chunkYOV6MEXH_cjs.Sequence {
1613
1613
  childT,
1614
1614
  compEnd
1615
1615
  );
1616
- const cam = active ? active.cam.state() : chunkYOV6MEXH_cjs.homeCamera(width, height);
1617
- const basis = chunkYOV6MEXH_cjs.cameraBasis(cam, width, height);
1616
+ const cam = active ? active.cam.state() : chunkMZCDBRTY_cjs.homeCamera(width, height);
1617
+ const basis = chunkMZCDBRTY_cjs.cameraBasis(cam, width, height);
1618
1618
  for (const layer of this._layers3d) layer.update(host, basis);
1619
1619
  this._applyLighting(childT, compEnd, basis, active?.cam ?? null);
1620
1620
  this._applyDepthOfField(cam, basis);
@@ -1639,7 +1639,7 @@ var CompositionSequence = class extends chunkYOV6MEXH_cjs.Sequence {
1639
1639
  return t >= w.start && (t < w.end || w.end >= compEnd && t <= w.end);
1640
1640
  });
1641
1641
  const states = live.map((l) => l.state());
1642
- const packed = states.length > 0 ? chunkYOV6MEXH_cjs.packLights(states) : null;
1642
+ const packed = states.length > 0 ? chunkMZCDBRTY_cjs.packLights(states) : null;
1643
1643
  this._lighting = states.length > 0 ? { states, cam: { x: basis.cx, y: basis.cy, z: basis.cz } } : null;
1644
1644
  const shadowing = states.some((s) => s.castsShadows);
1645
1645
  const casters = shadowing ? this._layers3d.filter((l) => l.spec.castsShadows && l.display.visible && l.world && l.source) : [];
@@ -1648,7 +1648,7 @@ var CompositionSequence = class extends chunkYOV6MEXH_cjs.Sequence {
1648
1648
  const mat = l.setLit(true);
1649
1649
  if (!mat || !l.world) continue;
1650
1650
  const lit = l.spec.lit !== false;
1651
- const mine = lit ? casters.filter((c) => c !== l).slice(0, chunkYOV6MEXH_cjs.MAX_CASTERS).map((c) => ({ frame: c.world, source: c.source })) : [];
1651
+ const mine = lit ? casters.filter((c) => c !== l).slice(0, chunkMZCDBRTY_cjs.MAX_CASTERS).map((c) => ({ frame: c.world, source: c.source })) : [];
1652
1652
  mat.update(l.world, camInfo, lit ? packed : null, fog, mine);
1653
1653
  }
1654
1654
  }
@@ -1659,8 +1659,8 @@ var CompositionSequence = class extends chunkYOV6MEXH_cjs.Sequence {
1659
1659
  for (const l of this._layers3d) l.setBlur(0);
1660
1660
  return;
1661
1661
  }
1662
- const focusDepth = chunkYOV6MEXH_cjs.projectPoint(basis, { x: cam.lookAtX, y: cam.lookAtY, z: cam.focus ?? 0 }).depth;
1663
- if (!(focusDepth > chunkYOV6MEXH_cjs.NEAR)) {
1662
+ const focusDepth = chunkMZCDBRTY_cjs.projectPoint(basis, { x: cam.lookAtX, y: cam.lookAtY, z: cam.focus ?? 0 }).depth;
1663
+ if (!(focusDepth > chunkMZCDBRTY_cjs.NEAR)) {
1664
1664
  if (!this._dofSaid.behind) {
1665
1665
  this._dofSaid.behind = true;
1666
1666
  console.warn(`pixi-effects: ${chunkZMAD3KJU_cjs.describeLayer(this.spec)}: the camera's focus (z = ${(cam.focus ?? 0).toFixed(0)}) is at or behind the camera, so nothing is blurred. Put focus in front of the camera (a z below the camera's z)`);
@@ -1670,10 +1670,10 @@ var CompositionSequence = class extends chunkYOV6MEXH_cjs.Sequence {
1670
1670
  }
1671
1671
  let blurred = 0;
1672
1672
  for (const l of this._layers3d) {
1673
- l.setBlur(l.display.visible ? chunkYOV6MEXH_cjs.blurRadius(aperture, basis.focal, l.depth, focusDepth) : 0);
1673
+ l.setBlur(l.display.visible ? chunkMZCDBRTY_cjs.blurRadius(aperture, basis.focal, l.depth, focusDepth) : 0);
1674
1674
  if (l.blur > 0) blurred++;
1675
1675
  }
1676
- if (blurred >= chunkYOV6MEXH_cjs.MANY_BLURRED && !this._dofSaid.many) {
1676
+ if (blurred >= chunkMZCDBRTY_cjs.MANY_BLURRED && !this._dofSaid.many) {
1677
1677
  this._dofSaid.many = true;
1678
1678
  console.warn(`pixi-effects: ${chunkZMAD3KJU_cjs.describeLayer(this.spec)}: ${blurred} layers are blurred by depth of field at once; each costs a filter pass per frame (WebGPU more). Merge the far layers or lower aperture`);
1679
1679
  }
@@ -1689,7 +1689,7 @@ var CompositionSequence = class extends chunkYOV6MEXH_cjs.Sequence {
1689
1689
  const inner = [];
1690
1690
  for (const child of this._children) child.collectAudio(inner, 0);
1691
1691
  const lo = baseTime + this.at, hi = lo + this.duration;
1692
- const table = chunkYOV6MEXH_cjs.clockTable(remap, "time", this.duration, lo, this.scope(), hi);
1692
+ const table = chunkMZCDBRTY_cjs.clockTable(remap, "time", this.duration, lo, this.scope(), hi);
1693
1693
  for (const d of inner) {
1694
1694
  const prev = d.warp;
1695
1695
  out.push({ ...d, warp: (t) => t < lo || t > hi ? NaN : prev ? prev(table.at(t)) : table.at(t) });
@@ -1719,5 +1719,5 @@ function frameOf(child) {
1719
1719
 
1720
1720
  exports.CompositionSequence = CompositionSequence;
1721
1721
  exports.maskSourceOf = maskSourceOf;
1722
- //# sourceMappingURL=chunk-C7HJJ7MZ.cjs.map
1723
- //# sourceMappingURL=chunk-C7HJJ7MZ.cjs.map
1722
+ //# sourceMappingURL=chunk-SBOVUZZY.cjs.map
1723
+ //# sourceMappingURL=chunk-SBOVUZZY.cjs.map