pixi-effects 0.32.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.
- package/CHANGELOG.md +20 -0
- package/README.md +5 -5
- package/ai/chat-template.html +3 -3
- package/ai/tools/lookup.mjs +29 -6
- package/ai/tools/pixi-effects.mjs +1 -1
- package/dist/Composition-NDXKQHB4.js +7 -0
- package/dist/{Composition-RF7QOEXT.js.map → Composition-NDXKQHB4.js.map} +1 -1
- package/dist/Composition-OLH7RC5Z.cjs +16 -0
- package/dist/{Composition-LNMKWXSL.cjs.map → Composition-OLH7RC5Z.cjs.map} +1 -1
- package/dist/{Spans-SDXABOV6.js → Spans-QHHWC2PB.js} +6 -6
- package/dist/{Spans-SDXABOV6.js.map → Spans-QHHWC2PB.js.map} +1 -1
- package/dist/{Spans-NQGKVMR5.cjs → Spans-QRMN2EZO.cjs} +11 -11
- package/dist/{Spans-NQGKVMR5.cjs.map → Spans-QRMN2EZO.cjs.map} +1 -1
- package/dist/{blendModes-MVRLG3T7.js → blendModes-PP5NPBXY.js} +4 -4
- package/dist/{blendModes-MVRLG3T7.js.map → blendModes-PP5NPBXY.js.map} +1 -1
- package/dist/{blendModes-VTKDXWEN.cjs → blendModes-WIUCYIMC.cjs} +5 -5
- package/dist/{blendModes-VTKDXWEN.cjs.map → blendModes-WIUCYIMC.cjs.map} +1 -1
- package/dist/{chunk-CRUDOKSD.cjs → chunk-5IJENZOG.cjs} +91 -91
- package/dist/{chunk-CRUDOKSD.cjs.map → chunk-5IJENZOG.cjs.map} +1 -1
- package/dist/{chunk-FCMOREIS.js → chunk-67LG7MN5.js} +48 -15
- package/dist/chunk-67LG7MN5.js.map +1 -0
- package/dist/{chunk-K3MAEKFM.cjs → chunk-FVZEBYLW.cjs} +78 -45
- package/dist/chunk-FVZEBYLW.cjs.map +1 -0
- package/dist/{chunk-FCGYJCVO.cjs → chunk-GL2AQFLQ.cjs} +23 -5
- package/dist/chunk-GL2AQFLQ.cjs.map +1 -0
- package/dist/{chunk-Z437UWI4.cjs → chunk-IMQJVRMT.cjs} +5 -5
- package/dist/{chunk-Z437UWI4.cjs.map → chunk-IMQJVRMT.cjs.map} +1 -1
- package/dist/{chunk-C5BNHVKK.js → chunk-ITDYFBB6.js} +23 -5
- package/dist/chunk-ITDYFBB6.js.map +1 -0
- package/dist/{chunk-QHDN6TF5.cjs → chunk-LEECUCTG.cjs} +44 -25
- package/dist/chunk-LEECUCTG.cjs.map +1 -0
- package/dist/{chunk-QFNS6BFL.js → chunk-RTJD3ZSW.js} +4 -4
- package/dist/{chunk-QFNS6BFL.js.map → chunk-RTJD3ZSW.js.map} +1 -1
- package/dist/{chunk-D5BFQVKL.js → chunk-XV4L72FW.js} +5 -5
- package/dist/{chunk-D5BFQVKL.js.map → chunk-XV4L72FW.js.map} +1 -1
- package/dist/{chunk-AW5NPDE4.js → chunk-Y253JQOH.js} +24 -7
- package/dist/chunk-Y253JQOH.js.map +1 -0
- package/dist/index.cjs +33 -33
- package/dist/index.js +5 -5
- package/dist/loader.css +1 -1
- package/dist/present.cjs +5 -5
- package/dist/present.js +5 -5
- package/dist/three.cjs +6 -6
- package/dist/three.js +2 -2
- package/docs/dsl.md +9 -2
- package/llms-full.txt +19 -7
- package/package.json +1 -1
- package/skills/pixi-effects/SKILL.md +1 -1
- package/skills/pixi-effects/reference/pitfalls.md +5 -1
- package/skills/pixi-effects/reference/quickstart.md +3 -2
- package/skills/pixi-effects/reference/recipes.md +1 -1
- package/skills/pixi-effects/template.html +6 -6
- package/dist/Composition-LNMKWXSL.cjs +0 -16
- package/dist/Composition-RF7QOEXT.js +0 -7
- package/dist/chunk-AW5NPDE4.js.map +0 -1
- package/dist/chunk-C5BNHVKK.js.map +0 -1
- package/dist/chunk-FCGYJCVO.cjs.map +0 -1
- package/dist/chunk-FCMOREIS.js.map +0 -1
- package/dist/chunk-K3MAEKFM.cjs.map +0 -1
- package/dist/chunk-QHDN6TF5.cjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { describeLayer, collectPropKeys } from './chunk-
|
|
1
|
+
import { describeLayer, collectPropKeys } from './chunk-ITDYFBB6.js';
|
|
2
2
|
import { suggestName, warnUnknownOptions } from './chunk-BXOCEZ4U.js';
|
|
3
3
|
import * as PIXI from 'pixi.js';
|
|
4
4
|
import { Rectangle, Container, FillGradient, Text, Color, GraphicsPath, Sprite, Texture, Graphics, Assets, Filter, GlProgram, defaultFilterVert, GpuProgram, UniformGroup, TextStyle, CanvasTextMetrics } from 'pixi.js';
|
|
@@ -2270,7 +2270,23 @@ function colorGradientParams(params) {
|
|
|
2270
2270
|
if (i < 0) throw new Error(`pixi-effects: colorGradient gradientType "${gradientType}" is not one of linear, radial or conic`);
|
|
2271
2271
|
return { ...rest, type: i };
|
|
2272
2272
|
}
|
|
2273
|
+
function lintBulgeCenter(params) {
|
|
2274
|
+
const c = params.center;
|
|
2275
|
+
if (!c || typeof c !== "object") return;
|
|
2276
|
+
const xy2 = Array.isArray(c) ? [c[0], c[1]] : [c.x, c.y];
|
|
2277
|
+
if (!xy2.some((v) => typeof v === "number" && Math.abs(v) > 3)) return;
|
|
2278
|
+
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.`);
|
|
2279
|
+
}
|
|
2280
|
+
function fixRadialBlurGpu(f) {
|
|
2281
|
+
const holder = f;
|
|
2282
|
+
const gp = holder.gpuProgram;
|
|
2283
|
+
const GpuProgram5 = PIXI.GpuProgram;
|
|
2284
|
+
if (!gp || !GpuProgram5 || !/uKernelSize\s*:\s*f32/.test(gp.fragment.source)) return f;
|
|
2285
|
+
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") } });
|
|
2286
|
+
return f;
|
|
2287
|
+
}
|
|
2273
2288
|
function createNamedFilter(type, params) {
|
|
2289
|
+
if (lower(type) === "bulgepinch") lintBulgeCenter(params);
|
|
2274
2290
|
if (lower(type) === "colormatrix") return colorMatrix(params);
|
|
2275
2291
|
if (lower(type) === "grain") return new GrainFilter(params);
|
|
2276
2292
|
if (lower(type) === "warp") return new WarpFilter(params);
|
|
@@ -2281,7 +2297,8 @@ function createNamedFilter(type, params) {
|
|
|
2281
2297
|
if (!Ctor) throw MISSING(type, library ? "not found in the loaded package" : "not loaded yet");
|
|
2282
2298
|
const single = SINGLE_VALUE[Object.keys(SINGLE_VALUE).find((k) => lower(k) === lower(type)) ?? ""];
|
|
2283
2299
|
if (single) return new Ctor(params[single]);
|
|
2284
|
-
|
|
2300
|
+
const made = new Ctor(lower(type) === "colorgradient" ? colorGradientParams(params) : params);
|
|
2301
|
+
return lower(type) === "radialblur" ? fixRadialBlurGpu(made) : made;
|
|
2285
2302
|
}
|
|
2286
2303
|
|
|
2287
2304
|
// src/filters/index.ts
|
|
@@ -5606,13 +5623,13 @@ function resolveDim(v, scope) {
|
|
|
5606
5623
|
var _CompositionSequence = null;
|
|
5607
5624
|
async function getCompositionSequence() {
|
|
5608
5625
|
if (!_CompositionSequence) {
|
|
5609
|
-
_CompositionSequence = (await import('./Composition-
|
|
5626
|
+
_CompositionSequence = (await import('./Composition-NDXKQHB4.js')).CompositionSequence;
|
|
5610
5627
|
}
|
|
5611
5628
|
return _CompositionSequence;
|
|
5612
5629
|
}
|
|
5613
5630
|
var _SpansSequence = null;
|
|
5614
5631
|
async function getSpansSequence() {
|
|
5615
|
-
if (!_SpansSequence) _SpansSequence = (await import('./Spans-
|
|
5632
|
+
if (!_SpansSequence) _SpansSequence = (await import('./Spans-QHHWC2PB.js')).SpansSequence;
|
|
5616
5633
|
return _SpansSequence;
|
|
5617
5634
|
}
|
|
5618
5635
|
var staticTypes = {
|
|
@@ -5657,6 +5674,6 @@ async function buildSequenceTree(specs, parent, root) {
|
|
|
5657
5674
|
return out;
|
|
5658
5675
|
}
|
|
5659
5676
|
|
|
5660
|
-
export { CameraSequence, DEFAULT_FOV, DEG3 as DEG, EXPRESSION_NAMES, FALLOFFS, LIGHT_KINDS, LIGHT_PROPS, LightSequence, MANY_BLURRED, MAX_BLUR, MAX_CASTERS, MAX_LIGHTS, MIN_BLUR, NEAR, NullSequence, SHADOW_TAPS, Sequence, TextSequence, bindClock, bindCounterKeyframes, blurRadius, buildScope, buildSequenceTree, cameraBasis, checkEase, clockTable, contentLength, createTimeline, ensureFilterLibrary, evaluateExpr, flattenSvgPath, focusProblems, homeCamera, homeDistance, layerInitialZ, layerToWorld, lengthen, lightLevel, noise, packLights, parseEase, projectLayer, projectPoint, rand, random, registerSequenceType, remapOf, resolveAt, resolveNumber, spansMeta, timeRemapOf };
|
|
5661
|
-
//# sourceMappingURL=chunk-
|
|
5662
|
-
//# sourceMappingURL=chunk-
|
|
5677
|
+
export { CameraSequence, DEFAULT_FOV, DEG3 as DEG, EXPRESSION_NAMES, FALLOFFS, LIGHT_KINDS, LIGHT_PROPS, LightSequence, MANY_BLURRED, MAX_BLUR, MAX_CASTERS, MAX_LIGHTS, MIN_BLUR, NEAR, NullSequence, SHADOW_TAPS, Sequence, TextSequence, bindClock, bindCounterKeyframes, blurRadius, buildScope, buildSequenceTree, cameraBasis, checkEase, clockTable, contentLength, createTimeline, ensureFilterLibrary, evaluateExpr, flattenSvgPath, focusProblems, homeCamera, homeDistance, layerInitialZ, layerToWorld, lengthen, lightLevel, noise, packLights, parseEase, parseSpring, projectLayer, projectPoint, rand, random, registerSequenceType, remapOf, resolveAt, resolveNumber, spansMeta, springDuration, timeRemapOf };
|
|
5678
|
+
//# sourceMappingURL=chunk-Y253JQOH.js.map
|
|
5679
|
+
//# sourceMappingURL=chunk-Y253JQOH.js.map
|