Spaces:
Paused
Paused
Update index.js
Browse files
index.js
CHANGED
|
@@ -127,7 +127,7 @@ async function createCustomSWGenerator({ profileImage, mainImage, caption = "Cus
|
|
| 127 |
|
| 128 |
//Threads
|
| 129 |
|
| 130 |
-
async function generateThread(username, avatarPath, textContent) {
|
| 131 |
const canvas = createCanvas(1080, 300);
|
| 132 |
const ctx = canvas.getContext('2d');
|
| 133 |
|
|
@@ -191,7 +191,7 @@ async function generateThread(username, avatarPath, textContent) {
|
|
| 191 |
ctx.drawImage(heart, 45, 250, 35, 35);
|
| 192 |
ctx.font = 'normal 25px Arial';
|
| 193 |
ctx.fillStyle = '#000000';
|
| 194 |
-
ctx.fillText(
|
| 195 |
|
| 196 |
return canvas.toBuffer('image/png');
|
| 197 |
}
|
|
|
|
| 127 |
|
| 128 |
//Threads
|
| 129 |
|
| 130 |
+
async function generateThread(username, avatarPath, textContent, countLike) {
|
| 131 |
const canvas = createCanvas(1080, 300);
|
| 132 |
const ctx = canvas.getContext('2d');
|
| 133 |
|
|
|
|
| 191 |
ctx.drawImage(heart, 45, 250, 35, 35);
|
| 192 |
ctx.font = 'normal 25px Arial';
|
| 193 |
ctx.fillStyle = '#000000';
|
| 194 |
+
ctx.fillText(countLike, 90, 275);
|
| 195 |
|
| 196 |
return canvas.toBuffer('image/png');
|
| 197 |
}
|