Position to check (2D {x,y} where y=depth, or 3D Vector3/Position3D)
Arena bounds
True if position is within bounds
// 2D position (y maps to Z/depth)
const position = { x: 5, y: 2 };
const bounds = calculateArenaBounds(config);
const inBounds = isPositionInBounds(position, bounds);
// 3D position (uses z directly)
const position3D = new THREE.Vector3(5, 1.8, 2);
const inBounds3D = isPositionInBounds(position3D, bounds);
Check if a position is within arena boundaries.
Only checks X and Z axes (horizontal plane). Y axis (height) is ignored.
For 2D positions, accepts
{ x, y }whereymaps to world Z (depth), consistent withclampToArenaBoundsand other 2D arena position APIs.Korean: 경기장 경계 내 위치 확인 (Check Position In Bounds)