pixi-effects 0.7.0 → 0.8.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 +14 -0
- package/README.md +7 -6
- package/ai/reference/cheatsheet.md +5 -1
- package/ai/template.html +3 -3
- package/dist/Composition-CM62XJKT.cjs +14 -0
- package/dist/{Composition-3KHQPRBA.cjs.map → Composition-CM62XJKT.cjs.map} +1 -1
- package/dist/Composition-RJDSQYTV.js +5 -0
- package/dist/{Composition-DT657FO5.js.map → Composition-RJDSQYTV.js.map} +1 -1
- package/dist/Controller.cjs +55 -20
- package/dist/Controller.cjs.map +1 -1
- package/dist/Controller.d.cts +31 -2
- package/dist/Controller.d.ts +31 -2
- package/dist/Controller.js +55 -21
- package/dist/Controller.js.map +1 -1
- package/dist/{Movie-BK9daiTt.d.cts → Movie-CQOhUmko.d.cts} +24 -1
- package/dist/{Movie-B0OUKlZI.d.ts → Movie-HF3pSGjQ.d.ts} +24 -1
- package/dist/{chunk-6I55T4OH.cjs → chunk-AGMNSJJH.cjs} +13 -4
- package/dist/chunk-AGMNSJJH.cjs.map +1 -0
- package/dist/{chunk-4O2NYDJG.js → chunk-FNKSXBKB.js} +13 -4
- package/dist/chunk-FNKSXBKB.js.map +1 -0
- package/dist/{chunk-36Z4RIRK.js → chunk-O4AJYUPK.js} +3 -3
- package/dist/{chunk-36Z4RIRK.js.map → chunk-O4AJYUPK.js.map} +1 -1
- package/dist/{chunk-4VSIJLU3.cjs → chunk-PDBDDGG5.cjs} +21 -21
- package/dist/{chunk-4VSIJLU3.cjs.map → chunk-PDBDDGG5.cjs.map} +1 -1
- package/dist/index.cjs +82 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +71 -12
- package/dist/index.js.map +1 -1
- package/dist/three.cjs +5 -5
- package/dist/three.js +1 -1
- package/docs/api.md +51 -0
- package/docs/dsl.md +14 -2
- package/llms-full.txt +70 -3
- package/package.json +1 -1
- package/dist/Composition-3KHQPRBA.cjs +0 -14
- package/dist/Composition-DT657FO5.js +0 -5
- package/dist/chunk-4O2NYDJG.js.map +0 -1
- package/dist/chunk-6I55T4OH.cjs.map +0 -1
|
@@ -804,6 +804,14 @@ function colorMatrix(params) {
|
|
|
804
804
|
if (Array.isArray(params.matrix)) f.matrix = params.matrix;
|
|
805
805
|
return f;
|
|
806
806
|
}
|
|
807
|
+
var GRADIENT_TYPES = ["linear", "radial", "conic"];
|
|
808
|
+
function colorGradientParams(params) {
|
|
809
|
+
const { gradientType, ...rest } = params;
|
|
810
|
+
if (gradientType === void 0) return rest;
|
|
811
|
+
const i = GRADIENT_TYPES.indexOf(String(gradientType));
|
|
812
|
+
if (i < 0) throw new Error(`pixi-effects: colorGradient gradientType "${gradientType}" is not one of linear, radial or conic`);
|
|
813
|
+
return { ...rest, type: i };
|
|
814
|
+
}
|
|
807
815
|
function createNamedFilter(type, params) {
|
|
808
816
|
if (lower(type) === "colormatrix") return colorMatrix(params);
|
|
809
817
|
const core = Object.entries(CORE).find(([k]) => lower(k) === lower(type));
|
|
@@ -812,7 +820,8 @@ function createNamedFilter(type, params) {
|
|
|
812
820
|
const Ctor = library?.get(lower(type));
|
|
813
821
|
if (!Ctor) throw MISSING(type, library ? "not found in the loaded package" : "not loaded yet");
|
|
814
822
|
const single = SINGLE_VALUE[Object.keys(SINGLE_VALUE).find((k) => lower(k) === lower(type)) ?? ""];
|
|
815
|
-
|
|
823
|
+
if (single) return new Ctor(params[single]);
|
|
824
|
+
return new Ctor(lower(type) === "colorgradient" ? colorGradientParams(params) : params);
|
|
816
825
|
}
|
|
817
826
|
|
|
818
827
|
// src/filters/index.ts
|
|
@@ -2504,7 +2513,7 @@ function numOrZero(v, scope) {
|
|
|
2504
2513
|
var _CompositionSequence = null;
|
|
2505
2514
|
async function getCompositionSequence() {
|
|
2506
2515
|
if (!_CompositionSequence) {
|
|
2507
|
-
_CompositionSequence = (await import('./Composition-
|
|
2516
|
+
_CompositionSequence = (await import('./Composition-RJDSQYTV.js')).CompositionSequence;
|
|
2508
2517
|
}
|
|
2509
2518
|
return _CompositionSequence;
|
|
2510
2519
|
}
|
|
@@ -2542,5 +2551,5 @@ async function buildSequenceTree(specs, parent, root) {
|
|
|
2542
2551
|
}
|
|
2543
2552
|
|
|
2544
2553
|
export { CameraSequence, DEFAULT_FOV, DEG, NEAR, Sequence, buildScope, buildSequenceTree, cameraBasis, collectPropKeys, describeLayer, ensureFilterLibrary, evaluateExpr, homeCamera, homeDistance, lintText, lintTiming, projectLayer, registerSequenceType, resolveAt, summarizeWarnings };
|
|
2545
|
-
//# sourceMappingURL=chunk-
|
|
2546
|
-
//# sourceMappingURL=chunk-
|
|
2554
|
+
//# sourceMappingURL=chunk-FNKSXBKB.js.map
|
|
2555
|
+
//# sourceMappingURL=chunk-FNKSXBKB.js.map
|