Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

1.7 KB
Raw Blame
// Item display metadata for the /play client — names + glyphs the hotbar and
// inventory render. The authoritative item ids and quantities come from the
// server schema (GamePlayer.inv / .hotbar); this map is presentation only and
// mirrors the server's item vocabulary (tools, gathered resources, currency).
// Unknown ids degrade gracefully to a readable label + initial glyph so a new
// server-side item never renders as a blank slot.

export const ITEM_DISPLAY = {
	axe: { name: 'Axe', glyph: '🪓' },
	pickaxe: { name: 'Pickaxe', glyph: '⛏️' },
	rod: { name: 'Fishing rod', glyph: '🎣' },
	hammer: { name: 'Hammer', glyph: '🔨' },
	sword: { name: 'Sword', glyph: '⚔️' },
	bat: { name: 'Bat', glyph: '🏏' },
	pistol: { name: 'Pistol', glyph: '🔫' },
	bow: { name: 'Bow', glyph: '🏹' },
	ammo: { name: 'Ammo', glyph: '🔸' },
	arrow: { name: 'Arrows', glyph: '🔹' },
	vest: { name: 'Body armor', glyph: '🦺' },
	wood: { name: 'Wood', glyph: '🪵' },
	stone: { name: 'Stone', glyph: '🪨' },
	coal: { name: 'Coal', glyph: '⚫' },
	fish: { name: 'Raw fish', glyph: '🐟' },
	cookedFish: { name: 'Cooked fish', glyph: '🍖' },
	bones: { name: 'Bones', glyph: '🦴' },
	hide: { name: 'Beast hide', glyph: '🟫' },
	healthPotion: { name: 'Health potion', glyph: '🧪' },
	dire_wolf: { name: 'Dire Wolf', glyph: '🐺' },
	war_boar: { name: 'War Boar', glyph: '🐗' },
	gold: { name: 'Gold', glyph: '🪙' },
};

export function itemDisplay(id) {
	if (!id) return null;
	const known = ITEM_DISPLAY[id];
	if (known) return known;
	const name = String(id)
		.replace(/[-_]/g, ' ')
		.replace(/^\w/, (m) => m.toUpperCase());
	return { name, glyph: String(id).charAt(0).toUpperCase() };
}