# SmoothOrbitControls
SpeckleControls -> SmoothOrbitControls
Orbit camera controls based on Google's model-viewer implementation. Input are the angles and radius of a spherical coordinate system with a configurable origin.
# Methods
adjustOrbit | setDamperDecayTime | setFieldOfView | setOrbit |
---|---|---|---|
setRadius | setTarget |
# Typedefs
SmoothOrbitControlsOptions |
---|
# Methods
# adjustOrbit
adjustOrbit(deltaTheta: number, deltaPhi: number, deltaZoom: number): void
Used to adjust the current controler's target camera spherical coordinates by providing deltas. Parameters
- deltaTheta: The adjustment for the theta angle
- deltaPhi: The adjustment for the phi angle
- deltaZoom: The adjustment to the radius
Returns: void
# setDamperDecayTime
setDamperDecayTime(decayMilliseconds: number)
Sets the dampening values for the control. A larger smoothens out the camera's movement
Parameters
- decayMilliseconds: Decay value
Returns: void
# setFieldOfView
setFieldOfView(fov: number)
Sets the field of view when camera is PerspectiveCamera (opens new window)
Parameters
- fov: Field of view value
Returns: void
# setOrbit
setOrbit(
goalTheta?: number,
goalPhi?: number,
goalRadius?: number
): boolean
2
3
4
5
Set the absolute orbital goal of the camera. The change will be applied over a number of frames depending on configured dampening value. Returns true if invoking the method will result in the camera changing position and/or rotation, otherwise false.
Parameters
- goalTheta: Goal theta angle
- goalPhi: Goal phi angle
- goalRadius: Goal radius value
Returns: boolean
# setRadius
setRadius(radius: number): void
Sets the radius value
Returns: void
# setTarget
setTarget(x: number, y: number, z: number): void
Sets the origin of the spherical coordinate system
Returns: void