opencrush 0.3.21 → 0.3.22
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/dist/index.js +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -245656,8 +245656,8 @@ function esc(str2) {
|
|
|
245656
245656
|
}
|
|
245657
245657
|
function buildTextOverlay(data, overlayW) {
|
|
245658
245658
|
const S2 = SCALE;
|
|
245659
|
-
const px =
|
|
245660
|
-
const availW = overlayW - px -
|
|
245659
|
+
const px = 50 * S2;
|
|
245660
|
+
const availW = overlayW - px - 40 * S2;
|
|
245661
245661
|
const meta = [data.age, data.location].filter(Boolean).join(" \xB7 ");
|
|
245662
245662
|
const lines = 1 + (meta ? 1 : 0) + (data.job ? 1 : 0) + (data.tags.length > 0 ? 2 : 0) + (data.vibe ? 1 : 0);
|
|
245663
245663
|
const blockH = lines * 44 * S2;
|
|
@@ -245741,8 +245741,8 @@ async function generateCard(characterName) {
|
|
|
245741
245741
|
}
|
|
245742
245742
|
}
|
|
245743
245743
|
if (!refImagePath) return generateFallbackCard(charDir, characterName, data);
|
|
245744
|
-
const portraitW = Math.round(
|
|
245745
|
-
const overlayW = Math.round(
|
|
245744
|
+
const portraitW = Math.round(H2 * 4 / 5);
|
|
245745
|
+
const overlayW = W2 - portraitW + Math.round(40 * SCALE);
|
|
245746
245746
|
const bgBlur = await sharp(refImagePath).resize(W2, H2, { fit: "cover", position: "center" }).blur(50).modulate({ brightness: 0.3, saturation: 0.5 }).png().toBuffer();
|
|
245747
245747
|
const portrait = await sharp(refImagePath).resize(portraitW, H2, { fit: "cover", position: "top" }).png().toBuffer();
|
|
245748
245748
|
const fadeMask = Buffer.from(
|