RotateControl
class RotateControl extends Component implements CameraControl, OptionGetters<RotateControlOptions>
Model's rotation control that supports both mouse & touch
constructor
new RotateControl(view3D, options)
Create new RotateControl instance
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
view3D | View3D | An instance of View3D | ||
options | RotateControlOptions | ✔️ | {} | Options |
Properties
enabled
Whether this control is enabled or not
Type: boolean
animating
Whether this control is animating the camera
Type: boolean
scale
Scale factor for rotation
Type: number
Default: 1
duration
Duration of the input animation (ms)
Type: number
Default: 300
easing
Easing function of the animation
Type: function
Default: EASING.EASE_OUT_CUBIC
See:
disablePitch
Disable X-axis(pitch) rotation
Type: boolean
Default: false
disableYaw
Disable Y-axis(yaw) rotation
Type: boolean
Default: false
Methods
destroy
Destroy the instance and remove all event listeners attached
Returns: void
reset
Reset internal values
Returns: void
update
Update control by given deltaTime
Returns: void
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
deltaTime | number | Number of milisec to update |
resize
Resize control to match target size
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
size | object | New size to apply | ||
size.width | number | ✔️ | New width | |
size.height | number | ✔️ | New height |
enable
Enable this input and add event listeners
Returns: void
disable
Disable this input and remove all event handlers
Returns: void
sync
Synchronize this control's state to given camera position
Returns: void