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

    Interface UsePlayerAnimationReturn

    Return type for usePlayerAnimation hook

    플레이어애니메이션훅반환타입

    interface UsePlayerAnimationReturn {
        currentFrame: number;
        currentState: AnimationState;
        getCurrentGuardStance: () => TrigramStance | null;
        isInStanceGuard: () => boolean;
        reset: () => void;
        transitionTo: (newState: AnimationState) => boolean;
        transitionToAttack: (durationSeconds: number) => boolean;
        transitionToStanceChange: (
            fromStance: TrigramStance,
            toStance: TrigramStance,
        ) => boolean;
        transitionToStanceGuard: (stance: TrigramStance) => boolean;
        update: (deltaTime: number) => AnimationUpdateResult;
    }
    Index

    Properties

    currentFrame: number

    Current frame index

    현재프레임

    currentState: AnimationState

    Current animation state

    현재상태

    getCurrentGuardStance: () => TrigramStance | null

    Get current guard stance (if in guard animation)

    Type Declaration

    현재가드자세

    isInStanceGuard: () => boolean

    Check if currently in a stance guard animation

    Type Declaration

      • (): boolean
      • Returns boolean

        True if in any stance guard state

    자세가드확인

    reset: () => void

    Reset animation to idle state

    초기화

    transitionTo: (newState: AnimationState) => boolean

    Transition to a new animation state

    Type Declaration

      • (newState: AnimationState): boolean
      • Parameters

        Returns boolean

        Whether transition was successful

    상태전환

    transitionToAttack: (durationSeconds: number) => boolean

    Transition to ATTACK state with technique-specific duration.

    The default ATTACK config is 200ms (12 frames), but real techniques range from 350ms to 1200ms. This method overrides the duration so the state machine stays in ATTACK for the full technique animation.

    Type Declaration

      • (durationSeconds: number): boolean
      • Parameters

        • durationSeconds: number

          The skeletal animation duration in seconds

        Returns boolean

        Whether transition was successful

    공격전환 (기술별 지속시간)

    transitionToStanceChange: (
        fromStance: TrigramStance,
        toStance: TrigramStance,
    ) => boolean

    Transition to stance_change animation with specific transition data

    Korean: 자세 전환 애니메이션 시작

    Initiates a stance change animation with the specific transition data from the 64-transition matrix. This provides stance-specific keyframes and blend weights for smooth interpolation.

    Type Declaration

    자세전환애니메이션시작

    transitionToStanceGuard: (stance: TrigramStance) => boolean

    Transition to stance-specific guard animation

    Type Declaration

    자세가드전환

    update: (deltaTime: number) => AnimationUpdateResult

    Update animation state (call in useFrame)

    Type Declaration

    업데이트