All files / types clothing.ts

0% Statements 0/0
0% Branches 0/0
0% Functions 0/0
0% Lines 0/0

Press n or j to go to the next uncovered block, b, p or k for the previous block.

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 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
/**
 * Clothing system types for fighter archetypes
 *
 * **Korean**: 의류 시스템 타입 (Clothing System Types)
 *
 * Defines clothing items, materials, and configurations for each of the five
 * player archetypes. Clothing provides visual distinction, cultural context,
 * and reinforces archetype identity while maintaining the cyberpunk Korean aesthetic.
 *
 * @module types/clothing
 * @category Type Definitions
 * @korean 의류타입
 */
 
import type { PlayerArchetype, PhysicalAttributes } from "./common";
import type { Bone } from "./skeletal";
 
/**
 * Clothing item type categories
 *
 * @public
 * @category Clothing
 * @korean 의류종류
 */
export type ClothingType =
  | "torso" // Upper body garment (shirt, jacket, gi)
  | "pants" // Lower body garment
  | "belt" // Waist accessory (martial arts belt, tactical belt)
  | "boots" // Footwear
  | "gloves" // Hand protection
  | "headgear" // Headwear (hat, mask, helmet)
  | "vest" // Protective vest or armor
  | "accessory"; // Additional accessories (pouches, holsters)
 
/**
 * Clothing material types affecting appearance
 *
 * @public
 * @category Clothing
 * @korean 소재
 */
export type ClothingMaterial =
  | "fabric" // Traditional cloth (dobok, hanbok)
  | "leather" // Leather gear
  | "tactical" // Modern tactical fabric
  | "synthetic" // Synthetic materials
  | "armored" // Armored plating
  | "cybernetic"; // Tech-enhanced materials
 
/**
 * Clothing fit style
 *
 * @public
 * @category Clothing
 * @korean 착용스타일
 */
export type ClothingFit = "tight" | "fitted" | "loose" | "oversized";
 
/**
 * Individual clothing item configuration
 *
 * @public
 * @category Clothing
 * @korean 의류아이템
 */
export interface ClothingItem {
  /**
   * Unique identifier for the clothing item
   * @korean ID
   */
  readonly id: string;
 
  /**
   * Korean name for the clothing item
   * @korean 한글이름
   */
  readonly nameKorean: string;
 
  /**
   * English name for the clothing item
   * @korean 영문이름
   */
  readonly nameEnglish: string;
 
  /**
   * Type of clothing item
   * @korean 종류
   */
  readonly type: ClothingType;
 
  /**
   * Material of the clothing
   * @korean 소재
   */
  readonly material: ClothingMaterial;
 
  /**
   * Fit style of the clothing
   * @korean 착용스타일
   */
  readonly fit: ClothingFit;
 
  /**
   * Primary color (hex number)
   * @korean 기본색상
   */
  readonly colorPrimary: number;
 
  /**
   * Secondary/accent color (hex number)
   * @korean 강조색상
   */
  readonly colorSecondary?: number;
 
  /**
   * Emissive color for glowing effects (hex number)
   * @korean 발광색상
   */
  readonly colorEmissive?: number;
 
  /**
   * Emissive intensity (0-1)
   * @korean 발광강도
   */
  readonly emissiveIntensity?: number;
 
  /**
   * Metalness (0-1)
   * @korean 금속성
   */
  readonly metalness?: number;
 
  /**
   * Roughness (0-1)
   * @korean 거칠기
   */
  readonly roughness?: number;
 
  /**
   * Scale multiplier for body proportions
   * @korean 크기배율
   */
  readonly scaleMultiplier?: number;
 
  /**
   * Bones to attach this clothing to
   * @korean 부착뼈
   */
  readonly attachedBones: string[];
 
  /**
   * Whether clothing should cast shadows
   * @korean 그림자표시
   */
  readonly castShadow?: boolean;
 
  /**
   * Whether clothing should receive shadows
   * @korean 그림자수신
   */
  readonly receiveShadow?: boolean;
}
 
/**
 * Complete clothing set for an archetype
 *
 * @public
 * @category Clothing
 * @korean 의류세트
 */
export interface ClothingSet {
  /**
   * Archetype this clothing set belongs to
   * @korean 원형
   */
  readonly archetype: PlayerArchetype;
 
  /**
   * Korean name for the clothing set
   * @korean 한글이름
   */
  readonly nameKorean: string;
 
  /**
   * English name for the clothing set
   * @korean 영문이름
   */
  readonly nameEnglish: string;
 
  /**
   * Description in Korean
   * @korean 한글설명
   */
  readonly descriptionKorean: string;
 
  /**
   * Description in English
   * @korean 영문설명
   */
  readonly descriptionEnglish: string;
 
  /**
   * Clothing items in this set
   * @korean 의류아이템들
   */
  readonly items: readonly ClothingItem[];
 
  /**
   * Overall theme colors for the set
   * @korean 테마색상
   */
  readonly themeColors: {
    readonly primary: number;
    readonly secondary: number;
    readonly accent: number;
  };
}
 
/**
 * LOD (Level of Detail) settings for performance optimization
 *
 * @public
 * @category Clothing
 * @korean LOD설정
 */
export interface ClothingLODSettings {
  /**
   * Enable LOD system
   * @korean LOD활성화
   */
  readonly enableLOD: boolean;
  
  /**
   * Distance thresholds for LOD levels [near, medium, far]
   * @korean 거리임계값
   */
  readonly distances: readonly [number, number, number];
  
  /**
   * Segments for high detail (close viewing)
   * @korean 고품질세그먼트
   */
  readonly highDetailSegments: number;
  
  /**
   * Segments for medium detail
   * @korean 중품질세그먼트
   */
  readonly mediumDetailSegments: number;
  
  /**
   * Segments for low detail (far viewing)
   * @korean 저품질세그먼트
   */
  readonly lowDetailSegments: number;
}
 
/**
 * Material preset configurations for common clothing types
 *
 * @public
 * @category Clothing
 * @korean 재료프리셋
 */
export interface MaterialPreset {
  /**
   * Metalness (0-1)
   * @korean 금속성
   */
  readonly metalness: number;
  
  /**
   * Roughness (0-1)
   * @korean 거칠기
   */
  readonly roughness: number;
  
  /**
   * Emissive intensity (0-1)
   * @korean 발광강도
   */
  readonly emissiveIntensity?: number;
}
 
/**
 * Props for ClothingSystem component
 *
 * @public
 * @category Component Props
 * @korean 의류시스템속성
 */
export interface ClothingSystemProps {
  /**
   * Player archetype to render clothing for
   * @korean 원형
   */
  readonly archetype: PlayerArchetype;
 
  /**
   * Physical attributes for scaling clothing
   * @korean 신체속성
   */
  readonly physicalAttributes: PhysicalAttributes;
 
  /**
   * Bone map from skeletal rig for attachment
   * @korean 뼈맵
   */
  readonly boneMap: Map<string, Bone>;
 
  /**
   * Overall scale multiplier
   * @korean 크기배율
   */
  readonly scale?: number;
 
  /**
   * Whether to show clothing (can disable for debug)
   * @korean 표시여부
   */
  readonly visible?: boolean;
  
  /**
   * Optional LOD settings for performance optimization
   * @korean LOD설정
   */
  readonly lodSettings?: ClothingLODSettings;
}
 
/**
 * Props for individual clothing item component
 *
 * @public
 * @category Component Props
 * @korean 의류아이템속성
 */
export interface ClothingItemProps {
  /**
   * Clothing item configuration
   * @korean 의류아이템
   */
  readonly item: ClothingItem;
 
  /**
   * Physical attributes for scaling
   * @korean 신체속성
   */
  readonly physicalAttributes: PhysicalAttributes;
 
  /**
   * Overall scale multiplier
   * @korean 크기배율
   */
  readonly scale?: number;
}