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

    Interface CombatScreen3DProps

    Props for the CombatScreen3D component. Provides all state and callbacks required for the 3D combat screen.

    interface CombatScreen3DProps {
        currentRound: number;
        gameMode?: GameMode;
        height?: number;
        isPaused: boolean;
        onGameEnd: (winner: number) => void;
        onPlayerUpdate: (
            playerIndex: number,
            updates: Partial<PlayerState>,
        ) => void;
        onReturnToMenu: () => void;
        players: readonly PlayerState[];
        timeRemaining: number;
        width?: number;
    }
    Index

    Properties

    currentRound: number

    Current round number (1-based).

    gameMode?: GameMode

    Optional game mode (affects rules/behavior).

    height?: number

    Canvas height in pixels. Defaults to 800.

    isPaused: boolean

    Whether combat is currently paused.

    onGameEnd: (winner: number) => void

    Callback when the match ends, with the winner's index (0 or 1).

    Type Declaration

      • (winner: number): void
      • Parameters

        • winner: number

          Index of the winning player.

        Returns void

    onPlayerUpdate: (playerIndex: number, updates: Partial<PlayerState>) => void

    Callback to update a player's state by index.

    Type Declaration

      • (playerIndex: number, updates: Partial<PlayerState>): void
      • Parameters

        • playerIndex: number

          Index of the player to update (0 or 1).

        • updates: Partial<PlayerState>

          Partial PlayerState with updated fields.

        Returns void

    onReturnToMenu: () => void

    Callback when the user exits to the menu.

    players: readonly PlayerState[]

    Array of player states (expects exactly 2 players). Each PlayerState contains all combat and status information for a player.

    timeRemaining: number

    Remaining time in seconds for the current round.

    width?: number

    Canvas width in pixels. Defaults to 1200.