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

    Function createPhysicsConfig

    • Create complete physics configuration for a screen.

      This is the primary function for setting up physics in both TrainingScreen3D and CombatScreen3D. It ensures consistent physics behavior by using the same calculations and constants.

      Korean: 물리 설정 생성

      Parameters

      • screenWidth: number

        Screen width in pixels

      • screenHeight: number

        Screen height in pixels

      • topOffset: number

        Pixels reserved at top (HUD, headers)

      • bottomOffset: number

        Pixels reserved at bottom (controls, footer)

      • isMobile: boolean

        Whether the device is mobile

      Returns PhysicsConfiguration

      Complete physics configuration

      // Training screen
      const trainingPhysics = createPhysicsConfig(
      1920, 1080, 60, 100, false
      );

      // Combat screen
      const combatPhysics = createPhysicsConfig(
      1920, 1080, 60, 100, false
      );

      // Both have identical physics configuration
      trainingPhysics.pixelsPerMeter === combatPhysics.pixelsPerMeter; // true