Spaces:
Sleeping
Sleeping
| import { normalizeCategory } from "./categoryNormalizer"; | |
| export type ReadyPlayerMeAssetType = | |
| | "top" | |
| | "bottom" | |
| | "footwear" | |
| | "glasses" | |
| | "headwear" | |
| | "outfit" | |
| | "beard" | |
| | "eye" | |
| | "eyebrows" | |
| | "eyeshape" | |
| | "facemask" | |
| | "faceshape" | |
| | "facewear" | |
| | "hair" | |
| | "lipshape" | |
| | "noseshape" | |
| | "shirt" | |
| | "costume"; | |
| export function mapCategoryToAssetType(category: string): ReadyPlayerMeAssetType | null { | |
| const normalized = normalizeCategory(category.toLowerCase()); | |
| const categoryMap: Record<string, ReadyPlayerMeAssetType> = { | |
| shirts: "top", | |
| tops: "top", | |
| shirt: "top", | |
| tshirt: "top", | |
| blouse: "top", | |
| polo: "top", | |
| sweater: "top", | |
| hoodie: "top", | |
| jacket: "top", | |
| coat: "top", | |
| blazer: "top", | |
| pants: "bottom", | |
| trousers: "bottom", | |
| jeans: "bottom", | |
| shorts: "bottom", | |
| skirt: "bottom", | |
| leggings: "bottom", | |
| shoes: "footwear", | |
| sneakers: "footwear", | |
| boots: "footwear", | |
| heels: "footwear", | |
| sandals: "footwear", | |
| loafers: "footwear", | |
| glasses: "glasses", | |
| sunglasses: "glasses", | |
| hats: "headwear", | |
| hat: "headwear", | |
| cap: "headwear", | |
| beanie: "headwear", | |
| helmet: "headwear", | |
| dresses: "outfit", | |
| dress: "outfit", | |
| jumpsuit: "outfit", | |
| romper: "outfit", | |
| suits: "outfit", | |
| suit: "outfit", | |
| watches: "facewear", | |
| watch: "facewear", | |
| bags: "facewear", | |
| bag: "facewear", | |
| backpack: "facewear", | |
| purse: "facewear", | |
| jewelry: "facewear", | |
| necklace: "facewear", | |
| bracelet: "facewear", | |
| ring: "facewear", | |
| earring: "facewear", | |
| belts: "facewear", | |
| belt: "facewear", | |
| scarves: "facewear", | |
| scarf: "facewear", | |
| ties: "facewear", | |
| tie: "facewear", | |
| gloves: "facewear", | |
| glove: "facewear", | |
| swimwear: "outfit", | |
| bikini: "outfit", | |
| swimsuit: "outfit", | |
| underwear: "outfit", | |
| bra: "outfit", | |
| brief: "outfit", | |
| }; | |
| return categoryMap[normalized] || null; | |
| } | |
| export function getAssetGender(): "male" | "female" | "neutral" { | |
| return "neutral"; | |
| } | |