pixi-effects 0.21.0 → 0.22.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 (83) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +6 -6
  3. package/ai/SKILL.md +1 -1
  4. package/ai/chat-template.html +3 -3
  5. package/ai/reference/cheatsheet.md +2 -2
  6. package/ai/reference/pitfalls.md +6 -2
  7. package/ai/reference/recipes.md +30 -0
  8. package/ai/template.html +5 -5
  9. package/ai/tools/check.mjs +14 -3
  10. package/dist/{Base-wYJQ2g5Q.d.cts → Base-BzlPgd-D.d.cts} +1 -1
  11. package/dist/{Base-CzfLGoDr.d.ts → Base-gu-5X0Cv.d.ts} +1 -1
  12. package/dist/Composition-BK5SH6J7.cjs +16 -0
  13. package/dist/{Composition-2UFPSNVN.cjs.map → Composition-BK5SH6J7.cjs.map} +1 -1
  14. package/dist/Composition-Q5TVG3HM.js +7 -0
  15. package/dist/{Composition-BVI236ZR.js.map → Composition-Q5TVG3HM.js.map} +1 -1
  16. package/dist/Controller.cjs +2 -2
  17. package/dist/Controller.d.cts +2 -2
  18. package/dist/Controller.d.ts +2 -2
  19. package/dist/Controller.js +1 -1
  20. package/dist/{Movie-CgYwa5QG.d.ts → Movie--_TJvdJa.d.ts} +1 -1
  21. package/dist/{Movie-mtX9AkQ-.d.cts → Movie-DMxOoTdW.d.cts} +1 -1
  22. package/dist/Presenter.cjs +2 -2
  23. package/dist/Presenter.d.cts +2 -2
  24. package/dist/Presenter.d.ts +2 -2
  25. package/dist/Presenter.js +1 -1
  26. package/dist/blendModes-5E4G2ZZQ.cjs +94 -0
  27. package/dist/blendModes-5E4G2ZZQ.cjs.map +1 -0
  28. package/dist/blendModes-HCP5XTNP.js +90 -0
  29. package/dist/blendModes-HCP5XTNP.js.map +1 -0
  30. package/dist/chunk-BPTW7L25.cjs +275 -0
  31. package/dist/chunk-BPTW7L25.cjs.map +1 -0
  32. package/dist/{chunk-DDIXIWXK.js → chunk-DC4JPY6A.js} +29 -276
  33. package/dist/chunk-DC4JPY6A.js.map +1 -0
  34. package/dist/chunk-E7RONUZ7.js +268 -0
  35. package/dist/chunk-E7RONUZ7.js.map +1 -0
  36. package/dist/{chunk-BPW42X7C.cjs → chunk-IFZOI3JQ.cjs} +47 -300
  37. package/dist/chunk-IFZOI3JQ.cjs.map +1 -0
  38. package/dist/chunk-K4JVI5HK.cjs +143 -0
  39. package/dist/chunk-K4JVI5HK.cjs.map +1 -0
  40. package/dist/{chunk-6JJC37ZD.cjs → chunk-MHOO2CVU.cjs} +124 -74
  41. package/dist/chunk-MHOO2CVU.cjs.map +1 -0
  42. package/dist/{chunk-MNM56B3X.js → chunk-NHICCDTC.js} +13 -3
  43. package/dist/chunk-NHICCDTC.js.map +1 -0
  44. package/dist/{chunk-NGYGFGDS.js → chunk-UQDEDYVM.js} +82 -32
  45. package/dist/chunk-UQDEDYVM.js.map +1 -0
  46. package/dist/{chunk-WTRKDIKH.cjs → chunk-UZTKEYFP.cjs} +13 -3
  47. package/dist/chunk-UZTKEYFP.cjs.map +1 -0
  48. package/dist/chunk-YEPDQ7I3.js +132 -0
  49. package/dist/chunk-YEPDQ7I3.js.map +1 -0
  50. package/dist/index.cjs +70 -67
  51. package/dist/index.cjs.map +1 -1
  52. package/dist/index.d.cts +4 -4
  53. package/dist/index.d.ts +4 -4
  54. package/dist/index.js +9 -6
  55. package/dist/index.js.map +1 -1
  56. package/dist/loader.css +1 -1
  57. package/dist/{music-CFEC7HKL.js → music-FUN7N225.js} +3 -3
  58. package/dist/{music-CFEC7HKL.js.map → music-FUN7N225.js.map} +1 -1
  59. package/dist/{music-UAN7DXK4.cjs → music-GEAH2XCT.cjs} +7 -7
  60. package/dist/{music-UAN7DXK4.cjs.map → music-GEAH2XCT.cjs.map} +1 -1
  61. package/dist/{sfx-EX4PUBMV.cjs → sfx-2DYTYNYW.cjs} +8 -8
  62. package/dist/{sfx-EX4PUBMV.cjs.map → sfx-2DYTYNYW.cjs.map} +1 -1
  63. package/dist/{sfx-U3GM2MED.js → sfx-3IDAJ3UZ.js} +3 -3
  64. package/dist/{sfx-U3GM2MED.js.map → sfx-3IDAJ3UZ.js.map} +1 -1
  65. package/dist/three.cjs +7 -6
  66. package/dist/three.cjs.map +1 -1
  67. package/dist/three.d.cts +2 -2
  68. package/dist/three.d.ts +2 -2
  69. package/dist/three.js +3 -2
  70. package/dist/three.js.map +1 -1
  71. package/dist/{types-YmUaViL1.d.ts → types-DBbZVKGS.d.cts} +7 -4
  72. package/dist/{types-YmUaViL1.d.cts → types-DBbZVKGS.d.ts} +7 -4
  73. package/docs/dsl.md +43 -2
  74. package/llms-full.txt +82 -7
  75. package/package.json +1 -1
  76. package/dist/Composition-2UFPSNVN.cjs +0 -14
  77. package/dist/Composition-BVI236ZR.js +0 -5
  78. package/dist/chunk-6JJC37ZD.cjs.map +0 -1
  79. package/dist/chunk-BPW42X7C.cjs.map +0 -1
  80. package/dist/chunk-DDIXIWXK.js.map +0 -1
  81. package/dist/chunk-MNM56B3X.js.map +0 -1
  82. package/dist/chunk-NGYGFGDS.js.map +0 -1
  83. package/dist/chunk-WTRKDIKH.cjs.map +0 -1
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkWTRKDIKH_cjs = require('./chunk-WTRKDIKH.cjs');
3
+ var chunkBPTW7L25_cjs = require('./chunk-BPTW7L25.cjs');
4
+ var chunkUZTKEYFP_cjs = require('./chunk-UZTKEYFP.cjs');
4
5
  var PIXI = require('pixi.js');
5
6
  var gsap = require('gsap');
6
7
 
@@ -500,7 +501,7 @@ function checkEase(ease, where) {
500
501
  console.warn(`pixi-effects: ${where}: "${ease}" is a family, not an ease \u2014 write ${ease.toLowerCase()}.out, ${ease.toLowerCase()}.in or ${ease.toLowerCase()}.inOut`);
501
502
  return;
502
503
  }
503
- const guess = chunkWTRKDIKH_cjs.suggestName(ease, EASE_NAMES);
504
+ const guess = chunkUZTKEYFP_cjs.suggestName(ease, EASE_NAMES);
504
505
  console.warn(`pixi-effects: ${where}: unknown ease "${ease}"${guess ? ` \u2014 did you mean "${guess}"?` : ""} (GSAP would run it as its default ease, power1.out). Examples: ${EASE_NAMES.slice(0, 7).join(", ")}, back.out(1.7), elastic.out(1, 0.3), steps(8)`);
505
506
  }
506
507
 
@@ -1110,7 +1111,7 @@ var GRAIN_KEYS = ["amount", "size", "seed", "fps", "color"];
1110
1111
  var GrainFilter = class extends PIXI.Filter {
1111
1112
  _fps;
1112
1113
  constructor(options = {}) {
1113
- chunkWTRKDIKH_cjs.warnUnknownOptions("grain filter", options, GRAIN_KEYS);
1114
+ chunkUZTKEYFP_cjs.warnUnknownOptions("grain filter", options, GRAIN_KEYS);
1114
1115
  const { amount = 0.08, size = 1.5, seed = 0, fps = 24, color = 0 } = options;
1115
1116
  super({
1116
1117
  glProgram: PIXI.GlProgram.from({ vertex: GL_VERTEX, fragment: GL_FRAGMENT2, name: "grain-filter" }),
@@ -1218,7 +1219,7 @@ function isNamedFilterType(t) {
1218
1219
  return !NOT_NAMED.has(t);
1219
1220
  }
1220
1221
  function unknownType(t) {
1221
- const guess = chunkWTRKDIKH_cjs.suggestName(t, FILTER_TYPES);
1222
+ const guess = chunkUZTKEYFP_cjs.suggestName(t, FILTER_TYPES);
1222
1223
  return new Error(`pixi-effects: unknown filter type "${t}"${guess ? ` \u2014 did you mean "${guess}"?` : ""} (valid: ${[...FILTER_TYPES, "chromaKey", "custom"].join(", ")})`);
1223
1224
  }
1224
1225
  var library = null;
@@ -1267,7 +1268,7 @@ function colorMatrix(params) {
1267
1268
  const preset = params.preset;
1268
1269
  if (preset !== void 0) {
1269
1270
  if (!MATRIX_PRESETS.includes(preset)) {
1270
- const guess = chunkWTRKDIKH_cjs.suggestName(preset, MATRIX_PRESETS);
1271
+ const guess = chunkUZTKEYFP_cjs.suggestName(preset, MATRIX_PRESETS);
1271
1272
  throw new Error(`pixi-effects: colorMatrix preset "${preset}" is not one of ${MATRIX_PRESETS.join(", ")}${guess ? ` \u2014 did you mean "${guess}"?` : ""}`);
1272
1273
  }
1273
1274
  f[preset === "grayscale" ? "desaturate" : preset].call(f);
@@ -1429,269 +1430,6 @@ var NullSequence = class extends Sequence {
1429
1430
  this.buildFilters();
1430
1431
  }
1431
1432
  };
1432
-
1433
- // src/space/specKeys.ts
1434
- function collectPropKeys(spec) {
1435
- const out = /* @__PURE__ */ new Set();
1436
- for (const k of Object.keys(spec.initial ?? {})) out.add(k);
1437
- for (const kf of spec.keyframes ?? []) {
1438
- for (const bag of [kf.set, kf.to, kf.from]) {
1439
- for (const k of Object.keys(bag ?? {})) out.add(k);
1440
- }
1441
- }
1442
- return out;
1443
- }
1444
-
1445
- // src/core/layerKeys.ts
1446
- var COMMON = ["type", "name", "parent", "at", "duration", "initial", "keyframes", "filters", "filterArea", "mask", "maskInverted", "blendMode", "threeD", "hideBehindCamera"];
1447
- var VIDEO = [...COMMON, "asset", "loop", "audio", "volume", "speed"];
1448
- var IMAGE = [...COMMON, "asset", "colorSpace"];
1449
- var TEXT = [...COMMON, "text", "format", "style", "colorSpace", "fillGradient"];
1450
- var AUDIO = [...COMMON, "volume", "asset", "loop", "sfx", "music", "speed"];
1451
- var COMPOSITION = [...COMMON, "width", "height", "sequences", "transitions", "speed"];
1452
- var CAMERA = [...COMMON];
1453
- var NULL = [...COMMON];
1454
- var SHAPE = [...COMMON, "shape", "fillGradient", "colorSpace", "strokeCap", "strokeJoin"];
1455
- var TRIM = ["trimStart", "trimEnd", "trimEach"];
1456
- var RECT = [...SHAPE, ...TRIM, "width", "height", "cornerRadius", "anchorX", "anchorY"];
1457
- var CIRCLE = [...SHAPE, ...TRIM, "radius", "anchorX", "anchorY"];
1458
- var ELLIPSE = [...SHAPE, ...TRIM, "radiusX", "radiusY", "anchorX", "anchorY"];
1459
- var ARC = [...SHAPE, "radius", "innerRadius", "startAngle", "endAngle"];
1460
- var LINE = [...SHAPE, ...TRIM, "from", "to"];
1461
- var POLYGON = [...SHAPE, ...TRIM, "points", "open"];
1462
- var PATH = [...SHAPE, ...TRIM, "d", "morphTo", "morph", "morphPoints"];
1463
- var SHAPES = { rect: RECT, circle: CIRCLE, ellipse: ELLIPSE, arc: ARC, line: LINE, polygon: POLYGON, path: PATH };
1464
- var BY_TYPE = { video: VIDEO, image: IMAGE, text: TEXT, audio: AUDIO, composition: COMPOSITION, camera: CAMERA, null: NULL };
1465
- function kindName(spec) {
1466
- return spec.type === "shape" && spec.shape ? `${spec.shape} shape` : `${spec.type} layer`;
1467
- }
1468
- function layerKeys(spec) {
1469
- if (spec.type === "shape") return spec.shape && SHAPES[spec.shape] || null;
1470
- return BY_TYPE[spec.type] ?? null;
1471
- }
1472
- function kindsWithKey(key) {
1473
- const out = [];
1474
- for (const [shape, keys] of Object.entries(SHAPES)) if (keys.includes(key)) out.push(`${shape} shape`);
1475
- for (const [type, keys] of Object.entries(BY_TYPE)) if (keys.includes(key)) out.push(`${type} layer`);
1476
- return out;
1477
- }
1478
- var PROP_KEYS = /* @__PURE__ */ new Set([
1479
- // transform and look (GSAP + PixiPlugin names)
1480
- "x",
1481
- "y",
1482
- "z",
1483
- "alpha",
1484
- "rotation",
1485
- "rotationX",
1486
- "rotationY",
1487
- "width",
1488
- "height",
1489
- "visible",
1490
- "autoAlpha",
1491
- "scale",
1492
- "scaleX",
1493
- "scaleY",
1494
- "anchor",
1495
- "anchorX",
1496
- "anchorY",
1497
- "pivot",
1498
- "pivotX",
1499
- "pivotY",
1500
- "skew",
1501
- "skewX",
1502
- "skewY",
1503
- "position",
1504
- "positionX",
1505
- "positionY",
1506
- "tint",
1507
- "colorize",
1508
- "colorizeAmount",
1509
- "blur",
1510
- "blurX",
1511
- "blurY",
1512
- "blurPadding",
1513
- // shapes
1514
- "fillColor",
1515
- "fillAlpha",
1516
- "strokeColor",
1517
- "strokeAlpha",
1518
- "strokeWidth",
1519
- "lineColor",
1520
- "lineAlpha",
1521
- "cornerRadius",
1522
- "radius",
1523
- "radiusX",
1524
- "radiusY",
1525
- "innerRadius",
1526
- "startAngle",
1527
- "endAngle",
1528
- "trimStart",
1529
- "trimEnd",
1530
- "trimEach",
1531
- "morph",
1532
- "fillGradient",
1533
- "strokeCap",
1534
- "strokeJoin",
1535
- // text, audio, video
1536
- "fill",
1537
- "value",
1538
- "visibleChars",
1539
- "text",
1540
- "volume",
1541
- "time",
1542
- // camera
1543
- "lookAtX",
1544
- "lookAtY",
1545
- "lookAtZ",
1546
- "fov",
1547
- "focus",
1548
- "aperture",
1549
- "offsetX",
1550
- "offsetY",
1551
- "offsetZ",
1552
- "lookOffsetX",
1553
- "lookOffsetY",
1554
- "lookOffsetZ"
1555
- ]);
1556
- var STYLE_KEYS = [
1557
- "fontSize",
1558
- "fontFamily",
1559
- "fontWeight",
1560
- "fontStyle",
1561
- "fontVariant",
1562
- "fill",
1563
- "stroke",
1564
- "dropShadow",
1565
- "letterSpacing",
1566
- "lineHeight",
1567
- "leading",
1568
- "align",
1569
- "wordWrap",
1570
- "wordWrapWidth",
1571
- "breakWords",
1572
- "whiteSpace",
1573
- "padding",
1574
- "textBaseline",
1575
- "trim",
1576
- "lineJoin",
1577
- "miterLimit",
1578
- "filters",
1579
- "tagStyles"
1580
- ];
1581
-
1582
- // src/core/lint.ts
1583
- var defaultWarn = (m) => console.warn(m);
1584
- function describeLayer(spec) {
1585
- return spec.name ? `layer "${spec.name}"` : `unnamed ${spec.type} layer`;
1586
- }
1587
- function lintTiming(spec, parentDuration, warn = defaultWarn) {
1588
- const who = describeLayer(spec);
1589
- const at = spec.at ?? 0;
1590
- if (at >= parentDuration) {
1591
- warn(`pixi-effects: ${who} starts at ${at}s, after its composition ends (${parentDuration}s), so it is never visible`);
1592
- }
1593
- if (spec.type === "audio" && (spec.sfx !== void 0 || spec.music !== void 0) && spec.duration === void 0) return;
1594
- const duration = spec.duration ?? parentDuration;
1595
- (spec.keyframes ?? []).forEach((kf, i) => {
1596
- const kat = kf.at ?? 0;
1597
- if (kat >= duration) {
1598
- warn(
1599
- `pixi-effects: ${who}: keyframes[${i}] starts at ${kat}s, after the layer ends (duration ${duration}s), so it never plays. Keyframe \`at\` is measured from the start of this layer, not from the start of the composition.`,
1600
- "late-keyframe"
1601
- );
1602
- }
1603
- });
1604
- }
1605
- function summarizeWarnings(messages, shown = 3) {
1606
- if (messages.length <= shown) return messages;
1607
- return [...messages.slice(0, shown), `pixi-effects: ${messages.length - shown} more layers with the same problem (the same loop or helper is probably building them): fix the ones above and these go away.`];
1608
- }
1609
- function lintText(spec, warn = defaultWarn) {
1610
- if (spec.type !== "text") return;
1611
- const strings = [spec.text ?? "", ...(spec.keyframes ?? []).map((kf) => String(kf.set?.text ?? ""))];
1612
- const hasPlaceholder = strings.some((t) => t.includes("{value}"));
1613
- if (hasPlaceholder && !collectPropKeys(spec).has("value")) {
1614
- warn(`pixi-effects: ${describeLayer(spec)}: the text has a {value} placeholder but nothing sets or animates \`value\`, so it prints 0. Set initial: { value: \u2026 } or animate it; {value} is reserved for counters (there is no way to print a literal "{value}").`);
1615
- }
1616
- if (collectPropKeys(spec).has("value") && !hasPlaceholder) {
1617
- warn(`pixi-effects: ${describeLayer(spec)}: \`value\` is set or animated but the text has no {value} placeholder, so nothing shows it. Use text: '{value}' (or e.g. '{value} users').`);
1618
- }
1619
- }
1620
- var REMAPPABLE = /* @__PURE__ */ new Set(["video", "audio", "composition"]);
1621
- var REMAP_NAMES = /* @__PURE__ */ new Set(["time", "timeRemap", "reverse"]);
1622
- var TIME_BAGS = ["set", "to", "from"];
1623
- function lintRemap(spec, warn) {
1624
- const s = spec;
1625
- const who = describeLayer(spec);
1626
- const kfs = s.keyframes ?? [];
1627
- const bags = [s.initial, ...kfs.flatMap((kf) => TIME_BAGS.map((b) => kf[b]))];
1628
- const timeInInitial = !!s.initial && s.initial.time !== void 0;
1629
- const timeInKeyframes = kfs.some((kf) => TIME_BAGS.some((b) => kf[b] && kf[b].time !== void 0));
1630
- const timed = timeInInitial || timeInKeyframes;
1631
- if (bags.some((bag) => bag && bag.speed !== void 0)) {
1632
- warn(`pixi-effects: ${who}: speed is a fixed setting, not an animatable property: write it on the layer (speed: 2); to change the speed over time, animate time (keyframes: [{ at: 0, from: { time: 0 }, to: { time: 4 }, duration: 2, ease: 'power2.in' }])`);
1633
- }
1634
- if (!REMAPPABLE.has(spec.type)) {
1635
- if (timed) warn(`pixi-effects: ${who}: "time" only works on video, audio and composition layers; put this layer in a composition and remap that (it is ignored here)`);
1636
- return;
1637
- }
1638
- if (s.reverse !== void 0) warn(`pixi-effects: ${who}: "reverse" is not a key: write speed: -1 to play backward`);
1639
- if (s.timeRemap !== void 0) warn(`pixi-effects: ${who}: "timeRemap" is not a key: animate time in keyframes (from / to / set), or write speed`);
1640
- if (s.time !== void 0) warn(`pixi-effects: ${who}: "time" belongs in initial or keyframes (initial: { time: 2 }), not on the layer`);
1641
- if (spec.type === "audio" && (s.sfx !== void 0 || s.music !== void 0) && (s.speed !== void 0 || timed)) {
1642
- warn(`pixi-effects: ${who}: speed and time do not apply to a synthesised sound (sfx, music); change an sfx's pitch with pitch (semitones), or put it in a composition and remap that`);
1643
- return;
1644
- }
1645
- if (s.speed !== void 0 && (typeof s.speed !== "number" || !Number.isFinite(s.speed) || s.speed === 0)) {
1646
- warn(`pixi-effects: ${who}: speed ${JSON.stringify(s.speed)} cannot be used: write a number other than 0 (negative plays backward); to hold a moment, key time to the same value twice`);
1647
- }
1648
- if (s.speed !== void 0 && timeInKeyframes) {
1649
- warn(`pixi-effects: ${who}: speed and keyframed time are both set; time wins and speed is ignored. Use one of them`);
1650
- }
1651
- if (timeInInitial && typeof s.initial.time !== "number") {
1652
- warn(`pixi-effects: ${who}: initial.time must be a number of seconds, got ${JSON.stringify(s.initial.time)}`);
1653
- }
1654
- kfs.forEach((kf, i) => {
1655
- for (const b of TIME_BAGS) {
1656
- const v = kf[b]?.time;
1657
- if (v !== void 0 && typeof v !== "number" && typeof v !== "string") warn(`pixi-effects: ${who}: keyframes[${i}].${b}.time must be a number of seconds, got ${JSON.stringify(v)}`);
1658
- }
1659
- });
1660
- }
1661
- function lintKeys(spec, warn = defaultWarn) {
1662
- const who = describeLayer(spec);
1663
- const valid = layerKeys(spec);
1664
- if (valid) {
1665
- for (const key of Object.keys(spec)) {
1666
- if (valid.includes(key) || spec[key] === void 0) continue;
1667
- if (REMAPPABLE.has(spec.type) && REMAP_NAMES.has(key)) continue;
1668
- const guess = chunkWTRKDIKH_cjs.suggestName(key, valid.filter((k) => k !== "type"));
1669
- const owners = kindsWithKey(key);
1670
- const belongs = owners.length ? ` (it belongs to ${owners.slice(0, 3).join(", ")})` : "";
1671
- const hint = guess ? ` \u2014 did you mean "${guess}"?${belongs}` : belongs;
1672
- warn(`pixi-effects: ${who}: "${key}" is not a ${kindName(spec)} key${hint}. Valid keys: ${valid.join(", ")}`);
1673
- }
1674
- }
1675
- lintRemap(spec, warn);
1676
- const said = /* @__PURE__ */ new Set();
1677
- const bags = [spec.initial, ...(spec.keyframes ?? []).flatMap((kf) => [kf.set, kf.to, kf.from])];
1678
- for (const bag of bags) {
1679
- for (const key of Object.keys(bag ?? {})) {
1680
- if (bag[key] === void 0) continue;
1681
- if (PROP_KEYS.has(key) || key.includes(".") || /^gradient/i.test(key) || said.has(key) || key === "speed") continue;
1682
- said.add(key);
1683
- const guess = chunkWTRKDIKH_cjs.suggestName(key, [...PROP_KEYS]);
1684
- warn(`pixi-effects: ${who}: "${key}" is not an animatable property${guess ? ` \u2014 did you mean "${guess}"?` : ""} (in initial, set, to or from). See the cheatsheet for the properties of this kind of layer`);
1685
- }
1686
- }
1687
- if (spec.type === "text" && spec.style && typeof spec.style === "object") {
1688
- for (const key of Object.keys(spec.style)) {
1689
- if (STYLE_KEYS.includes(key) || spec.style[key] === void 0) continue;
1690
- const guess = chunkWTRKDIKH_cjs.suggestName(key, STYLE_KEYS);
1691
- warn(`pixi-effects: ${who}: style.${key} is not a text style key${guess ? ` \u2014 did you mean "${guess}"?` : ""} (it is ignored). Keys: ${STYLE_KEYS.join(", ")}`);
1692
- }
1693
- }
1694
- }
1695
1433
  var BAGS = ["set", "to", "from"];
1696
1434
  function timeRemapOf(spec, prop = "time") {
1697
1435
  const hasInitial = !!spec.initial && "time" in spec.initial;
@@ -1968,10 +1706,14 @@ function focusProblems(camera, siblings) {
1968
1706
  for (const name of focusNames(camera, known)) {
1969
1707
  if (said.has(name)) continue;
1970
1708
  said.add(name);
1971
- const hit = siblings.find((s) => s.name === name);
1972
- if (!hit) out.push({ kind: "missing", name, hint: chunkWTRKDIKH_cjs.suggestName(name, threeD) });
1709
+ const same = siblings.filter((s) => s.name === name);
1710
+ const hit = same.find((s) => s.threeD) ?? same[0];
1711
+ if (!hit) out.push({ kind: "missing", name, hint: chunkUZTKEYFP_cjs.suggestName(name, threeD) });
1973
1712
  else if (!hit.threeD) out.push({ kind: "not-threeD", name });
1974
- else if (movesZ(hit)) out.push({ kind: "moving", name });
1713
+ else {
1714
+ if (same.length > 1) out.push({ kind: "duplicate", name, count: same.length });
1715
+ if (movesZ(hit)) out.push({ kind: "moving", name });
1716
+ }
1975
1717
  }
1976
1718
  return out;
1977
1719
  }
@@ -1981,6 +1723,7 @@ var CameraSequence = class extends Sequence {
1981
1723
  compH = 0;
1982
1724
  warnedFov = false;
1983
1725
  warnedLookAt = false;
1726
+ warnedAperture = false;
1984
1727
  /** True when the camera writes `focus` or `aperture` anywhere: depth of field is on. */
1985
1728
  dof = false;
1986
1729
  zOfName = null;
@@ -2005,10 +1748,20 @@ var CameraSequence = class extends Sequence {
2005
1748
  carrier.offsetX = carrier.offsetY = carrier.offsetZ = 0;
2006
1749
  carrier.lookOffsetX = carrier.lookOffsetY = carrier.lookOffsetZ = 0;
2007
1750
  this.target = carrier;
2008
- const keys = collectPropKeys(this.spec);
1751
+ const keys = chunkBPTW7L25_cjs.collectPropKeys(this.spec);
2009
1752
  this.autoZ = !keys.has("z");
2010
1753
  this.dof = keys.has("focus") || keys.has("aperture");
2011
1754
  }
1755
+ /** The aperture to use now: off unless depth of field is on and the value is a number of 0 or more (said once if it is not). */
1756
+ apertureNow(a) {
1757
+ if (!this.dof) return 0;
1758
+ if (!(a >= 0) && !this.warnedAperture) {
1759
+ this.warnedAperture = true;
1760
+ const who = this.spec.name ? ` "${this.spec.name}"` : "";
1761
+ console.warn(`pixi-effects: camera${who}: aperture ${a} is not a number of 0 or more; depth of field is off (it is the lens diameter in px: 30 is the default, 0 turns it off)`);
1762
+ }
1763
+ return a > 0 ? a : 0;
1764
+ }
2012
1765
  /** Called by the composition once its children exist: how a layer name in `focus` becomes the z of that layer. */
2013
1766
  resolveFocusNames(zOf, names = /* @__PURE__ */ new Set()) {
2014
1767
  this.zOfName = zOf;
@@ -2042,7 +1795,7 @@ var CameraSequence = class extends Sequence {
2042
1795
  lookAtZ: c.lookAtZ + c.lookOffsetZ,
2043
1796
  fov,
2044
1797
  focus: Number.isFinite(c.focus) ? c.focus : 0,
2045
- aperture: this.dof && c.aperture > 0 ? c.aperture : 0
1798
+ aperture: this.apertureNow(c.aperture)
2046
1799
  };
2047
1800
  }
2048
1801
  /** Lifespan on the global timeline (valid after bindTimeline). */
@@ -2411,7 +2164,7 @@ function validateGradientKeyframes(spec, who, warn = (m) => console.warn(m), kin
2411
2164
  const p = value;
2412
2165
  for (const k of Object.keys(p)) {
2413
2166
  if (PATCH_KEYS.includes(k)) continue;
2414
- const guess = chunkWTRKDIKH_cjs.suggestName(k, PATCH_KEYS.filter((x) => x !== "type"));
2167
+ const guess = chunkUZTKEYFP_cjs.suggestName(k, PATCH_KEYS.filter((x) => x !== "type"));
2415
2168
  say(`fillGradient.${k} is not a gradient property${guess ? ` \u2014 did you mean "${guess}"?` : ""} (valid: ${PATCH_KEYS.join(", ")}); it is ignored`);
2416
2169
  }
2417
2170
  if (p.type !== void 0 && start && p.type !== start.type) say("fillGradient.type cannot change over time (linear <-> radial); it is ignored");
@@ -2619,7 +2372,7 @@ var TextSequence = class extends Sequence {
2619
2372
  this.intrinsicWidth = text.width;
2620
2373
  this.intrinsicHeight = text.height;
2621
2374
  }
2622
- validateGradientKeyframes(this.spec, describeLayer(this.spec), void 0, "text");
2375
+ validateGradientKeyframes(this.spec, chunkBPTW7L25_cjs.describeLayer(this.spec), void 0, "text");
2623
2376
  const gradientSpec = this.spec.fillGradient ?? initialProps.fillGradient;
2624
2377
  if (gradientSpec) {
2625
2378
  this._grad = { grad: gradStateFrom(gradientSpec) };
@@ -2655,7 +2408,7 @@ var TextSequence = class extends Sequence {
2655
2408
  bindTextKeyframes(timeline, keyframes, this.duration, origin, () => this._template, (t) => {
2656
2409
  this._template = t;
2657
2410
  refresh();
2658
- }, describeLayer(this.spec));
2411
+ }, chunkBPTW7L25_cjs.describeLayer(this.spec));
2659
2412
  }
2660
2413
  };
2661
2414
  function runSuperWithStrippedSpec(inst, strippedSpec, timeline, offset) {
@@ -2800,16 +2553,16 @@ var AudioSequence = class extends Sequence {
2800
2553
  const playable = this._remap && this._remap.timeKfs.length > 0 ? Infinity : (data.duration ?? Infinity) / constant;
2801
2554
  if (!spec.loop && Number.isFinite(playable) && this.duration > playable + 0.05) {
2802
2555
  console.warn(
2803
- `pixi-effects: ${describeLayer(spec)}: audio asset "${spec.asset}" plays for ${playable.toFixed(1)}s (${data.duration.toFixed(1)}s at speed ${constant}) but the layer lasts ${this.duration.toFixed(1)}s, so it goes silent after ${playable.toFixed(1)}s. Add loop: true, or shorten the layer's duration.`
2556
+ `pixi-effects: ${chunkBPTW7L25_cjs.describeLayer(spec)}: audio asset "${spec.asset}" plays for ${playable.toFixed(1)}s (${data.duration.toFixed(1)}s at speed ${constant}) but the layer lasts ${this.duration.toFixed(1)}s, so it goes silent after ${playable.toFixed(1)}s. Add loop: true, or shorten the layer's duration.`
2804
2557
  );
2805
2558
  }
2806
2559
  }
2807
2560
  async _buildSfx(spec) {
2808
- const who = describeLayer(spec);
2561
+ const who = chunkBPTW7L25_cjs.describeLayer(spec);
2809
2562
  const raw = spec;
2810
2563
  if (raw.asset !== void 0) console.warn(`pixi-effects: ${who}: has both asset and sfx \u2014 the sfx plays; remove one`);
2811
2564
  if (raw.loop) console.warn(`pixi-effects: ${who}: loop has no effect on an sfx \u2014 to repeat it, add one audio layer per hit (a JS loop)`);
2812
- const { resolveSfx, renderSfx, sfxKey } = await import('./sfx-EX4PUBMV.cjs');
2565
+ const { resolveSfx, renderSfx, sfxKey } = await import('./sfx-2DYTYNYW.cjs');
2813
2566
  const sfx = resolveSfx(spec.sfx, spec.duration, who);
2814
2567
  if (!sfx) return;
2815
2568
  this.duration = sfx.length;
@@ -2824,11 +2577,11 @@ var AudioSequence = class extends Sequence {
2824
2577
  });
2825
2578
  }
2826
2579
  async _buildMusic(spec) {
2827
- const who = describeLayer(spec);
2580
+ const who = chunkBPTW7L25_cjs.describeLayer(spec);
2828
2581
  const raw = spec;
2829
2582
  if (raw.asset !== void 0) console.warn(`pixi-effects: ${who}: has both asset and music \u2014 the music plays; remove one`);
2830
2583
  if (raw.sfx !== void 0) console.warn(`pixi-effects: ${who}: has both sfx and music \u2014 the music plays; remove one`);
2831
- const { resolveMusic, renderMusic, musicLength, musicKey } = await import('./music-UAN7DXK4.cjs');
2584
+ const { resolveMusic, renderMusic, musicLength, musicKey } = await import('./music-GEAH2XCT.cjs');
2832
2585
  const music = resolveMusic(spec.music, who);
2833
2586
  if (!music) return;
2834
2587
  const natural = musicLength(music);
@@ -2858,7 +2611,7 @@ var AudioSequence = class extends Sequence {
2858
2611
  out.push({
2859
2612
  ...sourceMap ? { sourceMap } : {},
2860
2613
  ...this._audioBuffer ? { buffer: this._audioBuffer } : { synth: this._synth },
2861
- layer: describeLayer(this.spec),
2614
+ layer: chunkBPTW7L25_cjs.describeLayer(this.spec),
2862
2615
  source: this._source,
2863
2616
  loop: !this._synth && !!this.spec.loop,
2864
2617
  start: t0,
@@ -3078,7 +2831,7 @@ var VideoSequence = class extends Sequence {
3078
2831
  out.push({
3079
2832
  ...sourceMap ? { sourceMap } : {},
3080
2833
  buffer: this._audioBuffer,
3081
- layer: describeLayer(this.spec),
2834
+ layer: chunkBPTW7L25_cjs.describeLayer(this.spec),
3082
2835
  source: `video "${this.spec.asset}"`,
3083
2836
  loop: !!this.spec.loop,
3084
2837
  start: baseTime + this.at,
@@ -3307,7 +3060,7 @@ function morphAt(pairs, t) {
3307
3060
  }
3308
3061
 
3309
3062
  // src/sequences/Shape.ts
3310
- var STYLE_KEYS2 = ["fillColor", "fillAlpha", "strokeColor", "strokeAlpha", "strokeWidth"];
3063
+ var STYLE_KEYS = ["fillColor", "fillAlpha", "strokeColor", "strokeAlpha", "strokeWidth"];
3311
3064
  var COLOR_KEYS = /* @__PURE__ */ new Set(["fillColor", "strokeColor"]);
3312
3065
  var TRIM_KEYS = ["trimStart", "trimEnd"];
3313
3066
  var GEOMETRY_KEYS_BY_SHAPE = {
@@ -3333,7 +3086,7 @@ var ShapeSequence = class extends Sequence {
3333
3086
  // by `Container.onRender`.
3334
3087
  _drawGeometry = () => {
3335
3088
  };
3336
- _liveKeys = new Set(STYLE_KEYS2);
3089
+ _liveKeys = new Set(STYLE_KEYS);
3337
3090
  async build() {
3338
3091
  const graphics = new PIXI.Graphics({ label: this.spec.name });
3339
3092
  graphics.cullable = true;
@@ -3346,20 +3099,20 @@ var ShapeSequence = class extends Sequence {
3346
3099
  for (const k of geomKeys) this._liveKeys.add(k);
3347
3100
  seedGeometry(this._state, this.spec, scope);
3348
3101
  seedStyle(this._state, this.spec.initial ?? {}, scope);
3349
- seedStrokeStyle(this._state, this.spec, this.spec.initial ?? {}, describeLayer(this.spec));
3102
+ seedStrokeStyle(this._state, this.spec, this.spec.initial ?? {}, chunkBPTW7L25_cjs.describeLayer(this.spec));
3350
3103
  if (this.spec.shape === "arc") {
3351
3104
  this._state.startAngle ??= 0;
3352
3105
  this._state.endAngle ??= 360;
3353
3106
  const top = this.spec, ini = this.spec.initial ?? {};
3354
3107
  if ("trimStart" in top || "trimEnd" in top || "trimStart" in ini || "trimEnd" in ini) {
3355
- console.warn(`pixi-effects: ${describeLayer(this.spec)}: trimStart / trimEnd do not apply to an arc: animate its endAngle (and startAngle) instead`);
3108
+ console.warn(`pixi-effects: ${chunkBPTW7L25_cjs.describeLayer(this.spec)}: trimStart / trimEnd do not apply to an arc: animate its endAngle (and startAngle) instead`);
3356
3109
  }
3357
3110
  } else {
3358
3111
  this._state.trimStart ??= 0;
3359
3112
  this._state.trimEnd ??= 1;
3360
3113
  }
3361
3114
  const gradientSpec = this.spec.fillGradient ?? this.spec.initial?.fillGradient;
3362
- validateGradientKeyframes(this.spec, describeLayer(this.spec));
3115
+ validateGradientKeyframes(this.spec, chunkBPTW7L25_cjs.describeLayer(this.spec));
3363
3116
  if (gradientSpec) {
3364
3117
  if (hasGradientKeys(this.spec.keyframes)) {
3365
3118
  this._grad = { grad: gradStateFrom(gradientSpec) };
@@ -3401,9 +3154,9 @@ var ShapeSequence = class extends Sequence {
3401
3154
  }
3402
3155
  /** The prepared morph between `d` and `morphTo`, or null (and a warning when the spec asked for one that cannot work). */
3403
3156
  _setupMorph() {
3404
- const who = describeLayer(this.spec);
3157
+ const who = chunkBPTW7L25_cjs.describeLayer(this.spec);
3405
3158
  const top = this.spec;
3406
- const wanted = this.spec.shape === "path" && (this._state.morph !== void 0 || collectPropKeys(this.spec).has("morph"));
3159
+ const wanted = this.spec.shape === "path" && (this._state.morph !== void 0 || chunkBPTW7L25_cjs.collectPropKeys(this.spec).has("morph"));
3407
3160
  if (this.spec.shape !== "path") {
3408
3161
  if ("morphTo" in top) console.warn(`pixi-effects: ${who}: morphTo only works on a path shape (shape: 'path'); ignored`);
3409
3162
  return null;
@@ -3527,7 +3280,7 @@ function seedStrokeStyle(state, spec, initial, who) {
3527
3280
  }
3528
3281
  }
3529
3282
  function seedStyle(state, initial, scope) {
3530
- for (const k of STYLE_KEYS2) {
3283
+ for (const k of STYLE_KEYS) {
3531
3284
  const v = initial[k];
3532
3285
  if (v === void 0) continue;
3533
3286
  state[k] = COLOR_KEYS.has(k) ? v : numOrZero(v, scope);
@@ -3822,7 +3575,7 @@ function numOrZero(v, scope) {
3822
3575
  var _CompositionSequence = null;
3823
3576
  async function getCompositionSequence() {
3824
3577
  if (!_CompositionSequence) {
3825
- _CompositionSequence = (await import('./Composition-2UFPSNVN.cjs')).CompositionSequence;
3578
+ _CompositionSequence = (await import('./Composition-BK5SH6J7.cjs')).CompositionSequence;
3826
3579
  }
3827
3580
  return _CompositionSequence;
3828
3581
  }
@@ -3876,9 +3629,7 @@ exports.buildSequenceTree = buildSequenceTree;
3876
3629
  exports.cameraBasis = cameraBasis;
3877
3630
  exports.checkEase = checkEase;
3878
3631
  exports.clockTable = clockTable;
3879
- exports.collectPropKeys = collectPropKeys;
3880
3632
  exports.contentLength = contentLength;
3881
- exports.describeLayer = describeLayer;
3882
3633
  exports.ensureFilterLibrary = ensureFilterLibrary;
3883
3634
  exports.evaluateExpr = evaluateExpr;
3884
3635
  exports.flattenSvgPath = flattenSvgPath;
@@ -3886,9 +3637,6 @@ exports.focusProblems = focusProblems;
3886
3637
  exports.homeCamera = homeCamera;
3887
3638
  exports.homeDistance = homeDistance;
3888
3639
  exports.layerInitialZ = layerInitialZ;
3889
- exports.lintKeys = lintKeys;
3890
- exports.lintText = lintText;
3891
- exports.lintTiming = lintTiming;
3892
3640
  exports.noise = noise;
3893
3641
  exports.projectLayer = projectLayer;
3894
3642
  exports.projectPoint = projectPoint;
@@ -3897,7 +3645,6 @@ exports.random = random;
3897
3645
  exports.registerSequenceType = registerSequenceType;
3898
3646
  exports.remapOf = remapOf;
3899
3647
  exports.resolveAt = resolveAt;
3900
- exports.summarizeWarnings = summarizeWarnings;
3901
3648
  exports.timeRemapOf = timeRemapOf;
3902
- //# sourceMappingURL=chunk-BPW42X7C.cjs.map
3903
- //# sourceMappingURL=chunk-BPW42X7C.cjs.map
3649
+ //# sourceMappingURL=chunk-IFZOI3JQ.cjs.map
3650
+ //# sourceMappingURL=chunk-IFZOI3JQ.cjs.map