All files / systems/animation/builders AnimationFactoryPresets.ts

95.04% Statements 115/121
91.3% Branches 42/46
100% Functions 9/9
95.04% Lines 115/121

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 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710                                                                49x                                                                                                                                                               208x   208x           208x 416x 198x   218x         208x   52x       52x 52x 52x 52x     51x       51x 51x 51x 51x     51x       51x 51x 51x 51x     1x       1x 1x 1x 1x     1x       1x 1x 1x 1x     50x       50x 50x 50x 50x     1x       1x 1x 1x 1x     1x       1x 1x 1x 1x       208x         208x                                                                                               204x   204x         204x     102x             102x     50x         50x     50x         50x     1x       1x       1x                 1x       204x   204x                                       49x                                         13x   13x         13x   4x           4x                       9x 9x     13x                                                           16x   16x         16x   4x 2x 2x 1x     1x   4x     3x 3x     3x 3x     3x 3x     3x 3x     16x   16x                                         1x                                                                               149x 149x   149x           149x 398x   149x       149x   149x       149x   50x     50x             50x 50x                 398x 249x         149x   149x                     49x                                                                           49x                                                                           49x                                                                 8x                        
/**
 * Animation Factory Presets
 *
 * Reusable factory functions to reduce code duplication across animation files.
 * Provides preset configurations for common animation patterns.
 *
 * 애니메이션 팩토리 프리셋 - 코드 중복 감소를 위한 재사용 가능한 팩토리 함수
 *
 * @module systems/animation/builders/AnimationFactoryPresets
 * @korean 애니메이션팩토리프리셋
 */
 
import type { TrigramStance } from "../../../types/common";
import type { SkeletalAnimation } from "../../../types/skeletal";
import type { LeadFoot } from "../utils/AnimationMirror";
import {
  getAnimationForStance,
  mirrorAnimation,
} from "../utils/AnimationMirror";
import {
  MartialArtsAnimationBuilder,
  TECHNIQUE_TIMING,
} from "./MartialArtsAnimationBuilder";
 
// ═══════════════════════════════════════════════════════════════════════════
// TIMING PRESETS (타이밍 프리셋)
// ═══════════════════════════════════════════════════════════════════════════
 
/**
 * Standard timing configurations for different technique speeds
 * 다양한 기술 속도에 대한 표준 타이밍 구성
 */
export const TIMING_PRESETS = {
  /** Fast techniques (550ms) - Jabs, quick strikes */
  FAST: TECHNIQUE_TIMING.FAST,
  /** Fast-Medium techniques (600ms) - Low kicks, lead hooks */
  FAST_MEDIUM: TECHNIQUE_TIMING.FAST_MEDIUM,
  /** Medium-Light techniques (700ms) - Front kicks, uppercuts */
  MEDIUM_LIGHT: TECHNIQUE_TIMING.MEDIUM_LIGHT,
  /** Medium techniques (730ms) - Crosses, roundhouse kicks */
  MEDIUM: TECHNIQUE_TIMING.MEDIUM,
  /** Medium-Heavy techniques (750ms) - Side kicks */
  MEDIUM_HEAVY: TECHNIQUE_TIMING.MEDIUM_HEAVY,
  /** Heavy-Light techniques (800ms) - Spinning kicks */
  HEAVY_LIGHT: TECHNIQUE_TIMING.HEAVY_LIGHT,
  /** Heavy-Medium techniques (850ms) - Crescent kicks */
  HEAVY_MEDIUM: TECHNIQUE_TIMING.HEAVY_MEDIUM,
  /** Heavy techniques (1000ms) - Jumping techniques */
  HEAVY: TECHNIQUE_TIMING.HEAVY,
} as const;
 
// ═══════════════════════════════════════════════════════════════════════════
// KICK FACTORY (발차기 팩토리)
// ═══════════════════════════════════════════════════════════════════════════
 
/**
 * Configuration for kick animation creation
 * 발차기 애니메이션 생성 설정
 */
/**
 * Timing configuration for technique animations
 */
interface TechniqueTiming {
  readonly chamber: number;
  readonly extend: number;
  readonly peak: number;
  readonly retract: number;
  readonly recover: number;
  readonly total: number;
}
 
export interface KickConfig {
  readonly name: string;
  readonly koreanName: string;
  readonly timing: TechniqueTiming;
  readonly kickType:
    | "front"
    | "roundhouse"
    | "side"
    | "axe"
    | "back"
    | "low"
    | "crescent"
    | "spin";
  readonly guardDuringKick?: "middle" | "high";
  readonly guardAtPeak?: "middle" | "high";
}
 
/**
 * Create a standard kick animation with proper phases
 *
 * All kicks follow the Korean martial arts pattern:
 * 1. 기본자세 (Stance) - Fighting stance at t=0
 * 2. 준비 (Chamber) - Knee lifts
 * 3. 차기 (Extension) - Leg extends
 * 4. 정점 (Peak) - Hold at extension
 * 5. 회수 (Retraction) - Return through chamber
 * 6. 복귀 (Recovery) - Return to stance
 *
 * @param config - Kick configuration
 * @returns Complete kick animation
 *
 * @korean 표준발차기애니메이션생성
 */
export function createKickAnimation(config: KickConfig): SkeletalAnimation {
  const {
    name,
    koreanName,
    timing,
    kickType,
    guardDuringKick = "middle",
    guardAtPeak = "middle",
  } = config;
 
  const builder = MartialArtsAnimationBuilder.create(name, koreanName)
    .asAttack(timing.total)
    .stance()
    .withKoreanMiddleGuard();
 
  // Helper to apply guard based on type
  const applyGuard = (type: "middle" | "high") => {
    if (type === "high") {
      builder.withKoreanHighGuard();
    } else {
      builder.withKoreanMiddleGuard();
    }
  };
 
  // Apply kick-type specific chamber and extension
  switch (kickType) {
    case "front":
      builder
        .chamber(timing.chamber)
        .withKoreanMiddleGuard()
        .extend(timing.extend);
      applyGuard(guardDuringKick);
      builder.extend(timing.peak);
      applyGuard(guardAtPeak);
      break;
 
    case "roundhouse":
      builder
        .roundhouseChamber(timing.chamber)
        .withKoreanMiddleGuard()
        .roundhouseExtend(timing.extend);
      applyGuard(guardDuringKick);
      builder.roundhouseExtend(timing.peak);
      applyGuard(guardAtPeak);
      break;
 
    case "side":
      builder
        .sideKickChamber(timing.chamber)
        .withKoreanHighGuard()
        .sideKickExtend(timing.extend);
      applyGuard(guardDuringKick);
      builder.sideKickExtend(timing.peak);
      applyGuard(guardAtPeak);
      break;
 
    case "axe":
      builder
        .axeKickRise(timing.chamber)
        .withKoreanHighGuard()
        .axeKickChop(timing.extend);
      applyGuard(guardDuringKick);
      builder.axeKick(timing.peak);
      applyGuard(guardAtPeak);
      break;
 
    case "back":
      builder
        .backKickSpin(timing.chamber)
        .withKoreanHighGuard()
        .backKickThrust(timing.extend);
      applyGuard(guardDuringKick);
      builder.backKickThrust(timing.peak);
      applyGuard(guardAtPeak);
      break;
 
    case "low":
      builder
        .lowKickChamber(timing.chamber)
        .withKoreanMiddleGuard()
        .lowKickSweep(timing.extend);
      applyGuard(guardDuringKick);
      builder.lowKickSweep(timing.peak);
      applyGuard(guardAtPeak);
      break;
 
    case "crescent":
      builder
        .crescentKickChamber(timing.chamber)
        .withKoreanHighGuard()
        .crescentKickArc(timing.extend);
      applyGuard(guardDuringKick);
      builder.crescentKickArc(timing.peak);
      applyGuard(guardAtPeak);
      break;
 
    case "spin":
      builder
        .spin(timing.chamber)
        .withKoreanHighGuard()
        .spinKick(timing.extend);
      applyGuard(guardDuringKick);
      builder.spinKick(timing.peak);
      applyGuard(guardAtPeak);
      break;
  }
 
  // Common recovery for all kicks
  builder
    .retract(timing.retract)
    .recover(timing.recover)
    .withKoreanMiddleGuard();
 
  return builder.build();
}
 
// ═══════════════════════════════════════════════════════════════════════════
// PUNCH FACTORY (주먹 팩토리)
// ═══════════════════════════════════════════════════════════════════════════
 
/**
 * Configuration for punch animation creation
 * 주먹 애니메이션 생성 설정
 */
export interface PunchConfig {
  readonly name: string;
  readonly koreanName: string;
  readonly timing: TechniqueTiming;
  readonly punchType:
    | "jab"
    | "cross"
    | "hook"
    | "uppercut"
    | "palm"
    | "backfist";
  readonly hand: "left" | "right";
  readonly guardHand?: "left" | "right";
}
 
/**
 * Create a standard punch animation with proper phases
 *
 * All punches follow Korean martial arts pattern:
 * 1. 준비 (Chamber) - Fist at hip
 * 2. 지르기 (Extension) - Arm extends with rotation
 * 3. 정점 (Peak) - Maximum reach
 * 4. 복귀 (Recovery) - Return to guard
 *
 * @param config - Punch configuration
 * @returns Complete punch animation
 *
 * @korean 표준주먹애니메이션생성
 */
export function createPunchAnimation(config: PunchConfig): SkeletalAnimation {
  const {
    name,
    koreanName,
    timing,
    punchType,
    hand,
    guardHand = hand === "left" ? "right" : "left",
  } = config;
 
  const builder = MartialArtsAnimationBuilder.create(name, koreanName).asAttack(
    timing.total,
  );
 
  // Apply punch-type specific phases
  switch (punchType) {
    case "jab":
    case "cross":
      builder
        .punchChamber(timing.chamber, hand)
        .withKoreanMiddleGuard(guardHand)
        .punchExtend(timing.extend, hand)
        .withKoreanMiddleGuard(guardHand)
        .punchPeak(timing.peak, hand)
        .withKoreanMiddleGuard(guardHand);
      break;
 
    case "hook":
      builder
        .hookWindup(timing.chamber, hand)
        .withKoreanMiddleGuard(guardHand)
        .hookPunch(timing.extend + timing.peak, hand)
        .withKoreanMiddleGuard(guardHand);
      break;
 
    case "uppercut":
      builder
        .uppercutCrouch(timing.chamber)
        .withKoreanMiddleGuard(guardHand)
        .uppercutPunch(timing.extend + timing.peak)
        .withKoreanMiddleGuard(guardHand);
      break;
 
    case "palm":
      builder
        .punchWindup(timing.chamber)
        .palmStrike(timing.extend)
        .palmStrike(timing.peak);
      break;
 
    case "backfist":
      // Use standard punch mechanics for backfist
      builder
        .punchChamber(timing.chamber, hand)
        .withKoreanMiddleGuard(guardHand)
        .withBackfist(hand)
        .punchExtend(timing.extend, hand)
        .withKoreanMiddleGuard(guardHand)
        .withBackfist(hand)
        .punchPeak(timing.peak, hand)
        .withKoreanMiddleGuard(guardHand);
      break;
  }
 
  // Common recovery
  builder.recover(timing.retract + timing.recover).withKoreanMiddleGuard();
 
  return builder.build();
}
 
// ═══════════════════════════════════════════════════════════════════════════
// LOCOMOTION FACTORY (이동 팩토리)
// ═══════════════════════════════════════════════════════════════════════════
 
/**
 * Configuration for locomotion animations
 * 이동 애니메이션 설정
 */
export interface LocomotionConfig {
  readonly stance: TrigramStance;
  readonly type: "walk" | "run" | "idle";
  readonly duration?: number;
}
 
/**
 * Standard locomotion durations
 */
const LOCOMOTION_DURATIONS = {
  walk: 1.0, // 1 second per step cycle
  run: 0.6, // Faster for running
  idle: 3.0, // Breathing cycle
} as const;
 
/**
 * Create a trigram-specific locomotion animation
 *
 * Note: Uses basic locomotion with trigram guard applied.
 * For more complex trigram-specific locomotion patterns,
 * use the dedicated StanceLocomotionAnimations module.
 *
 * @param config - Locomotion configuration
 * @returns Complete locomotion animation with trigram styling
 *
 * @korean 팔괘별이동애니메이션생성
 */
export function createTrigramLocomotion(
  config: LocomotionConfig,
): SkeletalAnimation {
  const { stance, type, duration = LOCOMOTION_DURATIONS[type] } = config;
 
  const builder = MartialArtsAnimationBuilder.create(
    `${stance.toLowerCase()}_${type}`,
    `${stance} ${type === "walk" ? "걷기" : type === "run" ? "달리기" : "대기"}`,
  );
 
  switch (type) {
    case "walk":
      builder
        .asMovement(duration, true)
        .stance()
        .withTrigramGuard(stance)
        .step(duration * 0.5)
        .withTrigramGuard(stance);
      break;
 
    case "run":
      builder
        .asMovement(duration, true)
        .stance()
        .withTrigramGuard(stance)
        .step(duration * 0.3)
        .withTrigramGuard(stance);
      break;
 
    case "idle":
      builder.asIdle(duration, true).stance().withTrigramGuard(stance);
      break;
  }
 
  return builder.build();
}
 
// ═══════════════════════════════════════════════════════════════════════════
// DEFENSIVE ANIMATION FACTORY (방어 애니메이션 팩토리)
// ═══════════════════════════════════════════════════════════════════════════
 
/**
 * Configuration for defensive animations
 * 방어 애니메이션 설정
 */
export interface DefenseConfig {
  readonly name: string;
  readonly koreanName: string;
  readonly timing: TechniqueTiming;
  readonly defenseType: "block" | "parry" | "slip" | "bob" | "weave";
  readonly height: "high" | "middle" | "low";
}
 
/**
 * Create a defensive animation
 *
 * @param config - Defense configuration
 * @returns Complete defensive animation
 *
 * @korean 방어애니메이션생성
 */
export function createDefenseAnimation(
  config: DefenseConfig,
): SkeletalAnimation {
  const { name, koreanName, timing, defenseType, height } = config;
 
  const builder = MartialArtsAnimationBuilder.create(name, koreanName)
    .asDefense(timing.total)
    .stance()
    .withKoreanMiddleGuard();
 
  switch (defenseType) {
    case "block":
      if (height === "high") {
        builder.blockHigh(timing.chamber + timing.extend).withKoreanHighGuard();
      } else if (height === "low") {
        builder.blockLow(timing.chamber + timing.extend).withKoreanLowGuard();
      } else {
        // Middle block - use parry mechanics with high guard
        builder.parry(timing.chamber + timing.extend).withKoreanMiddleGuard();
      }
      break;
 
    case "parry":
      builder.parry(timing.chamber + timing.extend);
      break;
 
    case "slip":
      builder.duck(timing.chamber + timing.extend);
      break;
 
    case "bob":
      builder.bob(timing.chamber + timing.extend);
      break;
 
    case "weave":
      builder.weave(timing.chamber + timing.extend);
      break;
  }
 
  builder.recover(timing.retract + timing.recover).withKoreanMiddleGuard();
 
  return builder.build();
}
 
// ═══════════════════════════════════════════════════════════════════════════
// STANCE MIRRORING UTILITIES (자세 반전 유틸리티)
// ═══════════════════════════════════════════════════════════════════════════
 
/**
 * Create both orthodox and southpaw versions of an animation
 *
 * Useful for creating complete animation sets that work for both stance sides.
 *
 * @param baseAnimation - Base animation (assumed orthodox/left-foot-forward)
 * @returns Object with both stance versions
 *
 * @korean 양자세애니메이션생성
 */
export function createBothStances(baseAnimation: SkeletalAnimation): {
  readonly orthodox: SkeletalAnimation;
  readonly southpaw: SkeletalAnimation;
} {
  return {
    orthodox: baseAnimation,
    southpaw: mirrorAnimation(baseAnimation, {
      nameSuffix: "_southpaw",
      koreanNameSuffix: "(사우스포)",
    }),
  };
}
 
/**
 * Get animation for player's current stance side
 *
 * @param baseAnimation - Base animation (orthodox)
 * @param leadFoot - Player's current lead foot
 * @param cache - Optional cache for mirrored animations
 * @returns Animation matching player's stance
 *
 * @korean 자세에맞는애니메이션선택
 */
export { getAnimationForStance };
 
// ═══════════════════════════════════════════════════════════════════════════
// COMBO FACTORY (콤보 팩토리)
// ═══════════════════════════════════════════════════════════════════════════
 
/**
 * Create a combo animation from a sequence of techniques
 *
 * @param name - Combo name
 * @param koreanName - Korean name
 * @param techniques - Array of technique names to chain
 * @returns Complete combo animation
 *
 * @korean 콤보애니메이션생성
 */
export function createComboAnimation(
  name: string,
  koreanName: string,
  techniques: readonly string[],
): SkeletalAnimation {
  const timing = TECHNIQUE_TIMING.COMBO_FAST;
  const totalDuration = timing.total * techniques.length;
 
  const builder = MartialArtsAnimationBuilder.create(name, koreanName)
    .asAttack(totalDuration)
    .stance()
    .withKoreanMiddleGuard();
 
  // Chain techniques with fast transitions
  techniques.forEach((technique, _index) => {
    switch (technique) {
      case "jab":
        builder
          .punchChamber(timing.chamber, "left")
          .punchExtend(timing.extend, "left")
          .punchPeak(timing.peak, "left");
        break;
      case "cross":
        builder
          .punchChamber(timing.chamber, "right")
          .punchExtend(timing.extend, "right")
          .punchPeak(timing.peak, "right");
        break;
      case "hook":
        builder
          .hookWindup(timing.chamber, "left")
          .hookPunch(timing.extend + timing.peak, "left");
        break;
      case "uppercut":
        builder
          .uppercutCrouch(timing.chamber)
          .uppercutPunch(timing.extend + timing.peak);
        break;
      case "front_kick":
        builder.chamber(timing.chamber).extend(timing.extend);
        break;
      case "roundhouse":
        builder
          .roundhouseChamber(timing.chamber)
          .roundhouseExtend(timing.extend);
        break;
    }
 
    // Quick recovery between techniques (except last)
    if (_index < techniques.length - 1) {
      builder.recover(timing.recover * 0.5);
    }
  });
 
  // Final recovery
  builder.recover(timing.recover).withKoreanMiddleGuard();
 
  return builder.build();
}
 
// ═══════════════════════════════════════════════════════════════════════════
// PRESET ANIMATIONS (프리셋 애니메이션)
// ═══════════════════════════════════════════════════════════════════════════
 
/**
 * Pre-built kick animations using factory
 * 팩토리를 사용한 사전 빌드 발차기 애니메이션
 */
export const PRESET_KICKS = {
  FRONT_KICK: createKickAnimation({
    name: "front_kick",
    koreanName: "앞차기",
    timing: TIMING_PRESETS.MEDIUM_LIGHT,
    kickType: "front",
  }),
 
  ROUNDHOUSE_KICK: createKickAnimation({
    name: "roundhouse_kick",
    koreanName: "돌려차기",
    timing: TIMING_PRESETS.HEAVY_LIGHT,
    kickType: "roundhouse",
    guardDuringKick: "high",
    guardAtPeak: "high",
  }),
 
  SIDE_KICK: createKickAnimation({
    name: "side_kick",
    koreanName: "옆차기",
    timing: TIMING_PRESETS.MEDIUM_HEAVY,
    kickType: "side",
    guardDuringKick: "high",
    guardAtPeak: "high",
  }),
 
  LOW_KICK: createKickAnimation({
    name: "low_kick",
    koreanName: "하단차기",
    timing: TIMING_PRESETS.FAST_MEDIUM,
    kickType: "low",
  }),
} as const;
 
/**
 * Pre-built punch animations using factory
 * 팩토리를 사용한 사전 빌드 주먹 애니메이션
 */
export const PRESET_PUNCHES = {
  JAB: createPunchAnimation({
    name: "jab",
    koreanName: "잽",
    timing: TIMING_PRESETS.FAST,
    punchType: "jab",
    hand: "left",
  }),
 
  CROSS: createPunchAnimation({
    name: "cross",
    koreanName: "크로스",
    timing: TIMING_PRESETS.MEDIUM,
    punchType: "cross",
    hand: "right",
  }),
 
  LEAD_HOOK: createPunchAnimation({
    name: "lead_hook",
    koreanName: "리드훅",
    timing: TIMING_PRESETS.MEDIUM,
    punchType: "hook",
    hand: "left",
  }),
 
  REAR_UPPERCUT: createPunchAnimation({
    name: "rear_uppercut",
    koreanName: "리어어퍼컷",
    timing: TIMING_PRESETS.MEDIUM,
    punchType: "uppercut",
    hand: "right",
  }),
} as const;
 
/**
 * Pre-built combo animations using factory
 * 팩토리를 사용한 사전 빌드 콤보 애니메이션
 */
export const PRESET_COMBOS = {
  JAB_CROSS: createComboAnimation("jab_cross", "잽-크로스", ["jab", "cross"]),
 
  ONE_TWO_HOOK: createComboAnimation("one_two_hook", "원투훅", [
    "jab",
    "cross",
    "hook",
  ]),
 
  JAB_CROSS_KICK: createComboAnimation("jab_cross_kick", "잽크로스킥", [
    "jab",
    "cross",
    "front_kick",
  ]),
} as const;
 
// ═══════════════════════════════════════════════════════════════════════════
// TRIGRAM BREATHING ANIMATION (팔괘 호흡)
// ═══════════════════════════════════════════════════════════════════════════
 
/**
 * Create a trigram-specific breathing/idle animation
 *
 * Each trigram has a unique breathing pattern reflecting its elemental nature.
 *
 * @param stance - Trigram stance
 * @returns Breathing animation for the stance
 *
 * @korean 팔괘호흡애니메이션생성
 */
export function createTrigramBreathing(
  stance: TrigramStance,
): SkeletalAnimation {
  return createTrigramLocomotion({
    stance,
    type: "idle",
    duration: 3.0,
  });
}
 
// ═══════════════════════════════════════════════════════════════════════════
// EXPORTS
// ═══════════════════════════════════════════════════════════════════════════
 
export type { LeadFoot };