File size: 2,060 Bytes
9557505
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
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";
}