mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
texture caching
This commit is contained in:
1 parent
6395dd3f3d
commit
3299ce069e
6 files changed
+79
-92
No files matched your search
@@ -175,8 +175,10 @@ function Consumables({ characteristics }: ConsumablesProps) {
|
||||
{Object.entries(consumables.consumables).map(
|
||||
([id, { compatibility, consumable, purchase }]) => {
|
||||
if (!isCompatible(compatibility!)) return null;
|
||||
|
||||
return (
|
||||
<Consumable
|
||||
key={id}
|
||||
id={id}
|
||||
consumable={consumable!}
|
||||
purchase={purchase!}
|
||||
|
||||
@@ -7,20 +7,14 @@ import { assertDiscoveryTag } from "./assertDiscoveryTag";
|
||||
let _game: GameInterface | null = null;
|
||||
|
||||
if (!clientUnmounted && import.meta.env.SSR) {
|
||||
console.log("Pre-import");
|
||||
|
||||
const { GameInterface } = await import("@blitzkit/game");
|
||||
|
||||
console.log("Pre-creation");
|
||||
|
||||
_game = new GameInterface(
|
||||
assertSecret(import.meta.env.PUBLIC_WOTB_CLIENT),
|
||||
assertSecret(import.meta.env.WOTB_USMAP),
|
||||
"../../temp",
|
||||
);
|
||||
|
||||
console.log("Pre-tags");
|
||||
|
||||
const tankTags: string[] = [];
|
||||
|
||||
for (const item of api.metadata.group("TankEntity")) {
|
||||
@@ -30,11 +24,7 @@ if (!clientUnmounted && import.meta.env.SSR) {
|
||||
tankTags.push(tag);
|
||||
}
|
||||
|
||||
console.log("Pre-discovery");
|
||||
|
||||
_game.discoverTextures(tankTags);
|
||||
|
||||
console.log("Post-discovery");
|
||||
}
|
||||
|
||||
export const game = _game;
|
||||
Reference in new issue
Block a user