pixi-effects 0.48.0 → 0.48.1
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 +7 -0
- package/README.md +5 -5
- package/ai/chat-template.html +3 -3
- package/dist/Composition-BOLWGT2R.js +7 -0
- package/dist/{Composition-ZCRJHBB5.js.map → Composition-BOLWGT2R.js.map} +1 -1
- package/dist/Composition-ZZEOEETS.cjs +16 -0
- package/dist/{Composition-PMWLJQPI.cjs.map → Composition-ZZEOEETS.cjs.map} +1 -1
- package/dist/{Spans-KTUPDFSR.cjs → Spans-MWYFG7RI.cjs} +9 -9
- package/dist/{Spans-KTUPDFSR.cjs.map → Spans-MWYFG7RI.cjs.map} +1 -1
- package/dist/{Spans-FMAVPATS.js → Spans-PGXRMD6J.js} +4 -4
- package/dist/{Spans-FMAVPATS.js.map → Spans-PGXRMD6J.js.map} +1 -1
- package/dist/{chunk-UI7CEUTP.js → chunk-AJWUCFGM.js} +3 -3
- package/dist/{chunk-UI7CEUTP.js.map → chunk-AJWUCFGM.js.map} +1 -1
- package/dist/{chunk-GX2WQV4A.js → chunk-IY5YTIK3.js} +15 -10
- package/dist/chunk-IY5YTIK3.js.map +1 -0
- package/dist/{chunk-4PYVHLIK.js → chunk-L3MEZZAV.js} +17 -14
- package/dist/chunk-L3MEZZAV.js.map +1 -0
- package/dist/{chunk-NGK4E536.cjs → chunk-L3XC464G.cjs} +56 -51
- package/dist/chunk-L3XC464G.cjs.map +1 -0
- package/dist/{chunk-OGLRSR6C.cjs → chunk-M2LFQY2E.cjs} +63 -63
- package/dist/{chunk-OGLRSR6C.cjs.map → chunk-M2LFQY2E.cjs.map} +1 -1
- package/dist/{chunk-ECLBZV4N.cjs → chunk-V3VBHSK6.cjs} +17 -14
- package/dist/chunk-V3VBHSK6.cjs.map +1 -0
- package/dist/index.cjs +33 -33
- package/dist/index.js +3 -3
- package/dist/loader.css +1 -1
- package/dist/present.cjs +3 -3
- package/dist/present.js +3 -3
- package/dist/three.cjs +5 -5
- package/dist/three.js +1 -1
- package/llms-full.txt +2 -2
- package/package.json +1 -1
- package/skills/pixi-effects/SKILL.md +1 -1
- package/skills/pixi-effects/reference/pitfalls.md +1 -1
- package/skills/pixi-effects/template.html +6 -6
- package/dist/Composition-PMWLJQPI.cjs +0 -16
- package/dist/Composition-ZCRJHBB5.js +0 -7
- package/dist/chunk-4PYVHLIK.js.map +0 -1
- package/dist/chunk-ECLBZV4N.cjs.map +0 -1
- package/dist/chunk-GX2WQV4A.js.map +0 -1
- package/dist/chunk-NGK4E536.cjs.map +0 -1
|
@@ -2246,11 +2246,11 @@ function registerFilterLibrary(mod) {
|
|
|
2246
2246
|
if (key.endsWith("Filter") && typeof value === "function") library.set(lower(key.slice(0, -"Filter".length)), value);
|
|
2247
2247
|
}
|
|
2248
2248
|
}
|
|
2249
|
-
var MISSING = (
|
|
2250
|
-
`pixi-effects: the filter
|
|
2249
|
+
var MISSING = (what, why, many = false) => new Error(
|
|
2250
|
+
`pixi-effects: the ${many ? "filters" : "filter"} ${what} ${many ? "come" : "comes"} from the pixi-filters package${why ? ` (${why})` : ""}. Add it to your import map ("pixi-filters": "https://esm.sh/pixi-filters@6.1.5?external=pixi.js") or run \`npm i pixi-filters\`.`
|
|
2251
2251
|
);
|
|
2252
|
-
function
|
|
2253
|
-
|
|
2252
|
+
function libraryFilters(spec) {
|
|
2253
|
+
const found = /* @__PURE__ */ new Map();
|
|
2254
2254
|
const visit = (node) => {
|
|
2255
2255
|
if (!node || typeof node !== "object") return;
|
|
2256
2256
|
if (Array.isArray(node)) {
|
|
@@ -2261,21 +2261,24 @@ function needsFilterLibrary(spec) {
|
|
|
2261
2261
|
if (Array.isArray(o.filters)) {
|
|
2262
2262
|
for (const f of o.filters) {
|
|
2263
2263
|
if (typeof f?.type !== "string" || !isNamedFilterType(f.type)) continue;
|
|
2264
|
-
if (isLibraryType(f.type))
|
|
2265
|
-
|
|
2264
|
+
if (isLibraryType(f.type)) {
|
|
2265
|
+
if (!found.get(f.type)) found.set(f.type, typeof o.name === "string" && o.name ? o.name : void 0);
|
|
2266
|
+
} else if (!isCoreType(f.type)) throw unknownType(f.type);
|
|
2266
2267
|
}
|
|
2267
2268
|
}
|
|
2268
2269
|
for (const key of ["sequences", "mask", "layer"]) visit(o[key]);
|
|
2269
2270
|
};
|
|
2270
2271
|
visit(spec);
|
|
2271
|
-
return
|
|
2272
|
+
return found;
|
|
2272
2273
|
}
|
|
2273
2274
|
async function ensureFilterLibrary(spec, load = () => import('pixi-filters')) {
|
|
2274
|
-
|
|
2275
|
+
const used = libraryFilters(spec);
|
|
2276
|
+
if (!used.size || library) return;
|
|
2275
2277
|
try {
|
|
2276
2278
|
registerFilterLibrary(await load());
|
|
2277
2279
|
} catch (e) {
|
|
2278
|
-
|
|
2280
|
+
const what = [...used].map(([type, layer]) => `"${type}"${layer ? ` (layer "${layer}")` : ""}`).join(", ");
|
|
2281
|
+
throw MISSING(what, e.message, used.size > 1);
|
|
2279
2282
|
}
|
|
2280
2283
|
}
|
|
2281
2284
|
var SINGLE_VALUE = { pixelate: "size", emboss: "strength" };
|
|
@@ -2325,7 +2328,7 @@ function createNamedFilter(type, params) {
|
|
|
2325
2328
|
if (core) return new PIXI[core[1]](params);
|
|
2326
2329
|
if (!isLibraryType(type)) throw unknownType(type);
|
|
2327
2330
|
const Ctor = library?.get(lower(type));
|
|
2328
|
-
if (!Ctor) throw MISSING(type
|
|
2331
|
+
if (!Ctor) throw MISSING(`"${type}"`, library ? "not found in the loaded package" : "not loaded yet");
|
|
2329
2332
|
const single = SINGLE_VALUE[Object.keys(SINGLE_VALUE).find((k) => lower(k) === lower(type)) ?? ""];
|
|
2330
2333
|
if (single) return new Ctor(params[single]);
|
|
2331
2334
|
const made = new Ctor(lower(type) === "colorgradient" ? colorGradientParams(params) : params);
|
|
@@ -6069,13 +6072,13 @@ var CanvasSequence = class extends Sequence {
|
|
|
6069
6072
|
var _CompositionSequence = null;
|
|
6070
6073
|
async function getCompositionSequence() {
|
|
6071
6074
|
if (!_CompositionSequence) {
|
|
6072
|
-
_CompositionSequence = (await import('./Composition-
|
|
6075
|
+
_CompositionSequence = (await import('./Composition-BOLWGT2R.js')).CompositionSequence;
|
|
6073
6076
|
}
|
|
6074
6077
|
return _CompositionSequence;
|
|
6075
6078
|
}
|
|
6076
6079
|
var _SpansSequence = null;
|
|
6077
6080
|
async function getSpansSequence() {
|
|
6078
|
-
if (!_SpansSequence) _SpansSequence = (await import('./Spans-
|
|
6081
|
+
if (!_SpansSequence) _SpansSequence = (await import('./Spans-PGXRMD6J.js')).SpansSequence;
|
|
6079
6082
|
return _SpansSequence;
|
|
6080
6083
|
}
|
|
6081
6084
|
var staticTypes = {
|
|
@@ -6121,5 +6124,5 @@ async function buildSequenceTree(specs, parent, root, out = []) {
|
|
|
6121
6124
|
}
|
|
6122
6125
|
|
|
6123
6126
|
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, noise2, packLights, parseEase, parseSpring, projectLayer, projectPoint, rand, random, registerSequenceType, remapOf, resolveAt, resolveNumber, spansMeta, springDuration, timeRemapOf, trimPolylines };
|
|
6124
|
-
//# sourceMappingURL=chunk-
|
|
6125
|
-
//# sourceMappingURL=chunk-
|
|
6127
|
+
//# sourceMappingURL=chunk-L3MEZZAV.js.map
|
|
6128
|
+
//# sourceMappingURL=chunk-L3MEZZAV.js.map
|