import type { CSSProperties } from "react"; import type { Vector3Tuple } from "../game/dungeonManifest"; import { DungeonMapGraphic } from "./DungeonMapGraphic"; export interface MinimapProps { position: Vector3Tuple; yaw: number; areaName: string; distanceTravelled?: number; rotationMode?: "north-up" | "player-up"; onOpenMap: () => void; } export function Minimap({ position, yaw, areaName, distanceTravelled = 0, rotationMode = "north-up", onOpenMap, }: MinimapProps) { const heading = ((Math.round((yaw * 180) / Math.PI) % 360) + 360) % 360; return (
{areaName} {Math.round(distanceTravelled)} m explored · M map
); }