onRotateMove method
dynamic
onRotateMove()
Implementation
onRotateMove() {
if (enabled && enableRotate) {
setCenter((_touchCurrent[0].clientX + _touchCurrent[1].clientX) / 2,
(_touchCurrent[0].clientY + _touchCurrent[1].clientY) / 2);
var rotationPoint;
if (_state != State2.zRotate) {
updateTbState(State2.zRotate, true);
_startFingerRotation = _currentFingerRotation;
}
//_currentFingerRotation = event.rotation;
_currentFingerRotation = getAngle(_touchCurrent[1], _touchCurrent[0]) + getAngle(_touchStart[1], _touchStart[0]);
if (!enablePan) {
rotationPoint = Vector3().setFromMatrixPosition(_gizmoMatrixState);
} else {
_v3_2.setFromMatrixPosition(_gizmoMatrixState);
rotationPoint = unprojectOnTbPlane(camera, _center.x, _center.y, domElement)
.applyQuaternion(camera.quaternion)
.multiplyScalar(1 / camera.zoom)
.add(_v3_2);
}
var amount = MathUtils.deg2rad * (_startFingerRotation - _currentFingerRotation);
applyTransformMatrix(zRotate(rotationPoint, amount));
dispatchEvent(_changeEvent);
}
}