From d60551d30a50362b4366da715b6b0422a970759f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Mon, 29 Sep 2025 13:41:52 -0500 Subject: [PATCH] fix: change blitzkit icons to big icons --- .../src/buildAssets/blitzkitTankIcons.ts | 22 +++++++++---------- .../components/TankSandboxLoader.tsx | 14 ++++++------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/scripts/src/buildAssets/blitzkitTankIcons.ts b/packages/scripts/src/buildAssets/blitzkitTankIcons.ts index 2170aac46..2e20c50ec 100644 --- a/packages/scripts/src/buildAssets/blitzkitTankIcons.ts +++ b/packages/scripts/src/buildAssets/blitzkitTankIcons.ts @@ -1,11 +1,11 @@ -import { BLITZKIT_TANK_ICON_SIZE, fetchTankDefinitions } from '@blitzkit/core'; -import { launch } from 'puppeteer'; -import sharp from 'sharp'; -import { commitAssets } from '../core/github/commitAssets'; -import { FileChange } from '../core/github/commitMultipleFiles'; +import { BLITZKIT_TANK_ICON_SIZE, fetchTankDefinitions } from "@blitzkit/core"; +import { launch } from "puppeteer"; +import sharp from "sharp"; +import { commitAssets } from "../core/github/commitAssets"; +import { FileChange } from "../core/github/commitMultipleFiles"; export async function blitzkitTankIcons() { - console.log('Building blitzkit tank icons...'); + console.log("Building blitzkit tank icons..."); const browser = await launch(); const page = await browser.newPage(); @@ -21,7 +21,7 @@ export async function blitzkitTankIcons() { try { await page.goto(`http://localhost:4321/api/tankopedia/tank-icon/${id}/`, { - waitUntil: 'networkidle0', + waitUntil: "networkidle0", }); } catch (error) { console.error(`${id} ${name} time out`, error); @@ -29,21 +29,21 @@ export async function blitzkitTankIcons() { } const screenshot = await page.screenshot({ - type: 'webp', + type: "webp", omitBackground: true, }); const content = await sharp(screenshot).trim({ threshold: 100 }).toBuffer(); index++; console.log( - `Rendered ${id} (${name}) ${((index / tanks.length) * 100).toFixed(2)}%`, + `Rendered ${id} (${name}) ${((index / tanks.length) * 100).toFixed(2)}%` ); - files.push({ path: `icons/tanks/blitzkit/${id}.webp`, content }); + files.push({ path: `icons/tanks/big/${id}.webp`, content }); } await page.close(); await browser.close(); - await commitAssets('tank icons', files); + await commitAssets("tank icons", files); } diff --git a/packages/website/src/components/Tankopedia/HeroSection/components/TankSandboxLoader.tsx b/packages/website/src/components/Tankopedia/HeroSection/components/TankSandboxLoader.tsx index 9f99f4855..0c4c33338 100644 --- a/packages/website/src/components/Tankopedia/HeroSection/components/TankSandboxLoader.tsx +++ b/packages/website/src/components/Tankopedia/HeroSection/components/TankSandboxLoader.tsx @@ -1,8 +1,8 @@ -import { asset } from '@blitzkit/core'; -import { Flex, type FlexProps, Progress } from '@radix-ui/themes'; -import { useProgress } from '@react-three/drei'; +import { asset } from "@blitzkit/core"; +import { Flex, type FlexProps, Progress } from "@radix-ui/themes"; +import { useProgress } from "@react-three/drei"; -type TankSandboxLoaderProps = Omit & { +type TankSandboxLoaderProps = Omit & { id: number; }; @@ -12,13 +12,13 @@ export function TankSandboxLoader({ id, ...props }: TankSandboxLoaderProps) { return ( );