feat: more maps

This commit is contained in:
tresabhi committed 2025-04-02 16:00:18 -05:00
1 parent b2684e3152
commit ed5d2e3ff4
4 files changed
+12 -9

No files matched your search

@@ -1,6 +1,5 @@
import { asset } from '@blitzkit/core';
import type { APIRoute } from 'astro'; import type { APIRoute } from 'astro';
import { blobProxy } from '../../../../../core/blitzkit/blobMirror'; import { apiBlobProxy } from '../../../../../core/blitzkit/blobMirror';
export { getStaticPaths } from '../meta.json'; export { getStaticPaths } from '../meta.json';
@@ -11,5 +10,5 @@ export { getStaticPaths } from '../meta.json';
* @returns PNG. * @returns PNG.
*/ */
export const GET: APIRoute<{}, { id: string }> = async ({ params }) => { export const GET: APIRoute<{}, { id: string }> = async ({ params }) => {
return await blobProxy(asset(`/tanks/${params.id}/icons/big.png`)); return await apiBlobProxy(`/tanks/${params.id}/icons/big.webp`);
}; };
@@ -1,15 +1,14 @@
import { asset } from '@blitzkit/core';
import type { APIRoute } from 'astro'; import type { APIRoute } from 'astro';
import { blobProxy } from '../../../../../core/blitzkit/blobMirror'; import { apiBlobProxy } from '../../../../../core/blitzkit/blobMirror';
export { getStaticPaths } from '../meta.json'; export { getStaticPaths } from '../meta.json';
/** /**
* Returns the small icon for a tank, the image that appears in the team list in a battle or the loading screen. Use tanks/list.json for all valid ids. * Returns the small icon for a tank, the image that appears in the tank carousal in the garage. Use tanks/list.json for all valid ids.
* *
* @param id The tank id. * @param id The tank id.
* @returns PNG. * @returns PNG.
*/ */
export const GET: APIRoute<{}, { id: string }> = async ({ params }) => { export const GET: APIRoute<{}, { id: string }> = async ({ params }) => {
return await blobProxy(asset(`/tanks/${params.id}/icons/small.png`)); return await apiBlobProxy(`/tanks/${params.id}/icons/small.webp`);
}; };
+5
View File
@@ -40,6 +40,11 @@ namespace BlitzKit.CLI.Functions
(HttpContext context, string id) => Octet(context, mangler.Tank(id)) (HttpContext context, string id) => Octet(context, mangler.Tank(id))
); );
app.MapGet(
"/tanks/{id}/icons/big.pb",
(HttpContext context, string id) => Octet(context, mangler.TankIconBig(id))
);
app.Run(); app.Run();
} }
} }
+2 -2
View File
@@ -1,8 +1,8 @@
using Blitzkit; using Blitzkit;
using CUE4Parse_Conversion.Textures; using CUE4Parse_Conversion.Textures;
using CUE4Parse.UE4.Assets.Exports.Texture; using CUE4Parse.UE4.Assets.Exports.Texture;
using CUE4Parse.UE4.Assets.Objects;
using CUE4Parse.UE4.Objects.Core.Math; using CUE4Parse.UE4.Objects.Core.Math;
using SkiaSharp;
namespace BlitzKit.CLI.Utils namespace BlitzKit.CLI.Utils
{ {
@@ -14,7 +14,7 @@ namespace BlitzKit.CLI.Utils
{ {
return texture return texture
.Decode(ETexturePlatform.DesktopMobile)! .Decode(ETexturePlatform.DesktopMobile)!
.Encode(ETextureFormat.Png, 100) .Encode(SKEncodedImageFormat.Webp, 100)
.ToArray(); .ToArray();
} }