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

    Keyframe configuration helper

    Provides a fluent API for configuring bone rotations, positions, and anatomy state (hands, feet, facial expressions) within a single keyframe.

    const kf = new KeyframeConfig();
    kf.rotate(BoneName.SHOULDER_R, -0.5, 0, 0.3)
    .position(BoneName.HAND_R, 0.1, 0, 0)
    .setLeftHandPose("fist")
    .setRightHandPose("fist", "knuckles")
    .setFootHighlight("right", true)
    .setFacialExpression("focused");

    키프레임설정헬퍼

    Index

    Constructors

    Methods

    • Complete keyframe configuration and return to builder

      Type Parameters

      • T extends AnimationBuilderLike

      Returns T

      Parent builder for method chaining

      Error if not associated with a builder

      키프레임완료

    • Set bone position offset

      Parameters

      • bone: BoneName

        Target bone name

      • x: number

        X position offset

      • y: number

        Y position offset

      • z: number

        Z position offset

      Returns this

      this for chaining

      kf.position(BoneName.FOOT_R, 0, 0.5, 0.3);
      

      뼈위치설정

    • Set bone rotation (euler angles in radians)

      Parameters

      • bone: BoneName

        Target bone name

      • x: number

        X rotation (radians)

      • y: number

        Y rotation (radians)

      • z: number

        Z rotation (radians)

      Returns this

      this for chaining

      kf.rotate(BoneName.SHOULDER_R, -0.5, 0, 0.3);
      

      뼈회전설정

    • Associate this keyframe with a builder for the done() method

      Parameters

      • builder: AnimationBuilderLike
      • time: number
      • easing: string

      Returns void

    • Set facial expression for this keyframe

      Parameters

      • expression: string

        Facial expression (e.g., "neutral", "focused", "pained")

      Returns this

      this for chaining

      얼굴표정설정

    • Set foot highlight state for kicks

      Parameters

      • side: "left" | "right" | "both"

        Which foot ("left" | "right" | "both")

      • highlighted: boolean

        Whether to highlight

      Returns this

      this for chaining

      발강조설정

    • Set muscle activation target for this keyframe

      Parameters

      • muscleGroup: string

        Muscle group name (e.g., "BICEP_R", "QUAD_L")

      • tension: number

        Tension level (0-1)

      Returns this

      this for chaining

      근육활성화설정

    • Set multiple muscle activations at once

      Parameters

      • activations: Record<string, number> | Map<string, number>

        Map or object of muscle group to tension

      Returns this

      this for chaining

      다중근육활성화설정

    • Apply Korean guard position to arms

      Sets proper Korean martial arts guard positions (막기자세) for defensive posture. Supports applying guard to one side or both sides.

      Parameters

      • guardType: "HIGH_GUARD" | "MIDDLE_GUARD" | "LOW_GUARD"

        Type of guard ("HIGH_GUARD" | "MIDDLE_GUARD" | "LOW_GUARD")

      • side: "left" | "right" | "both" = "both"

        Which side to apply ("left" | "right" | "both")

      Returns this

      this for chaining

      // Apply middle guard to both hands
      kf.withGuard("MIDDLE_GUARD");

      // Apply middle guard only to left hand (right hand attacks)
      kf.withGuard("MIDDLE_GUARD", "left");

      방어자세적용

    Properties

    _facialExpression?: string

    Facial expression

    _leftFootHighlight?: boolean

    Left foot highlight state

    _leftHandHighlightMode?: HandHighlightMode

    Left hand highlight mode

    _leftHandPose?: string

    Left hand pose type

    _muscleActivations?: Map<string, number>

    Muscle activation targets

    _rightFootHighlight?: boolean

    Right foot highlight state

    _rightHandHighlightMode?: HandHighlightMode

    Right hand highlight mode

    _rightHandPose?: string

    Right hand pose type

    builder: AnimationBuilderLike | null = null

    Parent builder reference for fluent chaining

    easing: string = "linear"

    Keyframe easing function

    positions: Map<BoneName, Vector3> = ...

    Bone position data (bone -> position offset)

    rotations: Map<BoneName, Euler> = ...

    Bone rotation data (bone -> euler rotation)

    time: number = 0

    Keyframe time