@pinkaphant/kolmo 0.4.5 → 0.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +29 -0
- package/CLAUDE.md +8 -0
- package/README.md +11 -13
- package/bin/kolmo.mjs +7 -6
- package/dist/engine/index.d.ts +5 -1
- package/dist/engine/index.js +11 -6
- package/dist/engine/kolmoActor.d.ts +9 -1
- package/dist/engine/kolmoActor.js +12 -2
- package/dist/engine/kolmoActor.js.map +1 -1
- package/dist/engine/kolmoBotControl.d.ts +44 -0
- package/dist/engine/kolmoBotControl.js +194 -0
- package/dist/engine/kolmoBotControl.js.map +1 -0
- package/dist/engine/kolmoBotJournal.d.ts +23 -0
- package/dist/engine/kolmoBotJournal.js +138 -0
- package/dist/engine/kolmoBotJournal.js.map +1 -0
- package/dist/engine/kolmoFloatingOrigin.js +1 -8
- package/dist/engine/kolmoFloatingOrigin.js.map +1 -1
- package/dist/engine/kolmoGltfLoader.d.ts +16 -0
- package/dist/engine/kolmoGltfLoader.js +46 -0
- package/dist/engine/kolmoGltfLoader.js.map +1 -0
- package/dist/engine/kolmoHud.js +85 -80
- package/dist/engine/kolmoHud.js.map +1 -1
- package/dist/engine/kolmoInput.js +9 -7
- package/dist/engine/kolmoInput.js.map +1 -1
- package/dist/engine/kolmoLongDrive.js +32 -14
- package/dist/engine/kolmoLongDrive.js.map +1 -1
- package/dist/engine/kolmoPilotMesh.d.ts +4 -0
- package/dist/engine/kolmoPilotMesh.js +174 -2
- package/dist/engine/kolmoPilotMesh.js.map +1 -1
- package/dist/engine/kolmoVehicleAutoCompile.d.ts +1 -0
- package/dist/engine/kolmoVehicleAutoCompile.js +21 -5
- package/dist/engine/kolmoVehicleAutoCompile.js.map +1 -1
- package/dist/engine/kolmoVehicleDriver.d.ts +1 -0
- package/dist/engine/kolmoVehicleDriver.js +20 -12
- package/dist/engine/kolmoVehicleDriver.js.map +1 -1
- package/dist/engine/kolmoVehicleInner.js +25 -9
- package/dist/engine/kolmoVehicleInner.js.map +1 -1
- package/dist/engine/kolmoWardrobeRig.d.ts +22 -0
- package/dist/engine/kolmoWardrobeRig.js +146 -0
- package/dist/engine/kolmoWardrobeRig.js.map +1 -0
- package/dist/engine/kolmoWorld.d.ts +2 -2
- package/dist/engine/kolmoWorld.js +4 -1
- package/dist/engine/kolmoWorld.js.map +1 -1
- package/dist/importer/DomainWorkshopPanel.d.ts +3 -1
- package/dist/importer/DomainWorkshopPanel.js +15 -48
- package/dist/importer/DomainWorkshopPanel.js.map +1 -1
- package/dist/importer/GateHudBar.js.map +1 -1
- package/dist/importer/GlbImportGate.js +219 -210
- package/dist/importer/GlbImportGate.js.map +1 -1
- package/dist/importer/ImperativeVehicleRig.js +7 -6
- package/dist/importer/ImperativeVehicleRig.js.map +1 -1
- package/dist/importer/LiveDrivePads.js +41 -17
- package/dist/importer/LiveDrivePads.js.map +1 -1
- package/dist/importer/WardrobeWorkshopPanel.d.ts +15 -0
- package/dist/importer/WardrobeWorkshopPanel.js +529 -0
- package/dist/importer/WardrobeWorkshopPanel.js.map +1 -0
- package/dist/importer/importerWebMcp.d.ts +2 -0
- package/dist/importer/importerWebMcp.js +5 -3
- package/dist/importer/importerWebMcp.js.map +1 -1
- package/dist/importer/importerWebMcpTools.js +36 -9
- package/dist/importer/importerWebMcpTools.js.map +1 -1
- package/dist/importer/index.d.ts +6 -0
- package/dist/importer/index.js +10 -4
- package/dist/importer/khrCarGeometryMass.js +14 -8
- package/dist/importer/khrCarGeometryMass.js.map +1 -1
- package/dist/importer/khrCarPlanner.js +50 -44
- package/dist/importer/khrCarPlanner.js.map +1 -1
- package/dist/importer/useChopShopController.d.ts +2 -0
- package/dist/importer/useChopShopController.js +18 -0
- package/dist/importer/useChopShopController.js.map +1 -1
- package/dist/importer/wardrobeAutoFit.d.ts +16 -0
- package/dist/importer/wardrobeAutoFit.js +410 -0
- package/dist/importer/wardrobeAutoFit.js.map +1 -0
- package/dist/importer/wardrobeCatalog.d.ts +16 -0
- package/dist/importer/wardrobeCatalog.js +409 -0
- package/dist/importer/wardrobeCatalog.js.map +1 -0
- package/dist/importer/wardrobeController.d.ts +49 -0
- package/dist/importer/wardrobeController.js +181 -0
- package/dist/importer/wardrobeController.js.map +1 -0
- package/dist/importer/wardrobeFitter.d.ts +27 -0
- package/dist/importer/wardrobeFitter.js +269 -0
- package/dist/importer/wardrobeFitter.js.map +1 -0
- package/dist/importer/wardrobeWebMcpTools.d.ts +2 -0
- package/dist/importer/wardrobeWebMcpTools.js +198 -0
- package/dist/importer/wardrobeWebMcpTools.js.map +1 -0
- package/dist/index.js +15 -3
- package/dist/junk/DestructibleTarget.js +2 -2
- package/dist/junk/DestructibleTarget.js.map +1 -1
- package/dist/junk/ShardPieces.js +2 -2
- package/dist/junk/ShardPieces.js.map +1 -1
- package/dist/junk/index.d.ts +1 -0
- package/dist/junk/index.js +2 -1
- package/dist/junk/junkImporter.js +2 -2
- package/dist/junk/junkImporter.js.map +1 -1
- package/dist/junk/junkSheetSplitter.d.ts +38 -0
- package/dist/junk/junkSheetSplitter.js +104 -0
- package/dist/junk/junkSheetSplitter.js.map +1 -0
- package/dist/physics/index.d.ts +4 -1
- package/dist/physics/index.js +34 -8
- package/dist/physics/index.js.map +1 -1
- package/dist/physics/nBodyGravity.d.ts +42 -0
- package/dist/physics/nBodyGravity.js +70 -0
- package/dist/physics/nBodyGravity.js.map +1 -0
- package/dist/vite/index.d.ts +2 -12
- package/dist/vite/index.js +8 -77
- package/dist/vite/index.js.map +1 -1
- package/docs/api-reference.md +671 -91
- package/package.json +14 -11
- package/skills/kolmo-engine/SKILL.md +109 -0
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
// src/importer/wardrobeCatalog.ts
|
|
2
|
+
var TRIPO_WARDROBE_BASE_PATH = "/actors/tripo-street-outfit";
|
|
3
|
+
function tripoWardrobeUrl(filename) {
|
|
4
|
+
return `${TRIPO_WARDROBE_BASE_PATH}/${filename.replace(/^\/+/, "")}`;
|
|
5
|
+
}
|
|
6
|
+
var TRIPO_CHARACTER_BASES = Object.freeze([
|
|
7
|
+
{
|
|
8
|
+
id: "tripo_106_modular_street_guy",
|
|
9
|
+
num: 106,
|
|
10
|
+
label: "106 · Modular Street Guy (8-Piece Assembly)",
|
|
11
|
+
slot: "assembly",
|
|
12
|
+
outfitGroup: "male_street",
|
|
13
|
+
filename: "106_modular_character_glb_assembly_8890ac93.glb",
|
|
14
|
+
url: tripoWardrobeUrl("106_modular_character_glb_assembly_8890ac93.glb"),
|
|
15
|
+
naturalHeightM: 1.78
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: "tripo_035_female_body_1",
|
|
19
|
+
num: 35,
|
|
20
|
+
label: "035 · Female Street Base 1",
|
|
21
|
+
slot: "body",
|
|
22
|
+
outfitGroup: "female_street_1",
|
|
23
|
+
filename: "035_rigging_28bfe381.glb",
|
|
24
|
+
url: tripoWardrobeUrl("035_rigging_28bfe381.glb"),
|
|
25
|
+
naturalHeightM: 1.66
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: "tripo_068_female_body_2",
|
|
29
|
+
num: 68,
|
|
30
|
+
label: "068 · Female Street Base 2",
|
|
31
|
+
slot: "body",
|
|
32
|
+
outfitGroup: "female_street_2",
|
|
33
|
+
filename: "068_rigging_1_beed4dff.glb",
|
|
34
|
+
url: tripoWardrobeUrl("068_rigging_1_beed4dff.glb"),
|
|
35
|
+
naturalHeightM: 1.68
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: "tripo_105_male_body",
|
|
39
|
+
num: 105,
|
|
40
|
+
label: "105 · Male Street Base",
|
|
41
|
+
slot: "body",
|
|
42
|
+
outfitGroup: "male_street",
|
|
43
|
+
filename: "105_rigging_2_73bfd929.glb",
|
|
44
|
+
url: tripoWardrobeUrl("105_rigging_2_73bfd929.glb"),
|
|
45
|
+
naturalHeightM: 1.78
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: "tripo_133_bouncer_body",
|
|
49
|
+
num: 133,
|
|
50
|
+
label: "133 · Heavyweight Bouncer Base",
|
|
51
|
+
slot: "body",
|
|
52
|
+
outfitGroup: "heavy_bouncer",
|
|
53
|
+
filename: "133_rigging_3_bb2ca3b5.glb",
|
|
54
|
+
url: tripoWardrobeUrl("133_rigging_3_bb2ca3b5.glb"),
|
|
55
|
+
naturalHeightM: 1.88
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
id: "tripo_190_female_dress_fit",
|
|
59
|
+
num: 190,
|
|
60
|
+
label: "190 · Female Dress & Skirt Fit",
|
|
61
|
+
slot: "dress",
|
|
62
|
+
outfitGroup: "dress_separates",
|
|
63
|
+
filename: "190_model_3885c600.glb",
|
|
64
|
+
url: tripoWardrobeUrl("190_model_3885c600.glb"),
|
|
65
|
+
naturalHeightM: .92
|
|
66
|
+
}
|
|
67
|
+
]);
|
|
68
|
+
var TRIPO_WARDROBE_GARMENTS = Object.freeze([
|
|
69
|
+
{
|
|
70
|
+
id: "garment_103_tank_top",
|
|
71
|
+
num: 103,
|
|
72
|
+
label: "103 · Ribbed White Tank Top",
|
|
73
|
+
slot: "top",
|
|
74
|
+
outfitGroup: "male_street",
|
|
75
|
+
filename: "103_texture_generation_22_dc5b3268.glb",
|
|
76
|
+
url: tripoWardrobeUrl("103_texture_generation_22_dc5b3268.glb")
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: "garment_098_baggy_jeans",
|
|
80
|
+
num: 98,
|
|
81
|
+
label: "098 · Distressed Baggy Jeans",
|
|
82
|
+
slot: "bottom",
|
|
83
|
+
outfitGroup: "male_street",
|
|
84
|
+
filename: "098_texture_generation_20_ad0858d1.glb",
|
|
85
|
+
url: tripoWardrobeUrl("098_texture_generation_20_ad0858d1.glb")
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
id: "garment_097_skate_shoes",
|
|
89
|
+
num: 97,
|
|
90
|
+
label: "097 · Chunky Skate Shoes",
|
|
91
|
+
slot: "shoes",
|
|
92
|
+
outfitGroup: "male_street",
|
|
93
|
+
filename: "097_texture_generation_19_bd5d531c.glb",
|
|
94
|
+
url: tripoWardrobeUrl("097_texture_generation_19_bd5d531c.glb")
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
id: "garment_092_street_belt",
|
|
98
|
+
num: 92,
|
|
99
|
+
label: "092 · Street Leather Belt",
|
|
100
|
+
slot: "belt",
|
|
101
|
+
outfitGroup: "male_street",
|
|
102
|
+
filename: "092_texture_generation_16_899614b7.glb",
|
|
103
|
+
url: tripoWardrobeUrl("092_texture_generation_16_899614b7.glb")
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
id: "garment_095_gold_chain",
|
|
107
|
+
num: 95,
|
|
108
|
+
label: "095 · Cubans Gold Chain",
|
|
109
|
+
slot: "chain",
|
|
110
|
+
outfitGroup: "male_street",
|
|
111
|
+
filename: "095_texture_generation_17_2cf62b09.glb",
|
|
112
|
+
url: tripoWardrobeUrl("095_texture_generation_17_2cf62b09.glb")
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
id: "garment_096_pendant",
|
|
116
|
+
num: 96,
|
|
117
|
+
label: "096 · Chain Medallion Pendant",
|
|
118
|
+
slot: "pendant",
|
|
119
|
+
outfitGroup: "male_street",
|
|
120
|
+
filename: "096_texture_generation_18_3da39e8b.glb",
|
|
121
|
+
url: tripoWardrobeUrl("096_texture_generation_18_3da39e8b.glb")
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
id: "garment_104_hoop_earrings",
|
|
125
|
+
num: 104,
|
|
126
|
+
label: "104 · Gold Hoop Earrings",
|
|
127
|
+
slot: "earrings",
|
|
128
|
+
outfitGroup: "male_street",
|
|
129
|
+
filename: "104_texture_generation_23_c56d0aac.glb",
|
|
130
|
+
url: tripoWardrobeUrl("104_texture_generation_23_c56d0aac.glb")
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
id: "garment_022_street_top_f1",
|
|
134
|
+
num: 22,
|
|
135
|
+
label: "022 · Female Street Crop / Top",
|
|
136
|
+
slot: "top",
|
|
137
|
+
outfitGroup: "female_street_1",
|
|
138
|
+
filename: "022_texture_generation_80f083c5.glb",
|
|
139
|
+
url: tripoWardrobeUrl("022_texture_generation_80f083c5.glb")
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
id: "garment_023_street_jacket_f1",
|
|
143
|
+
num: 23,
|
|
144
|
+
label: "023 · Female Street Outer Layer",
|
|
145
|
+
slot: "top",
|
|
146
|
+
outfitGroup: "female_street_1",
|
|
147
|
+
filename: "023_texture_generation_1_8a10d44d.glb",
|
|
148
|
+
url: tripoWardrobeUrl("023_texture_generation_1_8a10d44d.glb")
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
id: "garment_027_street_piece_f1",
|
|
152
|
+
num: 27,
|
|
153
|
+
label: "027 · Female Street Piece A",
|
|
154
|
+
slot: "accessory",
|
|
155
|
+
outfitGroup: "female_street_1",
|
|
156
|
+
filename: "027_texture_generation_2_89187890.glb",
|
|
157
|
+
url: tripoWardrobeUrl("027_texture_generation_2_89187890.glb")
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
id: "garment_028_waist_belt_f1",
|
|
161
|
+
num: 28,
|
|
162
|
+
label: "028 · Female Waist Belt",
|
|
163
|
+
slot: "belt",
|
|
164
|
+
outfitGroup: "female_street_1",
|
|
165
|
+
filename: "028_texture_generation_3_9c7f559c.glb",
|
|
166
|
+
url: tripoWardrobeUrl("028_texture_generation_3_9c7f559c.glb")
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
id: "garment_029_paired_acc_f1",
|
|
170
|
+
num: 29,
|
|
171
|
+
label: "029 · Female Paired Footwear / Acc",
|
|
172
|
+
slot: "shoes",
|
|
173
|
+
outfitGroup: "female_street_1",
|
|
174
|
+
filename: "029_texture_generation_4_58c1d1c1.glb",
|
|
175
|
+
url: tripoWardrobeUrl("029_texture_generation_4_58c1d1c1.glb")
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
id: "garment_031_street_pants_f1",
|
|
179
|
+
num: 31,
|
|
180
|
+
label: "031 · Female Street Bottoms",
|
|
181
|
+
slot: "bottom",
|
|
182
|
+
outfitGroup: "female_street_1",
|
|
183
|
+
filename: "031_texture_generation_5_24a627e9.glb",
|
|
184
|
+
url: tripoWardrobeUrl("031_texture_generation_5_24a627e9.glb")
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
id: "garment_034_street_boots_f1",
|
|
188
|
+
num: 34,
|
|
189
|
+
label: "034 · Female Street Boots",
|
|
190
|
+
slot: "shoes",
|
|
191
|
+
outfitGroup: "female_street_1",
|
|
192
|
+
filename: "034_texture_generation_7_a272426a.glb",
|
|
193
|
+
url: tripoWardrobeUrl("034_texture_generation_7_a272426a.glb")
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
id: "garment_058_acc_f2",
|
|
197
|
+
num: 58,
|
|
198
|
+
label: "058 · Female 2 Headwear / Shades",
|
|
199
|
+
slot: "accessory",
|
|
200
|
+
outfitGroup: "female_street_2",
|
|
201
|
+
filename: "058_texture_generation_8_89bd75d4.glb",
|
|
202
|
+
url: tripoWardrobeUrl("058_texture_generation_8_89bd75d4.glb")
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
id: "garment_060_shoes_f2",
|
|
206
|
+
num: 60,
|
|
207
|
+
label: "060 · Female 2 Street Sneakers",
|
|
208
|
+
slot: "shoes",
|
|
209
|
+
outfitGroup: "female_street_2",
|
|
210
|
+
filename: "060_texture_generation_9_f1b58be9.glb",
|
|
211
|
+
url: tripoWardrobeUrl("060_texture_generation_9_f1b58be9.glb")
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
id: "garment_062_jacket_f2",
|
|
215
|
+
num: 62,
|
|
216
|
+
label: "062 · Female 2 Street Jacket",
|
|
217
|
+
slot: "top",
|
|
218
|
+
outfitGroup: "female_street_2",
|
|
219
|
+
filename: "062_texture_generation_10_f4781455.glb",
|
|
220
|
+
url: tripoWardrobeUrl("062_texture_generation_10_f4781455.glb")
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
id: "garment_063_jeans_f2",
|
|
224
|
+
num: 63,
|
|
225
|
+
label: "063 · Female 2 Baggy Jeans",
|
|
226
|
+
slot: "bottom",
|
|
227
|
+
outfitGroup: "female_street_2",
|
|
228
|
+
filename: "063_texture_generation_11_c9b8ce18.glb",
|
|
229
|
+
url: tripoWardrobeUrl("063_texture_generation_11_c9b8ce18.glb")
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
id: "garment_064_chain_f2",
|
|
233
|
+
num: 64,
|
|
234
|
+
label: "064 · Female 2 Neck Chain / Hair",
|
|
235
|
+
slot: "chain",
|
|
236
|
+
outfitGroup: "female_street_2",
|
|
237
|
+
filename: "064_texture_generation_12_36dbae29.glb",
|
|
238
|
+
url: tripoWardrobeUrl("064_texture_generation_12_36dbae29.glb")
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
id: "garment_067_top_f2",
|
|
242
|
+
num: 67,
|
|
243
|
+
label: "067 · Female 2 Fitted Top",
|
|
244
|
+
slot: "top",
|
|
245
|
+
outfitGroup: "female_street_2",
|
|
246
|
+
filename: "067_texture_generation_14_7aef2561.glb",
|
|
247
|
+
url: tripoWardrobeUrl("067_texture_generation_14_7aef2561.glb")
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
id: "garment_070_belt_f2",
|
|
251
|
+
num: 70,
|
|
252
|
+
label: "070 · Female 2 Waist Belt",
|
|
253
|
+
slot: "belt",
|
|
254
|
+
outfitGroup: "female_street_2",
|
|
255
|
+
filename: "070_texture_generation_15_b90ace06.glb",
|
|
256
|
+
url: tripoWardrobeUrl("070_texture_generation_15_b90ace06.glb")
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
id: "garment_125_bouncer_shoes",
|
|
260
|
+
num: 125,
|
|
261
|
+
label: "125 · Heavyweight Boots",
|
|
262
|
+
slot: "shoes",
|
|
263
|
+
outfitGroup: "heavy_bouncer",
|
|
264
|
+
filename: "125_texture_generation_24_1789fae5.glb",
|
|
265
|
+
url: tripoWardrobeUrl("125_texture_generation_24_1789fae5.glb")
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
id: "garment_127_bouncer_top",
|
|
269
|
+
num: 127,
|
|
270
|
+
label: "127 · Heavyweight Jacket / Top",
|
|
271
|
+
slot: "top",
|
|
272
|
+
outfitGroup: "heavy_bouncer",
|
|
273
|
+
filename: "127_texture_generation_25_09f512d9.glb",
|
|
274
|
+
url: tripoWardrobeUrl("127_texture_generation_25_09f512d9.glb")
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
id: "garment_129_bouncer_belt",
|
|
278
|
+
num: 129,
|
|
279
|
+
label: "129 · Heavyweight Belt / Shades",
|
|
280
|
+
slot: "belt",
|
|
281
|
+
outfitGroup: "heavy_bouncer",
|
|
282
|
+
filename: "129_texture_generation_26_6465e4d4.glb",
|
|
283
|
+
url: tripoWardrobeUrl("129_texture_generation_26_6465e4d4.glb")
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
id: "garment_130_bouncer_pants",
|
|
287
|
+
num: 130,
|
|
288
|
+
label: "130 · Heavyweight Street Pants",
|
|
289
|
+
slot: "bottom",
|
|
290
|
+
outfitGroup: "heavy_bouncer",
|
|
291
|
+
filename: "130_texture_generation_27_2b50f399.glb",
|
|
292
|
+
url: tripoWardrobeUrl("130_texture_generation_27_2b50f399.glb")
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
id: "garment_131_bouncer_acc",
|
|
296
|
+
num: 131,
|
|
297
|
+
label: "131 · Heavyweight Chain / Vest",
|
|
298
|
+
slot: "accessory",
|
|
299
|
+
outfitGroup: "heavy_bouncer",
|
|
300
|
+
filename: "131_texture_generation_28_1bbc1e6a.glb",
|
|
301
|
+
url: tripoWardrobeUrl("131_texture_generation_28_1bbc1e6a.glb")
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
id: "garment_156_paired_shoes",
|
|
305
|
+
num: 156,
|
|
306
|
+
label: "156 · Street Platform Shoes",
|
|
307
|
+
slot: "shoes",
|
|
308
|
+
outfitGroup: "dress_separates",
|
|
309
|
+
filename: "156_texture_generation_30_b18cad56.glb",
|
|
310
|
+
url: tripoWardrobeUrl("156_texture_generation_30_b18cad56.glb")
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
id: "garment_157_skirt_a",
|
|
314
|
+
num: 157,
|
|
315
|
+
label: "157 · Pleated Street Skirt",
|
|
316
|
+
slot: "bottom",
|
|
317
|
+
outfitGroup: "dress_separates",
|
|
318
|
+
filename: "157_texture_generation_31_b0734e14.glb",
|
|
319
|
+
url: tripoWardrobeUrl("157_texture_generation_31_b0734e14.glb")
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
id: "garment_158_acc_a",
|
|
323
|
+
num: 158,
|
|
324
|
+
label: "158 · Street Collar / Chain",
|
|
325
|
+
slot: "chain",
|
|
326
|
+
outfitGroup: "dress_separates",
|
|
327
|
+
filename: "158_texture_generation_32_3c2bc282.glb",
|
|
328
|
+
url: tripoWardrobeUrl("158_texture_generation_32_3c2bc282.glb")
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
id: "garment_159_jeans_b",
|
|
332
|
+
num: 159,
|
|
333
|
+
label: "159 · Slim Street Jeans",
|
|
334
|
+
slot: "bottom",
|
|
335
|
+
outfitGroup: "dress_separates",
|
|
336
|
+
filename: "159_texture_generation_33_0aa394b0.glb",
|
|
337
|
+
url: tripoWardrobeUrl("159_texture_generation_33_0aa394b0.glb")
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
id: "garment_160_crop_top",
|
|
341
|
+
num: 160,
|
|
342
|
+
label: "160 · Halter Crop Top",
|
|
343
|
+
slot: "top",
|
|
344
|
+
outfitGroup: "dress_separates",
|
|
345
|
+
filename: "160_texture_generation_34_526e3f56.glb",
|
|
346
|
+
url: tripoWardrobeUrl("160_texture_generation_34_526e3f56.glb")
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
id: "garment_162_jacket_b",
|
|
350
|
+
num: 162,
|
|
351
|
+
label: "162 · Cropped Street Jacket",
|
|
352
|
+
slot: "top",
|
|
353
|
+
outfitGroup: "dress_separates",
|
|
354
|
+
filename: "162_texture_generation_35_39a98bf0.glb",
|
|
355
|
+
url: tripoWardrobeUrl("162_texture_generation_35_39a98bf0.glb")
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
id: "garment_180_top_c",
|
|
359
|
+
num: 180,
|
|
360
|
+
label: "180 · Fitted Tank / Camisole",
|
|
361
|
+
slot: "top",
|
|
362
|
+
outfitGroup: "dress_separates",
|
|
363
|
+
filename: "180_texture_generation_36_731d979e.glb",
|
|
364
|
+
url: tripoWardrobeUrl("180_texture_generation_36_731d979e.glb")
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
id: "garment_187_earrings_b",
|
|
368
|
+
num: 187,
|
|
369
|
+
label: "187 · Street Earrings / Shades",
|
|
370
|
+
slot: "earrings",
|
|
371
|
+
outfitGroup: "dress_separates",
|
|
372
|
+
filename: "187_texture_generation_37_a2f7bc7a.glb",
|
|
373
|
+
url: tripoWardrobeUrl("187_texture_generation_37_a2f7bc7a.glb")
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
id: "garment_188_dress_fit",
|
|
377
|
+
num: 188,
|
|
378
|
+
label: "188 · Street Mini Dress",
|
|
379
|
+
slot: "dress",
|
|
380
|
+
outfitGroup: "dress_separates",
|
|
381
|
+
filename: "188_texture_generation_38_2bfcf868.glb",
|
|
382
|
+
url: tripoWardrobeUrl("188_texture_generation_38_2bfcf868.glb")
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
id: "garment_189_skirt_outfit",
|
|
386
|
+
num: 189,
|
|
387
|
+
label: "189 · Two-Piece Skirt Set",
|
|
388
|
+
slot: "dress",
|
|
389
|
+
outfitGroup: "dress_separates",
|
|
390
|
+
filename: "189_texture_generation_39_020b4cec.glb",
|
|
391
|
+
url: tripoWardrobeUrl("189_texture_generation_39_020b4cec.glb")
|
|
392
|
+
}
|
|
393
|
+
]);
|
|
394
|
+
function inferWardrobeSlotFromName(nodeName) {
|
|
395
|
+
const lower = nodeName.toLowerCase();
|
|
396
|
+
if (lower.includes("body") || lower.includes("skin") || lower.includes("base") || lower.includes("rigging")) return "body";
|
|
397
|
+
if (lower.includes("shoe") || lower.includes("boot") || lower.includes("sneaker") || lower.includes("foot")) return "shoes";
|
|
398
|
+
if (lower.includes("jean") || lower.includes("pant") || lower.includes("trouser") || lower.includes("short") || lower.includes("skirt")) return "bottom";
|
|
399
|
+
if (lower.includes("dress")) return "dress";
|
|
400
|
+
if (lower.includes("belt") || lower.includes("waist")) return "belt";
|
|
401
|
+
if (lower.includes("chain") || lower.includes("necklace") || lower.includes("collar")) return "chain";
|
|
402
|
+
if (lower.includes("pendant") || lower.includes("medallion")) return "pendant";
|
|
403
|
+
if (lower.includes("earring") || lower.includes("hoop")) return "earrings";
|
|
404
|
+
if (lower.includes("tank") || lower.includes("top") || lower.includes("shirt") || lower.includes("tee") || lower.includes("jacket") || lower.includes("hoodie") || lower.includes("torso")) return "top";
|
|
405
|
+
return "accessory";
|
|
406
|
+
}
|
|
407
|
+
export { TRIPO_CHARACTER_BASES, TRIPO_WARDROBE_BASE_PATH, TRIPO_WARDROBE_GARMENTS, inferWardrobeSlotFromName, tripoWardrobeUrl };
|
|
408
|
+
|
|
409
|
+
//# sourceMappingURL=wardrobeCatalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wardrobeCatalog.js","names":[],"sources":["../../src/importer/wardrobeCatalog.ts"],"sourcesContent":["export type WardrobeSlot =\n | \"assembly\"\n | \"body\"\n | \"top\"\n | \"bottom\"\n | \"dress\"\n | \"shoes\"\n | \"belt\"\n | \"chain\"\n | \"pendant\"\n | \"earrings\"\n | \"accessory\";\n\nexport interface TripoWardrobeCatalogItem {\n readonly id: string;\n readonly num: number;\n readonly label: string;\n readonly slot: WardrobeSlot;\n readonly outfitGroup: \"male_street\" | \"female_street_1\" | \"female_street_2\" | \"heavy_bouncer\" | \"dress_separates\";\n readonly filename: string;\n readonly url: string;\n readonly naturalHeightM?: number;\n}\n\nexport const TRIPO_WARDROBE_BASE_PATH = \"/actors/tripo-street-outfit\" as const;\n\nexport function tripoWardrobeUrl(filename: string): string {\n return `${TRIPO_WARDROBE_BASE_PATH}/${filename.replace(/^\\/+/, \"\")}`;\n}\n\nexport const TRIPO_CHARACTER_BASES: readonly TripoWardrobeCatalogItem[] = Object.freeze([\n {\n id: \"tripo_106_modular_street_guy\",\n num: 106,\n label: \"106 · Modular Street Guy (8-Piece Assembly)\",\n slot: \"assembly\",\n outfitGroup: \"male_street\",\n filename: \"106_modular_character_glb_assembly_8890ac93.glb\",\n url: tripoWardrobeUrl(\"106_modular_character_glb_assembly_8890ac93.glb\"),\n naturalHeightM: 1.78,\n },\n {\n id: \"tripo_035_female_body_1\",\n num: 35,\n label: \"035 · Female Street Base 1\",\n slot: \"body\",\n outfitGroup: \"female_street_1\",\n filename: \"035_rigging_28bfe381.glb\",\n url: tripoWardrobeUrl(\"035_rigging_28bfe381.glb\"),\n naturalHeightM: 1.66,\n },\n {\n id: \"tripo_068_female_body_2\",\n num: 68,\n label: \"068 · Female Street Base 2\",\n slot: \"body\",\n outfitGroup: \"female_street_2\",\n filename: \"068_rigging_1_beed4dff.glb\",\n url: tripoWardrobeUrl(\"068_rigging_1_beed4dff.glb\"),\n naturalHeightM: 1.68,\n },\n {\n id: \"tripo_105_male_body\",\n num: 105,\n label: \"105 · Male Street Base\",\n slot: \"body\",\n outfitGroup: \"male_street\",\n filename: \"105_rigging_2_73bfd929.glb\",\n url: tripoWardrobeUrl(\"105_rigging_2_73bfd929.glb\"),\n naturalHeightM: 1.78,\n },\n {\n id: \"tripo_133_bouncer_body\",\n num: 133,\n label: \"133 · Heavyweight Bouncer Base\",\n slot: \"body\",\n outfitGroup: \"heavy_bouncer\",\n filename: \"133_rigging_3_bb2ca3b5.glb\",\n url: tripoWardrobeUrl(\"133_rigging_3_bb2ca3b5.glb\"),\n naturalHeightM: 1.88,\n },\n {\n id: \"tripo_190_female_dress_fit\",\n num: 190,\n label: \"190 · Female Dress & Skirt Fit\",\n slot: \"dress\",\n outfitGroup: \"dress_separates\",\n filename: \"190_model_3885c600.glb\",\n url: tripoWardrobeUrl(\"190_model_3885c600.glb\"),\n naturalHeightM: 0.92,\n },\n]);\n\nexport const TRIPO_WARDROBE_GARMENTS: readonly TripoWardrobeCatalogItem[] = Object.freeze([\n // Male Street Separates (#092 - #104)\n { id: \"garment_103_tank_top\", num: 103, label: \"103 · Ribbed White Tank Top\", slot: \"top\", outfitGroup: \"male_street\", filename: \"103_texture_generation_22_dc5b3268.glb\", url: tripoWardrobeUrl(\"103_texture_generation_22_dc5b3268.glb\") },\n { id: \"garment_098_baggy_jeans\", num: 98, label: \"098 · Distressed Baggy Jeans\", slot: \"bottom\", outfitGroup: \"male_street\", filename: \"098_texture_generation_20_ad0858d1.glb\", url: tripoWardrobeUrl(\"098_texture_generation_20_ad0858d1.glb\") },\n { id: \"garment_097_skate_shoes\", num: 97, label: \"097 · Chunky Skate Shoes\", slot: \"shoes\", outfitGroup: \"male_street\", filename: \"097_texture_generation_19_bd5d531c.glb\", url: tripoWardrobeUrl(\"097_texture_generation_19_bd5d531c.glb\") },\n { id: \"garment_092_street_belt\", num: 92, label: \"092 · Street Leather Belt\", slot: \"belt\", outfitGroup: \"male_street\", filename: \"092_texture_generation_16_899614b7.glb\", url: tripoWardrobeUrl(\"092_texture_generation_16_899614b7.glb\") },\n { id: \"garment_095_gold_chain\", num: 95, label: \"095 · Cubans Gold Chain\", slot: \"chain\", outfitGroup: \"male_street\", filename: \"095_texture_generation_17_2cf62b09.glb\", url: tripoWardrobeUrl(\"095_texture_generation_17_2cf62b09.glb\") },\n { id: \"garment_096_pendant\", num: 96, label: \"096 · Chain Medallion Pendant\", slot: \"pendant\", outfitGroup: \"male_street\", filename: \"096_texture_generation_18_3da39e8b.glb\", url: tripoWardrobeUrl(\"096_texture_generation_18_3da39e8b.glb\") },\n { id: \"garment_104_hoop_earrings\", num: 104, label: \"104 · Gold Hoop Earrings\", slot: \"earrings\", outfitGroup: \"male_street\", filename: \"104_texture_generation_23_c56d0aac.glb\", url: tripoWardrobeUrl(\"104_texture_generation_23_c56d0aac.glb\") },\n\n // Female Street 1 Separates (#022 - #034)\n { id: \"garment_022_street_top_f1\", num: 22, label: \"022 · Female Street Crop / Top\", slot: \"top\", outfitGroup: \"female_street_1\", filename: \"022_texture_generation_80f083c5.glb\", url: tripoWardrobeUrl(\"022_texture_generation_80f083c5.glb\") },\n { id: \"garment_023_street_jacket_f1\", num: 23, label: \"023 · Female Street Outer Layer\", slot: \"top\", outfitGroup: \"female_street_1\", filename: \"023_texture_generation_1_8a10d44d.glb\", url: tripoWardrobeUrl(\"023_texture_generation_1_8a10d44d.glb\") },\n { id: \"garment_027_street_piece_f1\", num: 27, label: \"027 · Female Street Piece A\", slot: \"accessory\", outfitGroup: \"female_street_1\", filename: \"027_texture_generation_2_89187890.glb\", url: tripoWardrobeUrl(\"027_texture_generation_2_89187890.glb\") },\n { id: \"garment_028_waist_belt_f1\", num: 28, label: \"028 · Female Waist Belt\", slot: \"belt\", outfitGroup: \"female_street_1\", filename: \"028_texture_generation_3_9c7f559c.glb\", url: tripoWardrobeUrl(\"028_texture_generation_3_9c7f559c.glb\") },\n { id: \"garment_029_paired_acc_f1\", num: 29, label: \"029 · Female Paired Footwear / Acc\", slot: \"shoes\", outfitGroup: \"female_street_1\", filename: \"029_texture_generation_4_58c1d1c1.glb\", url: tripoWardrobeUrl(\"029_texture_generation_4_58c1d1c1.glb\") },\n { id: \"garment_031_street_pants_f1\", num: 31, label: \"031 · Female Street Bottoms\", slot: \"bottom\", outfitGroup: \"female_street_1\", filename: \"031_texture_generation_5_24a627e9.glb\", url: tripoWardrobeUrl(\"031_texture_generation_5_24a627e9.glb\") },\n { id: \"garment_034_street_boots_f1\", num: 34, label: \"034 · Female Street Boots\", slot: \"shoes\", outfitGroup: \"female_street_1\", filename: \"034_texture_generation_7_a272426a.glb\", url: tripoWardrobeUrl(\"034_texture_generation_7_a272426a.glb\") },\n\n // Female Street 2 Separates (#058 - #070)\n { id: \"garment_058_acc_f2\", num: 58, label: \"058 · Female 2 Headwear / Shades\", slot: \"accessory\", outfitGroup: \"female_street_2\", filename: \"058_texture_generation_8_89bd75d4.glb\", url: tripoWardrobeUrl(\"058_texture_generation_8_89bd75d4.glb\") },\n { id: \"garment_060_shoes_f2\", num: 60, label: \"060 · Female 2 Street Sneakers\", slot: \"shoes\", outfitGroup: \"female_street_2\", filename: \"060_texture_generation_9_f1b58be9.glb\", url: tripoWardrobeUrl(\"060_texture_generation_9_f1b58be9.glb\") },\n { id: \"garment_062_jacket_f2\", num: 62, label: \"062 · Female 2 Street Jacket\", slot: \"top\", outfitGroup: \"female_street_2\", filename: \"062_texture_generation_10_f4781455.glb\", url: tripoWardrobeUrl(\"062_texture_generation_10_f4781455.glb\") },\n { id: \"garment_063_jeans_f2\", num: 63, label: \"063 · Female 2 Baggy Jeans\", slot: \"bottom\", outfitGroup: \"female_street_2\", filename: \"063_texture_generation_11_c9b8ce18.glb\", url: tripoWardrobeUrl(\"063_texture_generation_11_c9b8ce18.glb\") },\n { id: \"garment_064_chain_f2\", num: 64, label: \"064 · Female 2 Neck Chain / Hair\", slot: \"chain\", outfitGroup: \"female_street_2\", filename: \"064_texture_generation_12_36dbae29.glb\", url: tripoWardrobeUrl(\"064_texture_generation_12_36dbae29.glb\") },\n { id: \"garment_067_top_f2\", num: 67, label: \"067 · Female 2 Fitted Top\", slot: \"top\", outfitGroup: \"female_street_2\", filename: \"067_texture_generation_14_7aef2561.glb\", url: tripoWardrobeUrl(\"067_texture_generation_14_7aef2561.glb\") },\n { id: \"garment_070_belt_f2\", num: 70, label: \"070 · Female 2 Waist Belt\", slot: \"belt\", outfitGroup: \"female_street_2\", filename: \"070_texture_generation_15_b90ace06.glb\", url: tripoWardrobeUrl(\"070_texture_generation_15_b90ace06.glb\") },\n\n // Heavyweight Bouncer Separates (#125 - #131)\n { id: \"garment_125_bouncer_shoes\", num: 125, label: \"125 · Heavyweight Boots\", slot: \"shoes\", outfitGroup: \"heavy_bouncer\", filename: \"125_texture_generation_24_1789fae5.glb\", url: tripoWardrobeUrl(\"125_texture_generation_24_1789fae5.glb\") },\n { id: \"garment_127_bouncer_top\", num: 127, label: \"127 · Heavyweight Jacket / Top\", slot: \"top\", outfitGroup: \"heavy_bouncer\", filename: \"127_texture_generation_25_09f512d9.glb\", url: tripoWardrobeUrl(\"127_texture_generation_25_09f512d9.glb\") },\n { id: \"garment_129_bouncer_belt\", num: 129, label: \"129 · Heavyweight Belt / Shades\", slot: \"belt\", outfitGroup: \"heavy_bouncer\", filename: \"129_texture_generation_26_6465e4d4.glb\", url: tripoWardrobeUrl(\"129_texture_generation_26_6465e4d4.glb\") },\n { id: \"garment_130_bouncer_pants\", num: 130, label: \"130 · Heavyweight Street Pants\", slot: \"bottom\", outfitGroup: \"heavy_bouncer\", filename: \"130_texture_generation_27_2b50f399.glb\", url: tripoWardrobeUrl(\"130_texture_generation_27_2b50f399.glb\") },\n { id: \"garment_131_bouncer_acc\", num: 131, label: \"131 · Heavyweight Chain / Vest\", slot: \"accessory\", outfitGroup: \"heavy_bouncer\", filename: \"131_texture_generation_28_1bbc1e6a.glb\", url: tripoWardrobeUrl(\"131_texture_generation_28_1bbc1e6a.glb\") },\n\n // Extra Dresses, Skirts & Separates (#156 - #189)\n { id: \"garment_156_paired_shoes\", num: 156, label: \"156 · Street Platform Shoes\", slot: \"shoes\", outfitGroup: \"dress_separates\", filename: \"156_texture_generation_30_b18cad56.glb\", url: tripoWardrobeUrl(\"156_texture_generation_30_b18cad56.glb\") },\n { id: \"garment_157_skirt_a\", num: 157, label: \"157 · Pleated Street Skirt\", slot: \"bottom\", outfitGroup: \"dress_separates\", filename: \"157_texture_generation_31_b0734e14.glb\", url: tripoWardrobeUrl(\"157_texture_generation_31_b0734e14.glb\") },\n { id: \"garment_158_acc_a\", num: 158, label: \"158 · Street Collar / Chain\", slot: \"chain\", outfitGroup: \"dress_separates\", filename: \"158_texture_generation_32_3c2bc282.glb\", url: tripoWardrobeUrl(\"158_texture_generation_32_3c2bc282.glb\") },\n { id: \"garment_159_jeans_b\", num: 159, label: \"159 · Slim Street Jeans\", slot: \"bottom\", outfitGroup: \"dress_separates\", filename: \"159_texture_generation_33_0aa394b0.glb\", url: tripoWardrobeUrl(\"159_texture_generation_33_0aa394b0.glb\") },\n { id: \"garment_160_crop_top\", num: 160, label: \"160 · Halter Crop Top\", slot: \"top\", outfitGroup: \"dress_separates\", filename: \"160_texture_generation_34_526e3f56.glb\", url: tripoWardrobeUrl(\"160_texture_generation_34_526e3f56.glb\") },\n { id: \"garment_162_jacket_b\", num: 162, label: \"162 · Cropped Street Jacket\", slot: \"top\", outfitGroup: \"dress_separates\", filename: \"162_texture_generation_35_39a98bf0.glb\", url: tripoWardrobeUrl(\"162_texture_generation_35_39a98bf0.glb\") },\n { id: \"garment_180_top_c\", num: 180, label: \"180 · Fitted Tank / Camisole\", slot: \"top\", outfitGroup: \"dress_separates\", filename: \"180_texture_generation_36_731d979e.glb\", url: tripoWardrobeUrl(\"180_texture_generation_36_731d979e.glb\") },\n { id: \"garment_187_earrings_b\", num: 187, label: \"187 · Street Earrings / Shades\", slot: \"earrings\", outfitGroup: \"dress_separates\", filename: \"187_texture_generation_37_a2f7bc7a.glb\", url: tripoWardrobeUrl(\"187_texture_generation_37_a2f7bc7a.glb\") },\n { id: \"garment_188_dress_fit\", num: 188, label: \"188 · Street Mini Dress\", slot: \"dress\", outfitGroup: \"dress_separates\", filename: \"188_texture_generation_38_2bfcf868.glb\", url: tripoWardrobeUrl(\"188_texture_generation_38_2bfcf868.glb\") },\n { id: \"garment_189_skirt_outfit\", num: 189, label: \"189 · Two-Piece Skirt Set\", slot: \"dress\", outfitGroup: \"dress_separates\", filename: \"189_texture_generation_39_020b4cec.glb\", url: tripoWardrobeUrl(\"189_texture_generation_39_020b4cec.glb\") },\n]);\n\nexport function inferWardrobeSlotFromName(nodeName: string): WardrobeSlot {\n const lower = nodeName.toLowerCase();\n if (lower.includes(\"body\") || lower.includes(\"skin\") || lower.includes(\"base\") || lower.includes(\"rigging\")) return \"body\";\n if (lower.includes(\"shoe\") || lower.includes(\"boot\") || lower.includes(\"sneaker\") || lower.includes(\"foot\")) return \"shoes\";\n if (lower.includes(\"jean\") || lower.includes(\"pant\") || lower.includes(\"trouser\") || lower.includes(\"short\") || lower.includes(\"skirt\")) return \"bottom\";\n if (lower.includes(\"dress\")) return \"dress\";\n if (lower.includes(\"belt\") || lower.includes(\"waist\")) return \"belt\";\n if (lower.includes(\"chain\") || lower.includes(\"necklace\") || lower.includes(\"collar\")) return \"chain\";\n if (lower.includes(\"pendant\") || lower.includes(\"medallion\")) return \"pendant\";\n if (lower.includes(\"earring\") || lower.includes(\"hoop\")) return \"earrings\";\n if (lower.includes(\"tank\") || lower.includes(\"top\") || lower.includes(\"shirt\") || lower.includes(\"tee\") || lower.includes(\"jacket\") || lower.includes(\"hoodie\") || lower.includes(\"torso\")) return \"top\";\n return \"accessory\";\n}\n"],"mappings":";AAwBA,IAAa,2BAA2B;AAExC,SAAgB,iBAAiB,UAA0B;CACvD,OAAO,GAAG,yBAAyB,GAAG,SAAS,QAAQ,QAAQ,EAAE;AACrE;AAEA,IAAa,wBAA6D,OAAO,OAAO;CACpF;EACI,IAAI;EACJ,KAAK;EACL,OAAO;EACP,MAAM;EACN,aAAa;EACb,UAAU;EACV,KAAK,iBAAiB,iDAAiD;EACvE,gBAAgB;CACpB;CACA;EACI,IAAI;EACJ,KAAK;EACL,OAAO;EACP,MAAM;EACN,aAAa;EACb,UAAU;EACV,KAAK,iBAAiB,0BAA0B;EAChD,gBAAgB;CACpB;C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AM,KAAK,MAAM,SAAS,SAAS,GAAG,OAAO;CACpH,IAAI,MAAM,SAAS,MAAM,KAAK,MAAM,SAAS,MAAM,KAAK,MAAM,SAAS,SAAS,KAAK,MAAM,SAAS,MAAM,GAAG,OAAO;CACpH,IAAI,MAAM,SAAS,MAAM,KAAK,MAAM,SAAS,MAAM,KAAK,MAAM,SAAS,SAAS,KAAK,MAAM,SAAS,OAAO,KAAK,MAAM,SAAS,OAAO,GAAG,OAAO;CAChJ,IAAI,MAAM,SAAS,OAAO,GAAG,OAAO;CACpC,IAAI,MAAM,SAAS,MAAM,KAAK,MAAM,SAAS,OAAO,GAAG,OAAO;CAC9D,IAAI,MAAM,SAAS,OAAO,KAAK,MAAM,SAAS,UAAU,KAAK,MAAM,SAAS,QAAQ,GAAG,OAAO;CAC9F,IAAI,MAAM,SAAS,SAAS,KAAK,MAAM,SAAS,WAAW,GAAG,OAAO;CACrE,IAAI,MAAM,SAAS,SAAS,KAAK,MAAM,SAAS,MAAM,GAAG,OAAO;CAChE,IAAI,MAAM,SAAS,MAAM,KAAK,MAAM,SAAS,KAAK,KAAK,MAAM,SAAS,OAAO,KAAK,MAAM,SAAS,KAAK,KAAK,MAAM,SAAS,QAAQ,KAAK,MAAM,SAAS,QAAQ,KAAK,MAAM,SAAS,OAAO,GAAG,OAAO;CACnM,OAAO;AACX"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as THREE from "three";
|
|
2
|
+
import { type WardrobeSlot } from "./wardrobeCatalog.js";
|
|
3
|
+
import { type WardrobeFitPatch, type WardrobePieceState } from "./wardrobeFitter.js";
|
|
4
|
+
import type { OrientTurns } from "./meshIslands.js";
|
|
5
|
+
export declare function detectCharacterDefaultTurns(scene: THREE.Object3D): OrientTurns;
|
|
6
|
+
export declare function resolveWardrobeCatalogUrl(urlOrId: string): {
|
|
7
|
+
url: string;
|
|
8
|
+
label: string;
|
|
9
|
+
slot?: WardrobeSlot;
|
|
10
|
+
naturalHeightM?: number;
|
|
11
|
+
};
|
|
12
|
+
export declare function loadGlbSceneFromUrl(url: string): Promise<THREE.Group>;
|
|
13
|
+
export interface WardrobeActionHost {
|
|
14
|
+
readonly workingScene: THREE.Group | null;
|
|
15
|
+
readonly bumpVersion: () => void;
|
|
16
|
+
readonly setStatusNote?: (msg: string) => void;
|
|
17
|
+
readonly loadCharacterScene?: (scene: THREE.Group, label: string, turns: OrientTurns, heightM?: number) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare function loadWardrobeBaseIntoHost(host: WardrobeActionHost, urlOrId: string, explicitHeightM?: number): Promise<{
|
|
20
|
+
ok: boolean;
|
|
21
|
+
label: string;
|
|
22
|
+
heightM: number;
|
|
23
|
+
pieces: WardrobePieceState[];
|
|
24
|
+
}>;
|
|
25
|
+
export declare function layerWardrobeGarmentIntoHost(host: WardrobeActionHost, urlOrId: string, explicitSlot?: WardrobeSlot): Promise<{
|
|
26
|
+
ok: boolean;
|
|
27
|
+
addedLabel: string;
|
|
28
|
+
slot: WardrobeSlot;
|
|
29
|
+
pieces: WardrobePieceState[];
|
|
30
|
+
}>;
|
|
31
|
+
export declare function removeWardrobePieceFromHost(host: WardrobeActionHost, pieceName: string): {
|
|
32
|
+
ok: boolean;
|
|
33
|
+
removed: boolean;
|
|
34
|
+
pieces: WardrobePieceState[];
|
|
35
|
+
};
|
|
36
|
+
export declare function executeWardrobeFitOnHost(host: WardrobeActionHost, input: {
|
|
37
|
+
piece?: string;
|
|
38
|
+
action?: "patch" | "auto_tuck" | "auto_shoes" | "auto_all" | "bind_skeleton" | "reset";
|
|
39
|
+
patch?: WardrobeFitPatch;
|
|
40
|
+
clearanceMeters?: number;
|
|
41
|
+
}): {
|
|
42
|
+
ok: boolean;
|
|
43
|
+
action: string;
|
|
44
|
+
pieceState?: WardrobePieceState | null;
|
|
45
|
+
tuckedVertices?: number;
|
|
46
|
+
shoesFitted?: number;
|
|
47
|
+
boundMeshes?: number;
|
|
48
|
+
pieces: WardrobePieceState[];
|
|
49
|
+
};
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { TRIPO_CHARACTER_BASES, TRIPO_WARDROBE_GARMENTS, inferWardrobeSlotFromName, tripoWardrobeUrl } from "./wardrobeCatalog.js";
|
|
2
|
+
import { autoFitWardrobeShoes, bindWardrobeToHumanoidSkeleton, layerGarmentOntoCharacterScene, tuckInnerBodyUnderClothing } from "./wardrobeAutoFit.js";
|
|
3
|
+
import { applyWardrobePiecePatch, listWardrobePieces, resetWardrobePiece } from "./wardrobeFitter.js";
|
|
4
|
+
import * as THREE from "three";
|
|
5
|
+
import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader.js";
|
|
6
|
+
// src/importer/wardrobeController.ts
|
|
7
|
+
function detectCharacterDefaultTurns(scene) {
|
|
8
|
+
scene.updateMatrixWorld(true);
|
|
9
|
+
const box = new THREE.Box3().setFromObject(scene);
|
|
10
|
+
if (box.isEmpty()) return [
|
|
11
|
+
0,
|
|
12
|
+
0,
|
|
13
|
+
0
|
|
14
|
+
];
|
|
15
|
+
const size = box.getSize(new THREE.Vector3());
|
|
16
|
+
if (size.z > size.x * 1.55) return [
|
|
17
|
+
0,
|
|
18
|
+
3,
|
|
19
|
+
0
|
|
20
|
+
];
|
|
21
|
+
return [
|
|
22
|
+
0,
|
|
23
|
+
0,
|
|
24
|
+
0
|
|
25
|
+
];
|
|
26
|
+
}
|
|
27
|
+
function resolveWardrobeCatalogUrl(urlOrId) {
|
|
28
|
+
const trimmed = urlOrId.trim();
|
|
29
|
+
const matched = [...TRIPO_CHARACTER_BASES, ...TRIPO_WARDROBE_GARMENTS].find((item) => item.id === trimmed || item.filename === trimmed || item.url === trimmed || String(item.num) === trimmed);
|
|
30
|
+
if (matched) return {
|
|
31
|
+
url: matched.url,
|
|
32
|
+
label: matched.id,
|
|
33
|
+
slot: matched.slot,
|
|
34
|
+
naturalHeightM: matched.naturalHeightM
|
|
35
|
+
};
|
|
36
|
+
const url = /^https?:\/\//i.test(trimmed) || trimmed.startsWith("/") ? trimmed : tripoWardrobeUrl(trimmed);
|
|
37
|
+
const label = trimmed.split("/").pop()?.replace(/\.glb$/i, "") || "wardrobe_piece";
|
|
38
|
+
return {
|
|
39
|
+
url,
|
|
40
|
+
label,
|
|
41
|
+
slot: inferWardrobeSlotFromName(label)
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function loadGlbSceneFromUrl(url) {
|
|
45
|
+
return new Promise((resolve, reject) => {
|
|
46
|
+
new GLTFLoader().load(url, (gltf) => resolve(gltf.scene), void 0, (err) => reject(err instanceof Error ? err : /* @__PURE__ */ new Error(`Failed to load ${url}`)));
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
async function loadWardrobeBaseIntoHost(host, urlOrId, explicitHeightM) {
|
|
50
|
+
const resolved = resolveWardrobeCatalogUrl(urlOrId);
|
|
51
|
+
const scene = await loadGlbSceneFromUrl(resolved.url);
|
|
52
|
+
const turns = detectCharacterDefaultTurns(scene);
|
|
53
|
+
const heightM = explicitHeightM ?? resolved.naturalHeightM ?? 1.76;
|
|
54
|
+
host.loadCharacterScene?.(scene, resolved.label, turns, heightM);
|
|
55
|
+
host.setStatusNote?.(`Loaded ${resolved.label} (${heightM.toFixed(2)} m).`);
|
|
56
|
+
return {
|
|
57
|
+
ok: true,
|
|
58
|
+
label: resolved.label,
|
|
59
|
+
heightM,
|
|
60
|
+
pieces: listWardrobePieces(host.workingScene ?? scene)
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
async function layerWardrobeGarmentIntoHost(host, urlOrId, explicitSlot) {
|
|
64
|
+
if (!host.workingScene) throw new Error("No active character scene to layer garment onto.");
|
|
65
|
+
const resolved = resolveWardrobeCatalogUrl(urlOrId);
|
|
66
|
+
const garmentScene = await loadGlbSceneFromUrl(resolved.url);
|
|
67
|
+
const slot = explicitSlot ?? resolved.slot ?? inferWardrobeSlotFromName(resolved.label);
|
|
68
|
+
const pieces = layerGarmentOntoCharacterScene(host.workingScene, garmentScene, resolved.label, slot);
|
|
69
|
+
host.bumpVersion();
|
|
70
|
+
host.setStatusNote?.(`Layered ${resolved.label} (${slot}) onto character.`);
|
|
71
|
+
return {
|
|
72
|
+
ok: true,
|
|
73
|
+
addedLabel: resolved.label,
|
|
74
|
+
slot,
|
|
75
|
+
pieces
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
function removeWardrobePieceFromHost(host, pieceName) {
|
|
79
|
+
if (!host.workingScene) return {
|
|
80
|
+
ok: false,
|
|
81
|
+
removed: false,
|
|
82
|
+
pieces: []
|
|
83
|
+
};
|
|
84
|
+
const clean = pieceName.trim().toLowerCase();
|
|
85
|
+
let target = null;
|
|
86
|
+
host.workingScene.traverse((obj) => {
|
|
87
|
+
if (!target && obj !== host.workingScene && (obj.name === pieceName || obj.name.toLowerCase() === clean)) target = obj;
|
|
88
|
+
});
|
|
89
|
+
if (!target) return {
|
|
90
|
+
ok: false,
|
|
91
|
+
removed: false,
|
|
92
|
+
pieces: listWardrobePieces(host.workingScene)
|
|
93
|
+
};
|
|
94
|
+
const node = target;
|
|
95
|
+
node.parent?.remove(node);
|
|
96
|
+
node.geometry?.dispose?.();
|
|
97
|
+
host.bumpVersion();
|
|
98
|
+
host.setStatusNote?.(`Removed layer ${node.name}.`);
|
|
99
|
+
return {
|
|
100
|
+
ok: true,
|
|
101
|
+
removed: true,
|
|
102
|
+
pieces: listWardrobePieces(host.workingScene)
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
function executeWardrobeFitOnHost(host, input) {
|
|
106
|
+
const root = host.workingScene;
|
|
107
|
+
if (!root) throw new Error("No active character scene in importer.");
|
|
108
|
+
const action = input.action ?? "patch";
|
|
109
|
+
if (action === "reset") {
|
|
110
|
+
resetWardrobePiece(root, input.piece);
|
|
111
|
+
host.bumpVersion();
|
|
112
|
+
host.setStatusNote?.(input.piece ? `Reset ${input.piece}.` : "Reset all wardrobe pieces.");
|
|
113
|
+
return {
|
|
114
|
+
ok: true,
|
|
115
|
+
action,
|
|
116
|
+
pieces: listWardrobePieces(root)
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
if (action === "auto_tuck") {
|
|
120
|
+
const res = tuckInnerBodyUnderClothing(root, input.clearanceMeters ?? .004);
|
|
121
|
+
host.bumpVersion();
|
|
122
|
+
host.setStatusNote?.(`Tucked ${res.tuckedVertices} inner body vertices behind ${res.garmentsChecked} garment(s).`);
|
|
123
|
+
return {
|
|
124
|
+
ok: true,
|
|
125
|
+
action,
|
|
126
|
+
tuckedVertices: res.tuckedVertices,
|
|
127
|
+
pieces: listWardrobePieces(root)
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
if (action === "auto_shoes") {
|
|
131
|
+
const res = autoFitWardrobeShoes(root);
|
|
132
|
+
host.bumpVersion();
|
|
133
|
+
host.setStatusNote?.(`Fitted ${res.fitted} footwear mesh(es) · scale ${res.scaleApplied.toFixed(2)}x.`);
|
|
134
|
+
return {
|
|
135
|
+
ok: true,
|
|
136
|
+
action,
|
|
137
|
+
shoesFitted: res.fitted,
|
|
138
|
+
pieces: listWardrobePieces(root)
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
if (action === "auto_all") {
|
|
142
|
+
const shoes = autoFitWardrobeShoes(root);
|
|
143
|
+
const tuck = tuckInnerBodyUnderClothing(root, input.clearanceMeters ?? .004);
|
|
144
|
+
const rig = bindWardrobeToHumanoidSkeleton(root);
|
|
145
|
+
host.bumpVersion();
|
|
146
|
+
host.setStatusNote?.(`Auto-fit complete: ${shoes.fitted} shoe(s), ${tuck.tuckedVertices} verts tucked, ${rig.boundMeshes} mesh(es) skinned.`);
|
|
147
|
+
return {
|
|
148
|
+
ok: true,
|
|
149
|
+
action,
|
|
150
|
+
shoesFitted: shoes.fitted,
|
|
151
|
+
tuckedVertices: tuck.tuckedVertices,
|
|
152
|
+
boundMeshes: rig.boundMeshes,
|
|
153
|
+
pieces: listWardrobePieces(root)
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
if (action === "bind_skeleton") {
|
|
157
|
+
const rig = bindWardrobeToHumanoidSkeleton(root);
|
|
158
|
+
host.bumpVersion();
|
|
159
|
+
host.setStatusNote?.(`Bound ${rig.boundMeshes} mesh(es) to ${rig.boneCount}-bone humanoid skeleton.`);
|
|
160
|
+
return {
|
|
161
|
+
ok: true,
|
|
162
|
+
action,
|
|
163
|
+
boundMeshes: rig.boundMeshes,
|
|
164
|
+
pieces: listWardrobePieces(root)
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
if (!input.piece) throw new Error("Piece name is required for wardrobe patch.");
|
|
168
|
+
const pieceState = applyWardrobePiecePatch(root, input.piece, input.patch ?? {});
|
|
169
|
+
if (!pieceState) throw new Error(`Wardrobe piece "${input.piece}" not found.`);
|
|
170
|
+
host.bumpVersion();
|
|
171
|
+
host.setStatusNote?.(`Updated ${pieceState.name}.`);
|
|
172
|
+
return {
|
|
173
|
+
ok: true,
|
|
174
|
+
action,
|
|
175
|
+
pieceState,
|
|
176
|
+
pieces: listWardrobePieces(root)
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
export { detectCharacterDefaultTurns, executeWardrobeFitOnHost, layerWardrobeGarmentIntoHost, loadGlbSceneFromUrl, loadWardrobeBaseIntoHost, removeWardrobePieceFromHost, resolveWardrobeCatalogUrl };
|
|
180
|
+
|
|
181
|
+
//# sourceMappingURL=wardrobeController.js.map
|