mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 12:09:51 +02:00
feat: more maps
This commit is contained in:
1 parent
b2684e3152
commit
ed5d2e3ff4
4 files changed
+12
-9
No files matched your search
+2
-3
@@ -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`);
|
||||||
};
|
};
|
||||||
+3
-4
@@ -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`);
|
||||||
};
|
};
|
||||||
@@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user