feat: better icons and sizing

This commit is contained in:
tresabhi committed 2024-12-16 13:30:35 -06:00
1 parent 3c9ba9ec53
commit 382f04229e
7 files changed
+24 -10

No files matched your search

@@ -1,4 +1,4 @@
import { fetchTankDefinitions } from '@blitzkit/core';
import { BLITZKIT_TANK_ICON_SIZE, fetchTankDefinitions } from '@blitzkit/core';
import { exec } from 'child_process';
import { launch } from 'puppeteer';
import sharp from 'sharp';
@@ -17,7 +17,10 @@ export async function tankIcons() {
let index = 0;
for (const { id, name } of tanks) {
await page.setViewport({ width: 640 - 1, height: 480 });
await page.setViewport({
width: BLITZKIT_TANK_ICON_SIZE.width - 1,
height: BLITZKIT_TANK_ICON_SIZE.height,
});
await page.goto(`http://localhost:4321/api/tankopedia/tank-icon/${id}/`, {
waitUntil: 'networkidle0',
});