Skip to content

Commit

Permalink
OrbitControls: Add 3D cursor and limit to orbit camera target. (#636)
Browse files Browse the repository at this point in the history
  • Loading branch information
Methuselah96 authored Oct 23, 2023
1 parent ec76b1e commit b5b4732
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions types/three/examples/jsm/controls/OrbitControls.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ export class OrbitControls extends EventDispatcher<OrbitControlsEventMap> {
/** @deprecated */
center: Vector3;

/**
* The focus point of the {@link .minTargetRadius} and {@link .maxTargetRadius} limits. It can be updated manually
* at any point to change the center of interest for the {@link .target}.
*/
cursor: Vector3;

/**
* How far you can dolly in ( PerspectiveCamera only ).
* @default 0
Expand All @@ -68,6 +74,18 @@ export class OrbitControls extends EventDispatcher<OrbitControlsEventMap> {
*/
maxZoom: number;

/**
* How close you can get the target to the 3D {@link .cursor}.
* @default 0
*/
minTargetRadius: number;

/**
* How far you can move the target from the 3D {@link .cursor}.
* @default Infinity
*/
maxTargetRadius: number;

/**
* How far you can orbit vertically, lower limit.
* Range is 0 to Math.PI radians.
Expand Down

0 comments on commit b5b4732

Please sign in to comment.