handleMouseMoveRotate method

dynamic handleMouseMoveRotate(
  1. dynamic event
)

Implementation

handleMouseMoveRotate(event) {
  rotateEnd.set(event.clientX, event.clientY);

  rotateDelta.subVectors(rotateEnd, rotateStart).multiplyScalar(scope.rotateSpeed);

  var element = scope.domElement;

  rotateLeft(2 * Math.pi * rotateDelta.x / element.clientHeight); // yes, height

  rotateUp(2 * Math.pi * rotateDelta.y / element.clientHeight);

  rotateStart.copy(rotateEnd);

  scope.update();
}