Screen width in pixels
Screen height in pixels
Pixels reserved at top (HUD, headers)
Pixels reserved at bottom (controls, footer)
Whether the device is mobile
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
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: 물리 설정 생성