import { profileAvatarUrl } from "@/shared/profile-appearance";
import { profileCosmeticIds } from "@/shared/profile-cosmetic-ids";
export function PixelTrophy({ className = "" }: { className?: string }) {
return (
);
}
// Generated markers, not player skins. No third-party avatar requests.
export function PlayerAvatar({
id,
avatarPath,
effect,
className = "",
}: {
id: string;
avatarPath?: string | null;
effect?: string | null;
className?: string;
}) {
const avatarUrl = profileAvatarUrl(avatarPath);
const activeEffect = profileCosmeticIds.find((value) => value === effect);
if (avatarUrl)
return (
);
const seed = [...id].reduce(
(value, char) => (value * 31 + char.charCodeAt(0)) >>> 0,
0,
);
const hair = ["#654b39", "#333e44", "#95723e", "#694f59"][seed % 4];
const skin = ["#c99a77", "#a67b60", "#dab28d", "#875f4d"][(seed >>> 3) % 4];
const shirt = ["#68876a", "#697e91", "#a68a50", "#8b6e7f"][(seed >>> 5) % 4];
return (
);
}