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

    Function convertPlayerStateToProps

    • Converts PlayerState to Player3DUnifiedProps for visual rendering.

      Note: This function converts base PlayerState properties used in combat. Training-specific stats (misses, accuracy, comboCount) are optional in PlayerState and handled separately in training contexts.

      Parameters

      • player: PlayerState

        The player state to convert

      • position: [number, number, number]

        3D position [x, y, z]

      • rotation: number

        Rotation in radians

      • options: {
            enableEyeTracking?: boolean;
            enableFacialExpressions?: boolean;
            facing?: "left" | "right";
            isMobile?: boolean;
            onAnimationComplete?: () => void;
            opponentPosition?: [number, number, number];
            scale?: number;
            showDetails?: boolean;
            showHealthBar?: boolean;
            showStanceIndicator?: boolean;
        } = {}

        Display and behavior options

      Returns Player3DUnifiedProps

      Props for SkeletalPlayer3D component (28-bone articulated body model)

      플레이어상태변환

      const playerProps = convertPlayerStateToProps(
      playerState,
      [-3, 0, 0],
      0,
      { isMobile: false, showVitalPoints: false }
      );

      <SkeletalPlayer3D {...playerProps} />