OptionalautoApply?: booleanIf true the camera position and target will be applied immediately
Optionalcamera?: CameraThe camera to fit. If not provided the current camera will be used
OptionalcameraNearFar?: "keep" | "auto"Set to 'auto' to update the camera near or far plane based on the fitted-objects bounds
OptionalcameraOffset?: Partial<Vector3Like>Offset the camera position in world space
OptionalcenterCamera?: "none" | "y"If set to "y" the camera will be centered in the y axis
Optionalcontext?: ContextThe context to use. If not provided the current context will be used
OptionalcurrentZoom?: numberThe current zoom level of the camera (used to avoid clipping when fitting)
Optionaldebug?: booleanWhen enabled debug rendering will be shown
OptionalfitDirection?: Vector3LikeThe direction from which the camera should be fitted in worldspace. If not defined the current camera's position will be used
OptionalfitOffset?: numberA factor to control padding around the fitted objects.
Values > 1 will add more space around the fitted objects, values < 1 will zoom in closer.
Optionalfov?: numberTarget field of view (FOV) for the camera
OptionalmaxZoom?: numberMaximum zoom level for the camera (e.g. if zoom is constrained by OrbitControls)
OptionalminZoom?: numberMinimum and maximum zoom levels for the camera (e.g. if zoom is constrained by OrbitControls)
Optionalobjects?: Object3D[] | Object3DThe objects to fit the camera to. If not provided the scene children will be used
OptionalrelativeCameraOffset?: Partial<Vector3Like>Offset the camera position relative to the size of the objects being focused on (e.g. x: 0.5).
Value range: -1 to 1
OptionalrelativeTargetOffset?: Partial<Vector3Like>Offset the camera target position relative to the size of the objects being focused on.
Value range: -1 to 1
OptionaltargetOffset?: Partial<Vector3Like>Offset the camera target position in world space
Options for fitting a camera to the scene or specific objects.
Used by OrbitControls.fitCamera and the fitCamera.