Spaces:
Runtime error
Runtime error
Update lineupRenderer.js
Browse files- lineupRenderer.js +5 -0
lineupRenderer.js
CHANGED
|
@@ -153,6 +153,11 @@ function drawPitch(ctx, W, H) {
|
|
| 153 |
* @returns {Promise<Buffer>} PNG image buffer
|
| 154 |
*/
|
| 155 |
async function renderLineupImage(lineup, formKey, formation, client) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 156 |
// 1. Pre-fetch all user data and avatars in parallel to speed up rendering
|
| 157 |
const allUserIds = new Set();
|
| 158 |
for (const players of lineup.values()) {
|
|
|
|
| 153 |
* @returns {Promise<Buffer>} PNG image buffer
|
| 154 |
*/
|
| 155 |
async function renderLineupImage(lineup, formKey, formation, client) {
|
| 156 |
+
const PITCH_W = 900;
|
| 157 |
+
const SIDEBAR_W = 280;
|
| 158 |
+
const W = PITCH_W + SIDEBAR_W;
|
| 159 |
+
const H = 620;
|
| 160 |
+
|
| 161 |
// 1. Pre-fetch all user data and avatars in parallel to speed up rendering
|
| 162 |
const allUserIds = new Set();
|
| 163 |
for (const players of lineup.values()) {
|