pixi-effects 0.46.0 → 0.47.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 +21 -0
- package/README.md +5 -5
- package/ai/chat-template.html +3 -3
- package/ai/tools/check.mjs +2 -2
- package/ai/tools/lookup.mjs +6 -1
- package/ai/tools/pixi-effects.mjs +1 -0
- package/ai/tools/render.mjs +25 -2
- package/dist/Composition-AZEATHJB.cjs +16 -0
- package/dist/{Composition-PME3P5LP.cjs.map → Composition-AZEATHJB.cjs.map} +1 -1
- package/dist/Composition-ME3L3EFT.js +7 -0
- package/dist/{Composition-NSY7A32Y.js.map → Composition-ME3L3EFT.js.map} +1 -1
- package/dist/{Spans-2TZCNREQ.cjs → Spans-LTKEUHDN.cjs} +11 -11
- package/dist/{Spans-2TZCNREQ.cjs.map → Spans-LTKEUHDN.cjs.map} +1 -1
- package/dist/{Spans-TESJPQKX.js → Spans-YV7K4X5I.js} +6 -6
- package/dist/{Spans-TESJPQKX.js.map → Spans-YV7K4X5I.js.map} +1 -1
- package/dist/{blendModes-FMYO6SQN.js → blendModes-56NHK2MP.js} +4 -4
- package/dist/{blendModes-FMYO6SQN.js.map → blendModes-56NHK2MP.js.map} +1 -1
- package/dist/{blendModes-FD3THLNC.cjs → blendModes-ONOPMMAB.cjs} +5 -5
- package/dist/{blendModes-FD3THLNC.cjs.map → blendModes-ONOPMMAB.cjs.map} +1 -1
- package/dist/{chunk-LALEBV63.cjs → chunk-4NOTVQ3I.cjs} +29 -29
- package/dist/{chunk-LALEBV63.cjs.map → chunk-4NOTVQ3I.cjs.map} +1 -1
- package/dist/{chunk-JN7JHNZR.cjs → chunk-53DXJEO7.cjs} +5 -5
- package/dist/{chunk-JN7JHNZR.cjs.map → chunk-53DXJEO7.cjs.map} +1 -1
- package/dist/{chunk-DM2OLQOJ.js → chunk-6MHJKCXO.js} +5 -5
- package/dist/{chunk-DM2OLQOJ.js.map → chunk-6MHJKCXO.js.map} +1 -1
- package/dist/{chunk-K24FF4BT.js → chunk-7IDEWQPH.js} +19 -5
- package/dist/chunk-7IDEWQPH.js.map +1 -0
- package/dist/{chunk-DKCMJILW.cjs → chunk-BFERTUXK.cjs} +92 -92
- package/dist/{chunk-DKCMJILW.cjs.map → chunk-BFERTUXK.cjs.map} +1 -1
- package/dist/{chunk-3SAS3ZE5.cjs → chunk-NEMWRJQS.cjs} +11 -2
- package/dist/chunk-NEMWRJQS.cjs.map +1 -0
- package/dist/{chunk-32MMNDDN.js → chunk-NVKHUAHU.js} +11 -2
- package/dist/chunk-NVKHUAHU.js.map +1 -0
- package/dist/{chunk-2E74SP63.js → chunk-OVTTCX2E.js} +105 -25
- package/dist/chunk-OVTTCX2E.js.map +1 -0
- package/dist/{chunk-FPV3NPYC.js → chunk-QMVK55LC.js} +5 -5
- package/dist/{chunk-FPV3NPYC.js.map → chunk-QMVK55LC.js.map} +1 -1
- package/dist/{chunk-O66JGPVV.cjs → chunk-SMHTOWXG.cjs} +19 -5
- package/dist/chunk-SMHTOWXG.cjs.map +1 -0
- package/dist/{chunk-VNP7QCJE.js → chunk-UTDELFOU.js} +4 -4
- package/dist/{chunk-VNP7QCJE.js.map → chunk-UTDELFOU.js.map} +1 -1
- package/dist/{chunk-7M63Y6MO.cjs → chunk-YXIEPTFG.cjs} +150 -70
- package/dist/chunk-YXIEPTFG.cjs.map +1 -0
- package/dist/index.cjs +37 -37
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +6 -6
- package/dist/loader.css +1 -1
- package/dist/present.cjs +6 -6
- package/dist/present.js +6 -6
- package/dist/sound.cjs +2 -2
- package/dist/sound.js +1 -1
- package/dist/three.cjs +6 -6
- package/dist/three.js +2 -2
- package/docs/api.md +1 -1
- package/docs/dsl.md +2 -2
- package/llms-full.txt +8 -7
- package/package.json +1 -1
- package/skills/pixi-effects/SKILL.md +2 -1
- package/skills/pixi-effects/reference/cheatsheet.md +2 -2
- package/skills/pixi-effects/reference/recipes.md +1 -1
- package/skills/pixi-effects/template.html +6 -6
- package/dist/Composition-NSY7A32Y.js +0 -7
- package/dist/Composition-PME3P5LP.cjs +0 -16
- package/dist/chunk-2E74SP63.js.map +0 -1
- package/dist/chunk-32MMNDDN.js.map +0 -1
- package/dist/chunk-3SAS3ZE5.cjs.map +0 -1
- package/dist/chunk-7M63Y6MO.cjs.map +0 -1
- package/dist/chunk-K24FF4BT.js.map +0 -1
- package/dist/chunk-O66JGPVV.cjs.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
3
|
+
var chunkBFERTUXK_cjs = require('./chunk-BFERTUXK.cjs');
|
|
4
|
+
var chunk4NOTVQ3I_cjs = require('./chunk-4NOTVQ3I.cjs');
|
|
5
|
+
var chunkSMHTOWXG_cjs = require('./chunk-SMHTOWXG.cjs');
|
|
6
|
+
var chunk53DXJEO7_cjs = require('./chunk-53DXJEO7.cjs');
|
|
7
|
+
var chunkNEMWRJQS_cjs = require('./chunk-NEMWRJQS.cjs');
|
|
8
8
|
var chunkTWZNOUM7_cjs = require('./chunk-TWZNOUM7.cjs');
|
|
9
9
|
var pixi_js = require('pixi.js');
|
|
10
10
|
var mediabunny = require('mediabunny');
|
|
@@ -109,7 +109,7 @@ async function mixdown(audios, totalDuration, sampleRate = 44100, pace) {
|
|
|
109
109
|
if (pace) await pace(made / all);
|
|
110
110
|
if (!buffer) continue;
|
|
111
111
|
if (a.warp || a.sourceMap) {
|
|
112
|
-
const r =
|
|
112
|
+
const r = chunkSMHTOWXG_cjs.resampleThrough(a, buffer.getChannelData(0), buffer.numberOfChannels > 1 ? buffer.getChannelData(1) : buffer.getChannelData(0), buffer.sampleRate, sampleRate, totalDuration);
|
|
113
113
|
if (!r) continue;
|
|
114
114
|
const out = ctx.createBuffer(2, r.L.length, sampleRate);
|
|
115
115
|
out.getChannelData(0).set(r.L);
|
|
@@ -143,18 +143,86 @@ async function mixdown(audios, totalDuration, sampleRate = 44100, pace) {
|
|
|
143
143
|
}
|
|
144
144
|
var KNEE = 0.9;
|
|
145
145
|
var LOUDNESS_CEILING_DB = -1;
|
|
146
|
+
var MAX_LIMIT_DB = 10;
|
|
147
|
+
function limitInto(source, out, gain, ceil, sampleRate) {
|
|
148
|
+
const n = source[0]?.length ?? 0;
|
|
149
|
+
const req = new Float32Array(n);
|
|
150
|
+
for (let i = 0; i < n; i++) {
|
|
151
|
+
let p = 0;
|
|
152
|
+
for (const c of source) {
|
|
153
|
+
const a = Math.abs(c[i]) * gain;
|
|
154
|
+
if (a > p) p = a;
|
|
155
|
+
}
|
|
156
|
+
req[i] = p > ceil ? ceil / p : 1;
|
|
157
|
+
}
|
|
158
|
+
const L = Math.max(1, Math.round(3e-3 * sampleRate));
|
|
159
|
+
const mn = new Float32Array(n), dq = new Int32Array(n);
|
|
160
|
+
let head = 0, tail = 0;
|
|
161
|
+
for (let i = n - 1; i >= 0; i--) {
|
|
162
|
+
while (tail > head && req[dq[tail - 1]] >= req[i]) tail--;
|
|
163
|
+
dq[tail++] = i;
|
|
164
|
+
while (dq[head] > i + L) head++;
|
|
165
|
+
mn[i] = req[dq[head]];
|
|
166
|
+
}
|
|
167
|
+
const release = 1 - Math.exp(-1 / (0.08 * sampleRate));
|
|
168
|
+
let run = 0, prev = 1, lowest = 1, lowestAt = 0;
|
|
169
|
+
const gains = new Float32Array(n);
|
|
170
|
+
for (let i = 0; i < n; i++) {
|
|
171
|
+
run += mn[i];
|
|
172
|
+
if (i > L) run -= mn[i - L - 1];
|
|
173
|
+
const avg = run / Math.min(i + 1, L + 1);
|
|
174
|
+
const g = Math.min(avg, prev + (1 - prev) * release);
|
|
175
|
+
gains[i] = g;
|
|
176
|
+
prev = g;
|
|
177
|
+
if (g < lowest) {
|
|
178
|
+
lowest = g;
|
|
179
|
+
lowestAt = i;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
for (let ch = 0; ch < source.length; ch++) {
|
|
183
|
+
const s = source[ch], o = out[ch];
|
|
184
|
+
for (let i = 0; i < n; i++) {
|
|
185
|
+
const v = s[i] * gain * gains[i];
|
|
186
|
+
o[i] = v > ceil ? ceil : v < -ceil ? -ceil : v;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
return { reductionDb: lowest < 1 ? -20 * Math.log10(lowest) : 0, at: lowestAt / sampleRate };
|
|
190
|
+
}
|
|
146
191
|
function normalizeMix(buffer, target) {
|
|
147
192
|
const chans = [];
|
|
148
193
|
for (let ch = 0; ch < buffer.numberOfChannels; ch++) chans.push(buffer.getChannelData(ch));
|
|
149
|
-
const
|
|
194
|
+
const sr = buffer.sampleRate;
|
|
195
|
+
const m = chunkSMHTOWXG_cjs.measureLoudness(chans, sr, { truePeak: false });
|
|
150
196
|
if (m.integratedLufs === null) return { target, gainDb: 0, reachedLufs: null, limited: false };
|
|
197
|
+
const original = chans.map((c) => Float32Array.from(c));
|
|
151
198
|
let gainDb = target - m.integratedLufs;
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
199
|
+
let ceilDb = LOUDNESS_CEILING_DB;
|
|
200
|
+
let applied = { reductionDb: 0, at: 0 }, measured = m;
|
|
201
|
+
for (let round2 = 0; round2 < 8; round2++) {
|
|
202
|
+
const cap = MAX_LIMIT_DB + ceilDb - m.samplePeakDb;
|
|
203
|
+
if (gainDb > cap) gainDb = cap;
|
|
204
|
+
applied = limitInto(original, chans, 10 ** (gainDb / 20), 10 ** (ceilDb / 20), sr);
|
|
205
|
+
measured = chunkSMHTOWXG_cjs.measureLoudness(chans, sr);
|
|
206
|
+
const overTp = measured.truePeakDb - LOUDNESS_CEILING_DB;
|
|
207
|
+
if (overTp > 0.02) {
|
|
208
|
+
ceilDb -= overTp + 0.02;
|
|
209
|
+
continue;
|
|
210
|
+
}
|
|
211
|
+
const deficit = target - measured.integratedLufs;
|
|
212
|
+
if (Math.abs(deficit) <= 0.15) break;
|
|
213
|
+
const next = Math.min(gainDb + deficit, cap);
|
|
214
|
+
if (Math.abs(next - gainDb) < 0.05) break;
|
|
215
|
+
gainDb = next;
|
|
216
|
+
}
|
|
217
|
+
const limited = measured.integratedLufs < target - 0.15;
|
|
218
|
+
const reduction = Math.round(applied.reductionDb * 10) / 10;
|
|
219
|
+
return {
|
|
220
|
+
target,
|
|
221
|
+
gainDb: Math.round(gainDb * 10) / 10,
|
|
222
|
+
reachedLufs: measured.integratedLufs,
|
|
223
|
+
limited,
|
|
224
|
+
...reduction >= 0.1 ? { limiterDb: reduction, limiterAt: Math.round(applied.at * 100) / 100 } : {}
|
|
225
|
+
};
|
|
158
226
|
}
|
|
159
227
|
function limitMix(buffer, audios) {
|
|
160
228
|
let peak = 0;
|
|
@@ -172,7 +240,7 @@ function limitMix(buffer, audios) {
|
|
|
172
240
|
}
|
|
173
241
|
const peakAt = peakIndex / buffer.sampleRate;
|
|
174
242
|
if (peak > 1) {
|
|
175
|
-
const playing = audios.map((a) => ({ a, ...
|
|
243
|
+
const playing = audios.map((a) => ({ a, ...chunkSMHTOWXG_cjs.playSpan(a, buffer.duration) })).filter((s) => s.start <= peakAt && peakAt < s.end).map((s) => s.a.layer ?? "an audio layer");
|
|
176
244
|
console.warn(
|
|
177
245
|
`pixi-effects: the audio mix peaks at ${peak.toFixed(2)} (${(20 * Math.log10(peak)).toFixed(1)} dBFS) at ${peakAt.toFixed(2)}s, so it was limited (it would distort). Playing there: ${[...new Set(playing)].join(", ")}. Lower their volume.`
|
|
178
246
|
);
|
|
@@ -1134,8 +1202,8 @@ function expandTransitions(spec) {
|
|
|
1134
1202
|
}
|
|
1135
1203
|
const transitions = out.transitions;
|
|
1136
1204
|
const sequences = out.sequences ?? [];
|
|
1137
|
-
const remap = out.duration !== void 0 ?
|
|
1138
|
-
const parentDuration = remap ?
|
|
1205
|
+
const remap = out.duration !== void 0 ? chunk4NOTVQ3I_cjs.timeRemapOf(out) : null;
|
|
1206
|
+
const parentDuration = remap ? chunk4NOTVQ3I_cjs.contentLength(remap, out.duration) : out.duration ?? Infinity;
|
|
1139
1207
|
const compW = out.width;
|
|
1140
1208
|
const compH = out.height;
|
|
1141
1209
|
const threeDByName = new Set(sequences.filter((s) => s.name && s.threeD).map((s) => s.name));
|
|
@@ -1203,16 +1271,16 @@ function expandTransitions(spec) {
|
|
|
1203
1271
|
if (toUses > 1) {
|
|
1204
1272
|
throw new Error(`pixi-effects: ${tag} sequence "${t.to}" is used as \`to\` in more than one transition`);
|
|
1205
1273
|
}
|
|
1206
|
-
const tStart =
|
|
1274
|
+
const tStart = chunk4NOTVQ3I_cjs.resolveAt(t.at, parentDuration);
|
|
1207
1275
|
const tEnd = tStart + t.duration;
|
|
1208
1276
|
const fromSeq = fromEntry.seq;
|
|
1209
|
-
const fromStart =
|
|
1277
|
+
const fromStart = chunk4NOTVQ3I_cjs.resolveAt(fromSeq.at, parentDuration);
|
|
1210
1278
|
const fromEnd = fromStart + (fromSeq.duration ?? parentDuration);
|
|
1211
1279
|
if (tStart < fromStart - EPS || tEnd > fromEnd + EPS) {
|
|
1212
1280
|
throw new Error(`pixi-effects: ${tag} window [${tStart}, ${tEnd}] is not covered by \`from\` "${t.from}" (lives [${fromStart}, ${fromEnd}], so it ends at ${fromEnd})`);
|
|
1213
1281
|
}
|
|
1214
1282
|
const toSeq = toEntry.seq;
|
|
1215
|
-
const toStart =
|
|
1283
|
+
const toStart = chunk4NOTVQ3I_cjs.resolveAt(toSeq.at, parentDuration);
|
|
1216
1284
|
const toEnd = toStart + (toSeq.duration ?? parentDuration);
|
|
1217
1285
|
if (tStart < toStart - EPS || tEnd > toEnd + EPS) {
|
|
1218
1286
|
throw new Error(`pixi-effects: ${tag} window [${tStart}, ${tEnd}] is not covered by \`to\` "${t.to}" (lives [${toStart}, ${toEnd}], so it starts at ${toStart})`);
|
|
@@ -1272,7 +1340,7 @@ function wrapAsFullComposition(seq, compW, compH) {
|
|
|
1272
1340
|
delete inner.at;
|
|
1273
1341
|
delete inner.duration;
|
|
1274
1342
|
const m = inner.mask;
|
|
1275
|
-
const carriesMatte = m !== void 0 &&
|
|
1343
|
+
const carriesMatte = m !== void 0 && chunkBFERTUXK_cjs.maskSourceOf(m).kind === "refs";
|
|
1276
1344
|
if (carriesMatte) delete inner.mask;
|
|
1277
1345
|
return {
|
|
1278
1346
|
...carriesMatte ? { mask: m } : {},
|
|
@@ -1537,12 +1605,12 @@ function canvasReport(root) {
|
|
|
1537
1605
|
const length = seq.duration ?? 0;
|
|
1538
1606
|
const moments = [0.15, 0.4, 0.65, 0.9].map((f) => Math.round(f * length * 1e3) / 1e3);
|
|
1539
1607
|
const { differs, drawMs, threw } = seq.checkDeterminism(moments);
|
|
1540
|
-
const name =
|
|
1608
|
+
const name = chunkNEMWRJQS_cjs.describeLayer(seq.spec);
|
|
1541
1609
|
const kind = seq.spec.type === "three" ? "three" : "canvas";
|
|
1542
1610
|
const problem = threw.length ? `${name} could not draw at ${threw.map((t) => `${t} s`).join(", ")} (its ${kind === "three" ? "update or render threw" : "draw threw"}, or the layer failed to build): ${kind === "three" ? "the warning above says why" : "it shows a magenta checkerboard there; the warning above says why"}, so the layer cannot be called deterministic` : differs.length ? `${name} does not draw the same picture for the same time (checked at ${differs.map(describeDiff).join(", ")}; drawn in two orders after one draw that was thrown away): ` + (kind === "three" ? "usually its update uses Math.random, Date.now, a clock, or state that builds up from call to call: a mixer advanced with mixer.update(dt) is one (pose a clip with mixer.setTime(t), or threeGltf(url).pose(t)), and so is a value moved by the time since the last call. A skinned model of your own (not loaded by threeGltf) that moves and casts a shadow does it too: three culls a skinned mesh by a bounding sphere that does not follow it, so set mesh.frustumCulled = false. Set every object from t, so playback, a seek and an export agree" : "usually its draw uses Math.random, Date.now or state that outlives the call (a value it keeps from the last call), so playback, a seek and an export would not agree: use info.random() (seeded) and derive everything from t. If it uses none of these, look at the canvases it draws from: make sprites and masks with info.canvas(w, h) (not document.createElement) and draw them into the picture before the strokes that depend on them") : "";
|
|
1543
1611
|
out.push({ name: seq.spec.name ?? name, moments, drawMs, ok: !differs.length && !threw.length, problem, kind });
|
|
1544
1612
|
}
|
|
1545
|
-
if (seq instanceof
|
|
1613
|
+
if (seq instanceof chunkBFERTUXK_cjs.CompositionSequence) walk3(seq);
|
|
1546
1614
|
};
|
|
1547
1615
|
const walk3 = (comp) => {
|
|
1548
1616
|
for (const { seq } of comp.layers()) {
|
|
@@ -1594,8 +1662,8 @@ function motionOf(keyframes, local, lives, keys = (k) => GEOMETRY.has(k)) {
|
|
|
1594
1662
|
let length = 0;
|
|
1595
1663
|
if (typeof kf.duration === "number") length = kf.duration;
|
|
1596
1664
|
else if (kf.duration === "auto") {
|
|
1597
|
-
const sp =
|
|
1598
|
-
length = sp ? Math.round(
|
|
1665
|
+
const sp = chunk4NOTVQ3I_cjs.parseSpring(kf.ease);
|
|
1666
|
+
length = sp ? Math.round(chunk4NOTVQ3I_cjs.springDuration(sp) * 1e3) / 1e3 : 0.5;
|
|
1599
1667
|
}
|
|
1600
1668
|
if (!(length > 0)) continue;
|
|
1601
1669
|
const kat = kf.at ?? 0;
|
|
@@ -1675,7 +1743,7 @@ function inspectScene(root, frame, time, canvas, opts = {}) {
|
|
|
1675
1743
|
if (motion.ever) hasMotion.add(info);
|
|
1676
1744
|
let shown = bounds ? clip(bounds, view) : null;
|
|
1677
1745
|
const maskTarget = seq.maskSequence?.target;
|
|
1678
|
-
const maskSrc =
|
|
1746
|
+
const maskSrc = chunkBFERTUXK_cjs.maskSourceOf(seq.spec.mask);
|
|
1679
1747
|
if (shown && maskTarget && !(maskSrc.kind === "inline" && maskSrc.invert)) {
|
|
1680
1748
|
const m = maskTarget.getBounds();
|
|
1681
1749
|
shown = clip(shown, { x: m.x, y: m.y, width: m.width, height: m.height });
|
|
@@ -1684,7 +1752,7 @@ function inspectScene(root, frame, time, canvas, opts = {}) {
|
|
|
1684
1752
|
const group = parentScene ?? (name !== void 0 && blending.has(name) ? name : void 0);
|
|
1685
1753
|
if (group) scene.set(info, group);
|
|
1686
1754
|
if (zero || seq.showsNothingYet) scaledToNothing.add(info);
|
|
1687
|
-
if (seq instanceof
|
|
1755
|
+
if (seq instanceof chunkBFERTUXK_cjs.CompositionSequence) walk3(seq, prefix + label + "/", insideThreeD || threeD, visible, group, motion, zero, parentAlpha * alpha);
|
|
1688
1756
|
});
|
|
1689
1757
|
};
|
|
1690
1758
|
walk3(root, "", false, true);
|
|
@@ -1840,10 +1908,10 @@ function pickScene(root, x, y, opts = {}, deps = {}) {
|
|
|
1840
1908
|
const alive = (threeD ? d.visible : (t?.renderable ?? true) && t?.visible !== false) && carriers.every((c) => c.target?.renderable ?? true);
|
|
1841
1909
|
const visible = parentVisible && alive && alpha > 0;
|
|
1842
1910
|
if (!visible) {
|
|
1843
|
-
if (seq instanceof
|
|
1911
|
+
if (seq instanceof chunkBFERTUXK_cjs.CompositionSequence && !threeD && parentVisible && alpha > 0 && t?.visible === false && (t?.renderable ?? true) && carriers.every((c) => c.target?.renderable ?? true)) hiddenSources.set(seq, path);
|
|
1844
1912
|
return;
|
|
1845
1913
|
}
|
|
1846
|
-
const isComposition = seq instanceof
|
|
1914
|
+
const isComposition = seq instanceof chunkBFERTUXK_cjs.CompositionSequence;
|
|
1847
1915
|
if (isComposition && !threeD) {
|
|
1848
1916
|
walk3(seq, path + "/", visible, at, orderBase, via);
|
|
1849
1917
|
return;
|
|
@@ -1899,7 +1967,7 @@ function pickScene(root, x, y, opts = {}, deps = {}) {
|
|
|
1899
1967
|
}
|
|
1900
1968
|
if (!hit) return;
|
|
1901
1969
|
const maskTarget = seq.maskSequence?.target;
|
|
1902
|
-
const maskSrc =
|
|
1970
|
+
const maskSrc = chunkBFERTUXK_cjs.maskSourceOf(seq.spec.mask);
|
|
1903
1971
|
if (maskTarget && !(maskSrc.kind === "inline" && maskSrc.invert) && !inside(maskTarget.getBounds(), point)) return;
|
|
1904
1972
|
found.push({ hit: via ? { ...hit, point: { x, y }, via } : hit, order: orderBase ? [...orderBase, ...orderOf(d)] : orderOf(d) });
|
|
1905
1973
|
});
|
|
@@ -1943,7 +2011,7 @@ function walk(root, visit) {
|
|
|
1943
2011
|
visit(seq);
|
|
1944
2012
|
const mask = seq.maskSequence;
|
|
1945
2013
|
if (mask) visit(mask);
|
|
1946
|
-
if (seq instanceof
|
|
2014
|
+
if (seq instanceof chunkBFERTUXK_cjs.CompositionSequence) walk(seq, visit);
|
|
1947
2015
|
}
|
|
1948
2016
|
}
|
|
1949
2017
|
function reusePoolOf(old) {
|
|
@@ -2044,7 +2112,7 @@ var round = (n) => Math.round(n * 1e6) / 1e6;
|
|
|
2044
2112
|
var family = (name) => name.replace(/\d+/g, "#");
|
|
2045
2113
|
function detailOf(seq) {
|
|
2046
2114
|
const s = seq.spec;
|
|
2047
|
-
const spans =
|
|
2115
|
+
const spans = chunk4NOTVQ3I_cjs.spansMeta.get(seq.spec)?.preview;
|
|
2048
2116
|
if (spans) return spans.length > 60 ? spans.slice(0, 57) + "\u2026" : spans;
|
|
2049
2117
|
if (typeof s.text === "string") return s.text.length > 60 ? s.text.slice(0, 57) + "\u2026" : s.text;
|
|
2050
2118
|
if (typeof s.asset === "string") return `asset \u201C${s.asset}\u201D`;
|
|
@@ -2060,10 +2128,10 @@ function walk2(comp, parentStart, parentEnd, depth, prefix, rows, transitions, l
|
|
|
2060
2128
|
const start = parentStart + (seq.at ?? 0);
|
|
2061
2129
|
const end = Math.min(parentEnd, seq.duration !== void 0 ? start + seq.duration : parentEnd);
|
|
2062
2130
|
const span = end - start;
|
|
2063
|
-
const keys = (seq.spec.keyframes ?? []).map((kf) => round(start +
|
|
2131
|
+
const keys = (seq.spec.keyframes ?? []).map((kf) => round(start + chunk4NOTVQ3I_cjs.resolveAt(kf.at, span))).sort((a, b) => a - b).slice(0, MAX_KEYS);
|
|
2064
2132
|
const row = { path: prefix + name, name, type: seq.spec.type, depth, start: round(start), end: round(end), keys, detail: detailOf(seq), ...local ? { local } : {} };
|
|
2065
2133
|
const inner = [];
|
|
2066
|
-
const isComp = seq instanceof
|
|
2134
|
+
const isComp = seq instanceof chunkBFERTUXK_cjs.CompositionSequence;
|
|
2067
2135
|
if (isComp) {
|
|
2068
2136
|
const label = seq.remapLabel();
|
|
2069
2137
|
walk2(seq, label ? 0 : start, label ? seq.contentSpan : end, depth + 1, prefix + name + "/", inner, transitions, label ? `${name} ${label}` : local);
|
|
@@ -2222,7 +2290,7 @@ function sheetLayout(n, columns, cellW, srcW, srcH, labelH) {
|
|
|
2222
2290
|
}
|
|
2223
2291
|
|
|
2224
2292
|
// src/core/vars.ts
|
|
2225
|
-
var RESERVED_NAMES = ["w", "h", "W", "H", "GW", "GH", "t", "d", "T", "contain", "cover", "value", ...
|
|
2293
|
+
var RESERVED_NAMES = ["w", "h", "W", "H", "GW", "GH", "t", "d", "T", "contain", "cover", "value", ...chunk4NOTVQ3I_cjs.EXPRESSION_NAMES];
|
|
2226
2294
|
var NAME = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
2227
2295
|
var isPlain = (v) => !!v && typeof v === "object" && (Object.getPrototypeOf(v) === Object.prototype || Object.getPrototypeOf(v) === null);
|
|
2228
2296
|
function normalizeVars(raw, where, warn = (m) => console.warn(m)) {
|
|
@@ -2766,8 +2834,8 @@ var Movie = class {
|
|
|
2766
2834
|
this.stops = normalizeStops(applyVars(options.composition, this._vars)?.stops, this.duration, this.frameRate);
|
|
2767
2835
|
this._posterFrame = poster.frame;
|
|
2768
2836
|
this.background = options.background ?? "#000000";
|
|
2769
|
-
this.timeline =
|
|
2770
|
-
|
|
2837
|
+
this.timeline = chunk4NOTVQ3I_cjs.createTimeline({ paused: true, defaults: { ease: "none" } });
|
|
2838
|
+
chunk4NOTVQ3I_cjs.lengthen(this.timeline, this.duration);
|
|
2771
2839
|
const baseAppOptions = {
|
|
2772
2840
|
width: this.width,
|
|
2773
2841
|
height: this.height,
|
|
@@ -2866,8 +2934,8 @@ var Movie = class {
|
|
|
2866
2934
|
height: sizeWins ? height : spec.height ?? height,
|
|
2867
2935
|
duration: spec.duration ?? this.duration
|
|
2868
2936
|
} : void 0;
|
|
2869
|
-
await
|
|
2870
|
-
if (
|
|
2937
|
+
await chunk4NOTVQ3I_cjs.ensureFilterLibrary(seededComposition);
|
|
2938
|
+
if (chunk53DXJEO7_cjs.usesAdvancedBlend(seededComposition)) await chunk53DXJEO7_cjs.enableAdvancedBlend(this.app.renderer);
|
|
2871
2939
|
const userComposition = seededComposition ? expandTransitions(seededComposition) : void 0;
|
|
2872
2940
|
const rootSeqSpec = {
|
|
2873
2941
|
type: "composition",
|
|
@@ -2877,7 +2945,7 @@ var Movie = class {
|
|
|
2877
2945
|
...userComposition
|
|
2878
2946
|
};
|
|
2879
2947
|
if (userComposition) carryTransitionWindows(userComposition, rootSeqSpec);
|
|
2880
|
-
const sequence = new
|
|
2948
|
+
const sequence = new chunkBFERTUXK_cjs.CompositionSequence(rootSeqSpec, null, rootShape);
|
|
2881
2949
|
lp?.begin("build", countLayers(rootSeqSpec));
|
|
2882
2950
|
try {
|
|
2883
2951
|
await sequence.build();
|
|
@@ -3015,8 +3083,8 @@ var Movie = class {
|
|
|
3015
3083
|
if (!changed) return { reason, ms: 0, audio: "none", frame: this.currentFrame, playing: this.isPlaying, unchanged: true };
|
|
3016
3084
|
sequence = await this._construct(composition, vars, width, height, void 0, this._resized || sizeChanged, reusePoolOf(this._rootSequence));
|
|
3017
3085
|
alive();
|
|
3018
|
-
const timeline =
|
|
3019
|
-
|
|
3086
|
+
const timeline = chunk4NOTVQ3I_cjs.createTimeline({ paused: true, defaults: { ease: "none" } });
|
|
3087
|
+
chunk4NOTVQ3I_cjs.lengthen(timeline, this.duration);
|
|
3020
3088
|
sequence.bindTimeline(timeline);
|
|
3021
3089
|
const hadSound = this.audioBuffer !== null;
|
|
3022
3090
|
const audio = await this._mixSound(sequence, this._ensureAudioContext());
|
|
@@ -3423,7 +3491,7 @@ var Movie = class {
|
|
|
3423
3491
|
chunkTWZNOUM7_cjs.warnUnknownOptions("movie.inspectAudio()", opts, ["window", "scenes"]);
|
|
3424
3492
|
this._requireReady("inspectAudio");
|
|
3425
3493
|
const scenes = opts.scenes ?? namedScenes(this.timelineData().rows);
|
|
3426
|
-
return
|
|
3494
|
+
return chunkSMHTOWXG_cjs.analyzeAudio(this.audioBuffer, this._audioSources, this._mixStats, this.duration, { ...opts, scenes });
|
|
3427
3495
|
}
|
|
3428
3496
|
/**
|
|
3429
3497
|
* Draw the stage now. PixiJS's CullerPlugin only culls inside `app.render()` (the ticker), and we render
|
|
@@ -3785,7 +3853,7 @@ function countLayers(spec) {
|
|
|
3785
3853
|
n += 1 + countLayers(s);
|
|
3786
3854
|
const spans = s.spans;
|
|
3787
3855
|
if (Array.isArray(spans)) n += spans.length;
|
|
3788
|
-
const src =
|
|
3856
|
+
const src = chunkBFERTUXK_cjs.maskSourceOf(mask);
|
|
3789
3857
|
if (src.kind === "inline") n += 1 + countLayers(src.spec);
|
|
3790
3858
|
}
|
|
3791
3859
|
return n;
|
|
@@ -3874,8 +3942,8 @@ function splitVertical(text, style, ts, right, top, align, by) {
|
|
|
3874
3942
|
|
|
3875
3943
|
// src/presets/_ease.ts
|
|
3876
3944
|
function parseEase2(name) {
|
|
3877
|
-
|
|
3878
|
-
return
|
|
3945
|
+
chunk4NOTVQ3I_cjs.checkEase(name, "a preset");
|
|
3946
|
+
return chunk4NOTVQ3I_cjs.parseEase(name);
|
|
3879
3947
|
}
|
|
3880
3948
|
|
|
3881
3949
|
// src/presets/kenBurns.ts
|
|
@@ -4010,17 +4078,17 @@ function orbit(opts) {
|
|
|
4010
4078
|
throw new Error("pixi-effects: orbit() cannot combine `radius` with `dollyZoom` \u2014 the radius follows the animated fov");
|
|
4011
4079
|
}
|
|
4012
4080
|
const [cx, cy] = opts.center ?? [width / 2, height / 2];
|
|
4013
|
-
const fixedR = opts.radius ??
|
|
4081
|
+
const fixedR = opts.radius ?? chunk4NOTVQ3I_cjs.homeDistance(height, fov ?? chunk4NOTVQ3I_cjs.DEFAULT_FOV);
|
|
4014
4082
|
const start = opts.start ?? -degrees / 2;
|
|
4015
4083
|
const steps = Math.max(1, Math.round(duration * stepsPerSecond));
|
|
4016
4084
|
const easeFn = parseEase2(ease);
|
|
4017
4085
|
const dollyEase = dolly ? parseEase2(dolly.ease ?? ease) : null;
|
|
4018
4086
|
const pos = (i) => {
|
|
4019
4087
|
const p = i / steps;
|
|
4020
|
-
const a = (start + degrees * easeFn(p)) *
|
|
4088
|
+
const a = (start + degrees * easeFn(p)) * chunk4NOTVQ3I_cjs.DEG;
|
|
4021
4089
|
if (!dolly) return { x: cx + fixedR * Math.sin(a), z: fixedR * Math.cos(a) };
|
|
4022
4090
|
const f = dolly.from + (dolly.to - dolly.from) * dollyEase(p);
|
|
4023
|
-
const R =
|
|
4091
|
+
const R = chunk4NOTVQ3I_cjs.homeDistance(height, f);
|
|
4024
4092
|
return { x: cx + R * Math.sin(a), z: R * Math.cos(a), fov: f };
|
|
4025
4093
|
};
|
|
4026
4094
|
const keyframes = [];
|
|
@@ -4075,7 +4143,7 @@ function particles(opts) {
|
|
|
4075
4143
|
const round2 = (v) => Math.round(v * 1e6) / 1e6;
|
|
4076
4144
|
const out = [];
|
|
4077
4145
|
for (let i = 0; i < count; i++) {
|
|
4078
|
-
const r =
|
|
4146
|
+
const r = chunk4NOTVQ3I_cjs.random(seed * 1000003 + i * 7919 + 17);
|
|
4079
4147
|
const pick = ([a2, b]) => a2 + r() * (b - a2);
|
|
4080
4148
|
const born = at + r() * emit;
|
|
4081
4149
|
const lifetime = pick(life);
|
|
@@ -4088,7 +4156,7 @@ function particles(opts) {
|
|
|
4088
4156
|
const turn = spin ? pick(spin) : 0;
|
|
4089
4157
|
const startAngle = spin ? r() * 360 : 0;
|
|
4090
4158
|
const swayAmp = sway?.amp ?? 0, swayFreq = sway?.freq ?? 1;
|
|
4091
|
-
const n0 = sway ?
|
|
4159
|
+
const n0 = sway ? chunk4NOTVQ3I_cjs.noise(0, seed * 1000003 + i) : 0;
|
|
4092
4160
|
const at_ = (t) => {
|
|
4093
4161
|
const axis = (p0, v0, acc) => {
|
|
4094
4162
|
if (drag > 0) {
|
|
@@ -4097,7 +4165,7 @@ function particles(opts) {
|
|
|
4097
4165
|
}
|
|
4098
4166
|
return p0 + v0 * t + 0.5 * acc * t * t;
|
|
4099
4167
|
};
|
|
4100
|
-
const sw = sway ? swayAmp * (
|
|
4168
|
+
const sw = sway ? swayAmp * (chunk4NOTVQ3I_cjs.noise(t * swayFreq, seed * 1000003 + i) - n0) : 0;
|
|
4101
4169
|
return { x: axis(x0, vx, wind) + sw, y: axis(y0, vy, gravity) };
|
|
4102
4170
|
};
|
|
4103
4171
|
const kfs = [];
|
|
@@ -4159,7 +4227,7 @@ function followPath(opts) {
|
|
|
4159
4227
|
if (steps > MAX_STEPS) throw new Error(`followPath(): ${steps} samples is too many (max ${MAX_STEPS}); lower frameRate or duration`);
|
|
4160
4228
|
const segments = [];
|
|
4161
4229
|
let total = 0;
|
|
4162
|
-
for (const line of
|
|
4230
|
+
for (const line of chunk4NOTVQ3I_cjs.flattenSvgPath(d)) {
|
|
4163
4231
|
const p = line.closed ? [...line.pts, line.pts[0], line.pts[1]] : line.pts;
|
|
4164
4232
|
for (let i = 2; i < p.length; i += 2) {
|
|
4165
4233
|
const len = Math.hypot(p[i] - p[i - 2], p[i + 1] - p[i - 1]);
|
|
@@ -4212,7 +4280,7 @@ function followPath(opts) {
|
|
|
4212
4280
|
// src/core/pathSample.ts
|
|
4213
4281
|
function samplePath(d) {
|
|
4214
4282
|
if (typeof d !== "string" || d.trim() === "") throw new Error('samplePath(): d must be SVG path data, e.g. "M 40 300 C 200 20 400 20 560 300"');
|
|
4215
|
-
const lines =
|
|
4283
|
+
const lines = chunk4NOTVQ3I_cjs.flattenSvgPath(d);
|
|
4216
4284
|
const segments = [];
|
|
4217
4285
|
let length = 0;
|
|
4218
4286
|
for (const line of lines) {
|
|
@@ -4243,7 +4311,7 @@ function samplePath(d) {
|
|
|
4243
4311
|
return { x: g.x0 + (g.x1 - g.x0) * t, y: g.y0 + (g.y1 - g.y0) * t, angle: Math.atan2(g.y1 - g.y0, g.x1 - g.x0) };
|
|
4244
4312
|
},
|
|
4245
4313
|
trim(start = 0, end = 1) {
|
|
4246
|
-
return
|
|
4314
|
+
return chunk4NOTVQ3I_cjs.trimPolylines(lines, start, end).map((l) => l.closed ? [...l.pts, l.pts[0], l.pts[1]] : l.pts);
|
|
4247
4315
|
}
|
|
4248
4316
|
};
|
|
4249
4317
|
}
|
|
@@ -4352,7 +4420,7 @@ function distances(n, from, grid, seed) {
|
|
|
4352
4420
|
if (n === 0) return [];
|
|
4353
4421
|
if (from === "random") {
|
|
4354
4422
|
const order = Array.from({ length: n }, (_, i) => i);
|
|
4355
|
-
const r =
|
|
4423
|
+
const r = chunk4NOTVQ3I_cjs.random(seed);
|
|
4356
4424
|
for (let i = n - 1; i > 0; i--) {
|
|
4357
4425
|
const j = Math.floor(r() * (i + 1));
|
|
4358
4426
|
[order[i], order[j]] = [order[j], order[i]];
|
|
@@ -4414,7 +4482,7 @@ function wiggle(opts) {
|
|
|
4414
4482
|
to[n] = p.around;
|
|
4415
4483
|
return;
|
|
4416
4484
|
}
|
|
4417
|
-
const off = (
|
|
4485
|
+
const off = (chunk4NOTVQ3I_cjs.rand(seed * 7919 + pi * 104729 + s * 31 + 1) * 2 - 1) * p.amp;
|
|
4418
4486
|
to[n] = typeof p.around === "number" ? p.around + off : `(${p.around}) ${off < 0 ? "-" : "+"} ${Math.abs(off)}`;
|
|
4419
4487
|
});
|
|
4420
4488
|
out.push({ at: at + s * stepLen, to, duration: stepLen, ease });
|
|
@@ -4448,20 +4516,25 @@ function animateText(text, style, options) {
|
|
|
4448
4516
|
const pieces = splitText(text, style, { by, x, y, align, ...vertical ? { vertical } : {} });
|
|
4449
4517
|
if (pieces.length === 0) return [];
|
|
4450
4518
|
const lineHeight = measureText("M", style).height;
|
|
4451
|
-
const
|
|
4452
|
-
const
|
|
4519
|
+
const given = (v) => v === false || v === "none" ? void 0 : v;
|
|
4520
|
+
const inSpec = options.in === void 0 ? "rise" : given(options.in), outSpec = given(options.out);
|
|
4521
|
+
const inTween = inSpec === void 0 ? null : resolveTween(inSpec, "in");
|
|
4522
|
+
const outTween = outSpec === void 0 ? null : resolveTween(outSpec, "out");
|
|
4453
4523
|
const delays = stagger(pieces.length, options.stagger ?? { each: 0.04 });
|
|
4454
4524
|
const wave = Math.max(...delays);
|
|
4455
|
-
const
|
|
4525
|
+
const outDelays = outTween?.stagger ? stagger(pieces.length, outTween.stagger) : delays;
|
|
4526
|
+
const outWave = Math.max(...outDelays);
|
|
4527
|
+
const lead = Math.max(...delays.map((d, i) => d - outDelays[i]));
|
|
4528
|
+
const need = (inTween?.duration ?? 0) + (outTween ? outTween.duration + outWave + lead : wave);
|
|
4456
4529
|
if (duration < need - 1e-9) {
|
|
4457
4530
|
throw new Error(`animateText(): duration ${duration} is too short for this wave: the entrance${outTween ? ", the exit" : ""} and the stagger need at least ${+need.toFixed(3)} s`);
|
|
4458
4531
|
}
|
|
4459
4532
|
const end = at + duration;
|
|
4460
4533
|
if (outTween?.at !== void 0) {
|
|
4461
4534
|
if (outTween.at < at - 1e-9) console.warn(`pixi-effects: animateText(): out.at ${outTween.at} is before the layer starts (at ${at}): the exit starts with the piece; use out.at \u2265 ${at}`);
|
|
4462
|
-
const latest = end - outTween.duration -
|
|
4463
|
-
if (outTween.at > latest + 1e-9) console.warn(`pixi-effects: animateText(): out.at ${outTween.at} leaves after the layer ends (the exit and the wave take ${+(outTween.duration +
|
|
4464
|
-
if (inTween && outTween.at - at < inTween.duration - 1e-9) console.warn(`pixi-effects: animateText(): out.at ${outTween.at} is before the entrance has finished (it takes ${inTween.duration} s from at ${at}): use out.at \u2265 ${+(at + inTween.duration).toFixed(3)}`);
|
|
4535
|
+
const latest = end - outTween.duration - outWave;
|
|
4536
|
+
if (outTween.at > latest + 1e-9) console.warn(`pixi-effects: animateText(): out.at ${outTween.at} leaves after the layer ends (the exit and the wave take ${+(outTween.duration + outWave).toFixed(3)} s and the layer ends at ${+end.toFixed(3)} s): use out.at \u2264 ${+latest.toFixed(3)}, or a longer duration`);
|
|
4537
|
+
if (inTween && outTween.at - at < inTween.duration + lead - 1e-9) console.warn(`pixi-effects: animateText(): out.at ${outTween.at} is before the entrance has finished (it takes ${inTween.duration} s from at ${at}): use out.at \u2265 ${+(at + inTween.duration + lead).toFixed(3)}`);
|
|
4465
4538
|
}
|
|
4466
4539
|
return pieces.map((p, i) => {
|
|
4467
4540
|
const cx = p.cx ?? p.x + p.width / 2, cy = p.cy ?? p.y + lineHeight / 2;
|
|
@@ -4481,8 +4554,8 @@ function animateText(text, style, options) {
|
|
|
4481
4554
|
}
|
|
4482
4555
|
let idleEnd = len;
|
|
4483
4556
|
if (outTween) {
|
|
4484
|
-
const begin = outTween.at !== void 0 ? void 0 : outTween.duration + (
|
|
4485
|
-
const local = outTween.at !== void 0 ? Math.max(0, outTween.at -
|
|
4557
|
+
const begin = outTween.at !== void 0 ? void 0 : outTween.duration + (outWave - outDelays[i]);
|
|
4558
|
+
const local = outTween.at !== void 0 ? Math.max(0, outTween.at + outDelays[i] - start) : -begin;
|
|
4486
4559
|
idleEnd = outTween.at !== void 0 ? local : len - begin;
|
|
4487
4560
|
keyframes.push({
|
|
4488
4561
|
at: local,
|
|
@@ -4518,6 +4591,10 @@ function resolveTween(spec, which) {
|
|
|
4518
4591
|
if (typeof spec === "object" && spec) {
|
|
4519
4592
|
for (const key of Object.keys(spec)) {
|
|
4520
4593
|
if (TWEEN_KEYS.includes(key)) continue;
|
|
4594
|
+
if (key === "stagger") {
|
|
4595
|
+
if (which === "in") console.warn("pixi-effects: animateText(): in.stagger is ignored: the entrance wave is the options' `stagger` (only `out` can have a wave of its own: out: { stagger: 0 } leaves all at once)");
|
|
4596
|
+
continue;
|
|
4597
|
+
}
|
|
4521
4598
|
if (which === "out" && key === "at") {
|
|
4522
4599
|
if (typeof spec.at !== "number" || !Number.isFinite(spec.at)) console.warn(`pixi-effects: animateText(): out.at must be a number of seconds (the composition second the exit starts at), got ${JSON.stringify(spec.at)}; ignored`);
|
|
4523
4600
|
continue;
|
|
@@ -4529,7 +4606,7 @@ function resolveTween(spec, which) {
|
|
|
4529
4606
|
}
|
|
4530
4607
|
if (t.preset !== void 0 && !(t.preset in PRESETS)) {
|
|
4531
4608
|
const guess = chunkTWZNOUM7_cjs.suggestName(String(t.preset), PRESET_NAMES);
|
|
4532
|
-
throw new Error(`animateText(): ${which} "${t.preset}" is not a preset${guess ? `; did you mean "${guess}"?` : ""} (presets: ${PRESET_NAMES.map((n) => `"${n}"`).join(", ")})`);
|
|
4609
|
+
throw new Error(`animateText(): ${which} "${t.preset}" is not a preset${guess ? `; did you mean "${guess}"?` : ""} (presets: ${PRESET_NAMES.map((n) => `"${n}"`).join(", ")}; for no ${which === "out" ? "exit: omit `out` or write out: false (the pieces stay until the layer ends)" : "entrance: in: false"})`);
|
|
4533
4610
|
}
|
|
4534
4611
|
const base = t.preset ? PRESETS[t.preset] : void 0;
|
|
4535
4612
|
const from = { ...base?.from ?? {}, ...t.from ?? {} };
|
|
@@ -4538,11 +4615,14 @@ function resolveTween(spec, which) {
|
|
|
4538
4615
|
for (const k of Object.keys(from)) {
|
|
4539
4616
|
if (!known.has(k) && to[k] === void 0) throw new Error(`animateText(): ${which}.from has "${k}", which has no resting value; give ${which}.to: { ${k}: \u2026 }`);
|
|
4540
4617
|
}
|
|
4541
|
-
if (Object.keys(from).length === 0)
|
|
4618
|
+
if (Object.keys(from).length === 0) {
|
|
4619
|
+
throw new Error(`animateText(): ${which} needs a preset or a from${which === "out" && Object.keys(to).length ? ` \u2014 ${which} takes \`from\`: the state the piece leaves to (out: { from: { y: 18, alpha: 0 } }); \`to\` is only the resting value of a property that has none` : ""}`);
|
|
4620
|
+
}
|
|
4542
4621
|
let ease = t.ease ?? base?.ease ?? "power2.out";
|
|
4543
4622
|
if (which === "out" && t.ease === void 0) ease = ease.replace(".out", ".in");
|
|
4544
4623
|
const at = which === "out" && typeof t.at === "number" && Number.isFinite(t.at) ? t.at : void 0;
|
|
4545
|
-
|
|
4624
|
+
const wave = which === "out" && t.stagger !== void 0 ? t.stagger === 0 ? { each: 0 } : t.stagger : void 0;
|
|
4625
|
+
return { from, to: { ...to }, duration: t.duration ?? base?.duration ?? 0.5, ease, ...at !== void 0 ? { at } : {}, ...wave ? { stagger: wave } : {} };
|
|
4546
4626
|
}
|
|
4547
4627
|
|
|
4548
4628
|
// src/presets/react.ts
|
|
@@ -4707,7 +4787,7 @@ function computeEnvelope(audio, options = {}) {
|
|
|
4707
4787
|
re[i] = k >= 0 && k < length ? mono[k] * win[i] : 0;
|
|
4708
4788
|
im[i] = 0;
|
|
4709
4789
|
}
|
|
4710
|
-
|
|
4790
|
+
chunkSMHTOWXG_cjs.fft(re, im);
|
|
4711
4791
|
for (const n of names) {
|
|
4712
4792
|
const [lo, hi] = bands[n];
|
|
4713
4793
|
let p = 0;
|
|
@@ -4873,5 +4953,5 @@ exports.splitText = splitText;
|
|
|
4873
4953
|
exports.stagger = stagger;
|
|
4874
4954
|
exports.wiggle = wiggle;
|
|
4875
4955
|
exports.withFade = withFade;
|
|
4876
|
-
//# sourceMappingURL=chunk-
|
|
4877
|
-
//# sourceMappingURL=chunk-
|
|
4956
|
+
//# sourceMappingURL=chunk-YXIEPTFG.cjs.map
|
|
4957
|
+
//# sourceMappingURL=chunk-YXIEPTFG.cjs.map
|