Release Healer Man 0.1.18
This commit is contained in:
1 parent
fc8a7a722a
commit
eaddad4134
12 files changed
+107
-42
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import type { ArenaStageManifest } from "./arenaTypes";
|
||||
|
||||
export interface ArenaCameraPose {
|
||||
readonly position: [number, number, number];
|
||||
readonly target: [number, number, number];
|
||||
}
|
||||
|
||||
export function arenaCameraPose(stage: ArenaStageManifest, team: 0 | 1): ArenaCameraPose {
|
||||
const centerX = (stage.bounds.min[0] + stage.bounds.max[0]) / 2;
|
||||
const centerZ = (stage.bounds.min[2] + stage.bounds.max[2]) / 2;
|
||||
const floorY = Math.min(...stage.teamSpawns.map((spawn) => spawn[1]));
|
||||
return {
|
||||
position: [...stage.spectatorPositions[team]],
|
||||
target: [centerX, floorY + 1.2, centerZ],
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user