Black Trigram (흑괘) - Korean Martial Arts Combat Simulator API - v0.7.0
    Preparing search index...

    Injury Tracker System.

    Korean: 부상 추적 시스템

    Manages injury recording and retrieval for trauma visualization. Implements progressive bruising by tracking hit counts at similar locations.

    const tracker = new InjuryTracker();

    // Record injury from hit
    const injury = tracker.recordInjury(
    BodyPart.TORSO_UPPER,
    BodyRegion.TORSO,
    new THREE.Vector3(0, 1.5, 0),
    25,
    InjuryType.BRUISE
    );

    // Get all injuries for visualization
    const injuries = tracker.getInjuries();
    Index

    Constructors

    Methods

    • Find injury near a given position on the same body part.

      Korean: 인근 부상 찾기

      Parameters

      • bodyPart: BodyPart

        Body part to search

      • position: Vector3

        Position to search near

      • threshold: number

        Distance threshold

      Returns InjuryLocation | null

      Nearby injury or null

    • Get bruise color based on severity and hit count.

      Korean: 타박상 색상 가져오기

      Progressive color scheme (for reference - TraumaOverlay3D uses its own colors):

      • Light bruising (severity < 20): Yellow (#ffeb3b)
      • Moderate bruising (severity < 50): Purple (#9c27b0)
      • Severe bruising (severity >= 50): Dark red (#b71c1c)

      Note: TraumaOverlay3D uses Dark red → Indigo → Black progression. Consider using TraumaOverlay3D's getBruiseColor for consistent visualization.

      Parameters

      • severity: number

        Injury severity (0-100)

      • hitCount: number

        Number of hits to same location

      Returns string

      Hex color string

    • Record a new injury or update existing one at similar location.

      Korean: 부상 기록

      If an injury exists near the hit position, it updates the existing injury with increased severity and hit count (progressive bruising). Otherwise, creates a new injury.

      Parameters

      • bodyPart: BodyPart

        Body part affected

      • bodyRegion: BodyRegion

        Body region for damage distribution

      • position: Vector3

        3D position relative to character center

      • damage: number

        Damage amount (0-100)

      • type: InjuryType

        Type of injury

      Returns InjuryLocation | null

      The created or updated injury, or null if damage is below threshold

    • Check if damage should trigger blood effects.

      Korean: 출혈 효과 필요 여부 확인

      Parameters

      • damage: number

        Damage amount

      Returns boolean

      Whether to show blood effects

    Properties

    injuries: Map<string, InjuryLocation>
    nextId: number