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