forked from phenom/healer-man
Release Healer Man 0.1.16
This commit is contained in:
1 parent
f49e54f35f
commit
b57d2b2839
89 files changed
+6055
-17
No files matched your search
@@ -0,0 +1,25 @@
|
||||
import catalog from "../../shared/arena-stages.json";
|
||||
import type { ArenaStageManifest } from "./arenaTypes";
|
||||
|
||||
function normalizeStage(stage: Omit<ArenaStageManifest, "assets">): ArenaStageManifest {
|
||||
return {
|
||||
...stage,
|
||||
assets: [
|
||||
{ id: "visual", url: `${stage.assetBaseUrl}/visual.glb` },
|
||||
{ id: "collision", url: `${stage.assetBaseUrl}/collision.glb` },
|
||||
{ id: "navigation", url: `${stage.assetBaseUrl}/navigation.glb` },
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
export const ARENA_STAGES = Object.freeze(
|
||||
catalog.stages.map((stage) => normalizeStage(stage as unknown as Omit<ArenaStageManifest, "assets">)),
|
||||
);
|
||||
|
||||
export const VALIDATED_ARENA_STAGES = Object.freeze(
|
||||
ARENA_STAGES.filter((stage) => Object.values(stage.validation).slice(1, 6).every(Boolean)),
|
||||
);
|
||||
|
||||
export function arenaStageById(stageId: string) {
|
||||
return ARENA_STAGES.find((stage) => stage.id === stageId) ?? null;
|
||||
}
|
||||
Reference in new issue
Block a user