pixi-effects 0.33.0 → 0.34.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 (40) hide show
  1. package/CHANGELOG.md +9 -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/{Spans-KPZ2QDCN.js → Spans-QHHWC2PB.js} +4 -4
  9. package/dist/{Spans-KPZ2QDCN.js.map → Spans-QHHWC2PB.js.map} +1 -1
  10. package/dist/{Spans-VXNQXSI3.cjs → Spans-QRMN2EZO.cjs} +9 -9
  11. package/dist/{Spans-VXNQXSI3.cjs.map → Spans-QRMN2EZO.cjs.map} +1 -1
  12. package/dist/{chunk-SBBXKPBP.cjs → chunk-5IJENZOG.cjs} +62 -62
  13. package/dist/{chunk-SBBXKPBP.cjs.map → chunk-5IJENZOG.cjs.map} +1 -1
  14. package/dist/{chunk-WST432AP.js → chunk-67LG7MN5.js} +4 -4
  15. package/dist/{chunk-WST432AP.js.map → chunk-67LG7MN5.js.map} +1 -1
  16. package/dist/{chunk-LD4VKNPQ.cjs → chunk-FVZEBYLW.cjs} +36 -36
  17. package/dist/{chunk-LD4VKNPQ.cjs.map → chunk-FVZEBYLW.cjs.map} +1 -1
  18. package/dist/{chunk-BVMZUPDU.cjs → chunk-LEECUCTG.cjs} +22 -5
  19. package/dist/chunk-LEECUCTG.cjs.map +1 -0
  20. package/dist/{chunk-BMH4OCDX.js → chunk-XV4L72FW.js} +3 -3
  21. package/dist/{chunk-BMH4OCDX.js.map → chunk-XV4L72FW.js.map} +1 -1
  22. package/dist/{chunk-E53QWHBK.js → chunk-Y253JQOH.js} +22 -5
  23. package/dist/chunk-Y253JQOH.js.map +1 -0
  24. package/dist/index.cjs +31 -31
  25. package/dist/index.js +3 -3
  26. package/dist/loader.css +1 -1
  27. package/dist/present.cjs +3 -3
  28. package/dist/present.js +3 -3
  29. package/dist/three.cjs +5 -5
  30. package/dist/three.js +1 -1
  31. package/docs/dsl.md +7 -2
  32. package/llms-full.txt +10 -3
  33. package/package.json +1 -1
  34. package/skills/pixi-effects/SKILL.md +1 -1
  35. package/skills/pixi-effects/reference/pitfalls.md +2 -0
  36. package/skills/pixi-effects/template.html +6 -6
  37. package/dist/Composition-7XNPTM7L.js +0 -7
  38. package/dist/Composition-L6OALWHI.cjs +0 -16
  39. package/dist/chunk-BVMZUPDU.cjs.map +0 -1
  40. package/dist/chunk-E53QWHBK.js.map +0 -1
@@ -2291,7 +2291,23 @@ function colorGradientParams(params) {
2291
2291
  if (i < 0) throw new Error(`pixi-effects: colorGradient gradientType "${gradientType}" is not one of linear, radial or conic`);
2292
2292
  return { ...rest, type: i };
2293
2293
  }
2294
+ function lintBulgeCenter(params) {
2295
+ const c = params.center;
2296
+ if (!c || typeof c !== "object") return;
2297
+ const xy2 = Array.isArray(c) ? [c[0], c[1]] : [c.x, c.y];
2298
+ if (!xy2.some((v) => typeof v === "number" && Math.abs(v) > 3)) return;
2299
+ console.warn(`pixi-effects: bulgePinch.center is 0-1 of the layer ({ x: 0.5, y: 0.5 } is its middle), but ${JSON.stringify(c)} reads as pixels: the bulge lands outside the layer and nothing shows. Write the point as a fraction (x / the layer's width), or animate center.x / center.y between 0 and 1.`);
2300
+ }
2301
+ function fixRadialBlurGpu(f) {
2302
+ const holder = f;
2303
+ const gp = holder.gpuProgram;
2304
+ const GpuProgram5 = PIXI__namespace.GpuProgram;
2305
+ if (!gp || !GpuProgram5 || !/uKernelSize\s*:\s*f32/.test(gp.fragment.source)) return f;
2306
+ holder.gpuProgram = GpuProgram5.from({ name: gp.name, vertex: gp.vertex, fragment: { ...gp.fragment, source: gp.fragment.source.replace(/uKernelSize(\s*):\s*f32/, "uKernelSize$1: i32") } });
2307
+ return f;
2308
+ }
2294
2309
  function createNamedFilter(type, params) {
2310
+ if (lower(type) === "bulgepinch") lintBulgeCenter(params);
2295
2311
  if (lower(type) === "colormatrix") return colorMatrix(params);
2296
2312
  if (lower(type) === "grain") return new GrainFilter(params);
2297
2313
  if (lower(type) === "warp") return new WarpFilter(params);
@@ -2302,7 +2318,8 @@ function createNamedFilter(type, params) {
2302
2318
  if (!Ctor) throw MISSING(type, library ? "not found in the loaded package" : "not loaded yet");
2303
2319
  const single = SINGLE_VALUE[Object.keys(SINGLE_VALUE).find((k) => lower(k) === lower(type)) ?? ""];
2304
2320
  if (single) return new Ctor(params[single]);
2305
- return new Ctor(lower(type) === "colorgradient" ? colorGradientParams(params) : params);
2321
+ const made = new Ctor(lower(type) === "colorgradient" ? colorGradientParams(params) : params);
2322
+ return lower(type) === "radialblur" ? fixRadialBlurGpu(made) : made;
2306
2323
  }
2307
2324
 
2308
2325
  // src/filters/index.ts
@@ -5627,13 +5644,13 @@ function resolveDim(v, scope) {
5627
5644
  var _CompositionSequence = null;
5628
5645
  async function getCompositionSequence() {
5629
5646
  if (!_CompositionSequence) {
5630
- _CompositionSequence = (await import('./Composition-L6OALWHI.cjs')).CompositionSequence;
5647
+ _CompositionSequence = (await import('./Composition-OLH7RC5Z.cjs')).CompositionSequence;
5631
5648
  }
5632
5649
  return _CompositionSequence;
5633
5650
  }
5634
5651
  var _SpansSequence = null;
5635
5652
  async function getSpansSequence() {
5636
- if (!_SpansSequence) _SpansSequence = (await import('./Spans-VXNQXSI3.cjs')).SpansSequence;
5653
+ if (!_SpansSequence) _SpansSequence = (await import('./Spans-QRMN2EZO.cjs')).SpansSequence;
5637
5654
  return _SpansSequence;
5638
5655
  }
5639
5656
  var staticTypes = {
@@ -5731,5 +5748,5 @@ exports.resolveNumber = resolveNumber;
5731
5748
  exports.spansMeta = spansMeta;
5732
5749
  exports.springDuration = springDuration;
5733
5750
  exports.timeRemapOf = timeRemapOf;
5734
- //# sourceMappingURL=chunk-BVMZUPDU.cjs.map
5735
- //# sourceMappingURL=chunk-BVMZUPDU.cjs.map
5751
+ //# sourceMappingURL=chunk-LEECUCTG.cjs.map
5752
+ //# sourceMappingURL=chunk-LEECUCTG.cjs.map