pixi-effects 0.47.3 → 0.47.5
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/dist/Composition-PMWLJQPI.cjs +16 -0
- package/dist/{Composition-IC274CKO.cjs.map → Composition-PMWLJQPI.cjs.map} +1 -1
- package/dist/Composition-ZCRJHBB5.js +7 -0
- package/dist/{Composition-6TXRN65C.js.map → Composition-ZCRJHBB5.js.map} +1 -1
- package/dist/Controller.cjs +3 -3
- package/dist/Controller.d.cts +1 -1
- package/dist/Controller.d.ts +1 -1
- package/dist/Controller.js +1 -1
- package/dist/{Movie-sV8nJr_f.d.ts → Movie--qSYKgAQ.d.ts} +2 -2
- package/dist/{Movie-BqrAWN0g.d.cts → Movie-svZQF-9Z.d.cts} +2 -2
- package/dist/{Spans-3T6ZEEN4.js → Spans-FMAVPATS.js} +7 -7
- package/dist/{Spans-3T6ZEEN4.js.map → Spans-FMAVPATS.js.map} +1 -1
- package/dist/{Spans-M5KMHT6K.cjs → Spans-KTUPDFSR.cjs} +12 -12
- package/dist/{Spans-M5KMHT6K.cjs.map → Spans-KTUPDFSR.cjs.map} +1 -1
- package/dist/{blendModes-S72MBYKY.js → blendModes-535EMYGK.js} +5 -5
- package/dist/{blendModes-S72MBYKY.js.map → blendModes-535EMYGK.js.map} +1 -1
- package/dist/{blendModes-Y56QAMC4.cjs → blendModes-V5XHC7U4.cjs} +6 -6
- package/dist/{blendModes-Y56QAMC4.cjs.map → blendModes-V5XHC7U4.cjs.map} +1 -1
- package/dist/{chunk-VTGJRKW4.cjs → chunk-2AT5WSSV.cjs} +105 -92
- package/dist/chunk-2AT5WSSV.cjs.map +1 -0
- package/dist/{chunk-HGKXEPDJ.js → chunk-4PYVHLIK.js} +31 -9
- package/dist/chunk-4PYVHLIK.js.map +1 -0
- package/dist/{chunk-JVO2W77G.js → chunk-BFRWSV3R.js} +3 -3
- package/dist/{chunk-JVO2W77G.js.map → chunk-BFRWSV3R.js.map} +1 -1
- package/dist/{chunk-TWZNOUM7.cjs → chunk-DOLTCXCL.cjs} +7 -2
- package/dist/chunk-DOLTCXCL.cjs.map +1 -0
- package/dist/{chunk-33OVRSXF.cjs → chunk-ECLBZV4N.cjs} +66 -44
- package/dist/chunk-ECLBZV4N.cjs.map +1 -0
- package/dist/{chunk-PC7DFDCV.js → chunk-JBDBICS2.js} +5 -5
- package/dist/{chunk-PC7DFDCV.js.map → chunk-JBDBICS2.js.map} +1 -1
- package/dist/{chunk-6LA7W362.js → chunk-LHUIEFMH.js} +23 -10
- package/dist/chunk-LHUIEFMH.js.map +1 -0
- package/dist/{chunk-YSTOH5PC.cjs → chunk-NGJXVJB7.cjs} +6 -6
- package/dist/{chunk-YSTOH5PC.cjs.map → chunk-NGJXVJB7.cjs.map} +1 -1
- package/dist/{chunk-GDY56V74.cjs → chunk-OGLRSR6C.cjs} +96 -96
- package/dist/{chunk-GDY56V74.cjs.map → chunk-OGLRSR6C.cjs.map} +1 -1
- package/dist/{chunk-HX73PCVU.js → chunk-UI7CEUTP.js} +6 -6
- package/dist/{chunk-HX73PCVU.js.map → chunk-UI7CEUTP.js.map} +1 -1
- package/dist/{chunk-BXOCEZ4U.js → chunk-WGRWFQOB.js} +7 -2
- package/dist/chunk-WGRWFQOB.js.map +1 -0
- package/dist/{chunk-RU4N3B5B.cjs → chunk-WYR2AU4W.cjs} +7 -7
- package/dist/{chunk-RU4N3B5B.cjs.map → chunk-WYR2AU4W.cjs.map} +1 -1
- package/dist/index.cjs +37 -37
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -6
- package/dist/loader.css +1 -1
- package/dist/{music-JKOM5YK6.js → music-P4JRT73P.js} +3 -3
- package/dist/{music-JKOM5YK6.js.map → music-P4JRT73P.js.map} +1 -1
- package/dist/{music-6WFTPVHU.cjs → music-XQEPBIDT.cjs} +7 -7
- package/dist/{music-6WFTPVHU.cjs.map → music-XQEPBIDT.cjs.map} +1 -1
- package/dist/present.cjs +13 -13
- package/dist/present.d.cts +1 -1
- package/dist/present.d.ts +1 -1
- package/dist/present.js +6 -6
- package/dist/{sfx-2O6UQEUP.cjs → sfx-G2XAMD7K.cjs} +8 -8
- package/dist/{sfx-2O6UQEUP.cjs.map → sfx-G2XAMD7K.cjs.map} +1 -1
- package/dist/{sfx-VUKARHDX.js → sfx-Z7OQIKHG.js} +3 -3
- package/dist/{sfx-VUKARHDX.js.map → sfx-Z7OQIKHG.js.map} +1 -1
- package/dist/three.cjs +7 -7
- package/dist/three.js +3 -3
- package/docs/api.md +4 -4
- package/docs/dsl.md +11 -10
- package/llms-full.txt +19 -18
- package/package.json +1 -1
- package/skills/pixi-effects/SKILL.md +1 -1
- package/skills/pixi-effects/reference/cheatsheet.md +2 -2
- package/skills/pixi-effects/reference/pitfalls.md +1 -1
- package/skills/pixi-effects/template.html +6 -6
- package/dist/Composition-6TXRN65C.js +0 -7
- package/dist/Composition-IC274CKO.cjs +0 -16
- package/dist/chunk-33OVRSXF.cjs.map +0 -1
- package/dist/chunk-6LA7W362.js.map +0 -1
- package/dist/chunk-BXOCEZ4U.js.map +0 -1
- package/dist/chunk-HGKXEPDJ.js.map +0 -1
- package/dist/chunk-TWZNOUM7.cjs.map +0 -1
- package/dist/chunk-VTGJRKW4.cjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { describeLayer, collectPropKeys } from './chunk-
|
|
2
|
-
import { suggestName, warnUnknownOptions } from './chunk-
|
|
1
|
+
import { describeLayer, collectPropKeys } from './chunk-BFRWSV3R.js';
|
|
2
|
+
import { suggestName, warnUnknownOptions } from './chunk-WGRWFQOB.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';
|
|
5
5
|
|
|
@@ -3985,7 +3985,7 @@ var AudioSequence = class extends Sequence {
|
|
|
3985
3985
|
const raw = spec;
|
|
3986
3986
|
if (raw.asset !== void 0) console.warn(`pixi-effects: ${who}: has both asset and sfx \u2014 the sfx plays; remove one`);
|
|
3987
3987
|
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)`);
|
|
3988
|
-
const { resolveSfx, renderSfx, sfxKey } = await import('./sfx-
|
|
3988
|
+
const { resolveSfx, renderSfx, sfxKey } = await import('./sfx-Z7OQIKHG.js');
|
|
3989
3989
|
const sfx = resolveSfx(spec.sfx, spec.duration, who);
|
|
3990
3990
|
if (!sfx) return;
|
|
3991
3991
|
this.duration = sfx.length;
|
|
@@ -4004,7 +4004,7 @@ var AudioSequence = class extends Sequence {
|
|
|
4004
4004
|
const raw = spec;
|
|
4005
4005
|
if (raw.asset !== void 0) console.warn(`pixi-effects: ${who}: has both asset and music \u2014 the music plays; remove one`);
|
|
4006
4006
|
if (raw.sfx !== void 0) console.warn(`pixi-effects: ${who}: has both sfx and music \u2014 the music plays; remove one`);
|
|
4007
|
-
const { resolveMusic, renderMusic, renderMusicAsync, musicLength, musicKey, summarizeMusic } = await import('./music-
|
|
4007
|
+
const { resolveMusic, renderMusic, renderMusicAsync, musicLength, musicKey, summarizeMusic } = await import('./music-P4JRT73P.js');
|
|
4008
4008
|
const music = resolveMusic(spec.music, who);
|
|
4009
4009
|
if (!music) return;
|
|
4010
4010
|
const natural = musicLength(music);
|
|
@@ -4738,7 +4738,22 @@ function splitEvenOdd(d) {
|
|
|
4738
4738
|
}, 0);
|
|
4739
4739
|
const areas = parts.map(area);
|
|
4740
4740
|
const big = areas.indexOf(Math.max(...areas));
|
|
4741
|
-
|
|
4741
|
+
const holes = parts.filter((_, i) => i !== big);
|
|
4742
|
+
const pointOf = (sub2) => {
|
|
4743
|
+
const p0 = flattenSvgPath(sub2)[0]?.pts ?? [0, 0];
|
|
4744
|
+
return [p0[0], p0[1]];
|
|
4745
|
+
};
|
|
4746
|
+
const inPoly = (sub2, [x, y]) => {
|
|
4747
|
+
const line = flattenSvgPath(sub2)[0]?.pts ?? [];
|
|
4748
|
+
let inside = false;
|
|
4749
|
+
for (let i = 0, j = line.length - 2; i < line.length; j = i, i += 2) {
|
|
4750
|
+
const xi = line[i], yi = line[i + 1], xj = line[j], yj = line[j + 1];
|
|
4751
|
+
if (yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi) inside = !inside;
|
|
4752
|
+
}
|
|
4753
|
+
return inside;
|
|
4754
|
+
};
|
|
4755
|
+
const real = holes.filter((h, i) => !holes.some((o, k) => k !== i && area(o) > area(h) && inPoly(o, pointOf(h))));
|
|
4756
|
+
return { main: parts[big], holes: real };
|
|
4742
4757
|
}
|
|
4743
4758
|
|
|
4744
4759
|
// src/sequences/morphPath.ts
|
|
@@ -4795,7 +4810,14 @@ function align(a, b) {
|
|
|
4795
4810
|
}
|
|
4796
4811
|
return best;
|
|
4797
4812
|
}
|
|
4813
|
+
function withoutClosingPoint(p) {
|
|
4814
|
+
const n = p.pts.length;
|
|
4815
|
+
if (p.closed && n >= 4 && p.pts[0] === p.pts[n - 2] && p.pts[1] === p.pts[n - 1]) return { ...p, pts: p.pts.slice(0, n - 2) };
|
|
4816
|
+
return p;
|
|
4817
|
+
}
|
|
4798
4818
|
function buildMorph(from, to, n = 128) {
|
|
4819
|
+
from = from.map(withoutClosingPoint);
|
|
4820
|
+
to = to.map(withoutClosingPoint);
|
|
4799
4821
|
if (from.length === 0 || to.length === 0) return [];
|
|
4800
4822
|
const pairs = [];
|
|
4801
4823
|
const count = Math.max(from.length, to.length);
|
|
@@ -6047,13 +6069,13 @@ var CanvasSequence = class extends Sequence {
|
|
|
6047
6069
|
var _CompositionSequence = null;
|
|
6048
6070
|
async function getCompositionSequence() {
|
|
6049
6071
|
if (!_CompositionSequence) {
|
|
6050
|
-
_CompositionSequence = (await import('./Composition-
|
|
6072
|
+
_CompositionSequence = (await import('./Composition-ZCRJHBB5.js')).CompositionSequence;
|
|
6051
6073
|
}
|
|
6052
6074
|
return _CompositionSequence;
|
|
6053
6075
|
}
|
|
6054
6076
|
var _SpansSequence = null;
|
|
6055
6077
|
async function getSpansSequence() {
|
|
6056
|
-
if (!_SpansSequence) _SpansSequence = (await import('./Spans-
|
|
6078
|
+
if (!_SpansSequence) _SpansSequence = (await import('./Spans-FMAVPATS.js')).SpansSequence;
|
|
6057
6079
|
return _SpansSequence;
|
|
6058
6080
|
}
|
|
6059
6081
|
var staticTypes = {
|
|
@@ -6099,5 +6121,5 @@ async function buildSequenceTree(specs, parent, root, out = []) {
|
|
|
6099
6121
|
}
|
|
6100
6122
|
|
|
6101
6123
|
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 };
|
|
6102
|
-
//# sourceMappingURL=chunk-
|
|
6103
|
-
//# sourceMappingURL=chunk-
|
|
6124
|
+
//# sourceMappingURL=chunk-4PYVHLIK.js.map
|
|
6125
|
+
//# sourceMappingURL=chunk-4PYVHLIK.js.map
|