@ue-too/board / index / RotationHandlerClampConfig
型エイリアス: RotationHandlerClampConfig
RotationHandlerClampConfig =
object
定義: packages/board/src/camera/camera-rig/rotation-handler.ts:89
Configuration for rotation angle boundary clamping.
Remarks
Controls whether rotation operations should be constrained to camera's rotation boundaries.
When clampRotation is true, rotation handlers enforce BoardCamera.rotationBoundaries limits (min/max angles in radians). When false, rotation can exceed configured boundaries.
Rotation boundaries allow limiting camera rotation to a specific angular range, useful for scenarios like:
- Restricting rotation to ±45 degrees from north
- Allowing only certain cardinal directions
- Preventing full 360-degree rotation
例
typescript
const config: RotationHandlerClampConfig = {
clampRotation: true // Enforce rotation boundaries
};
camera.rotationBoundaries = { min: 0, max: Math.PI / 2 };
// Rotation clamped to [0, 90 degrees] rangeプロパティ
clampRotation
clampRotation:
boolean
定義: packages/board/src/camera/camera-rig/rotation-handler.ts:93
Whether to enforce rotation angle boundaries.