onMouseMove method

void onMouseMove(
  1. dynamic event
)

Implementation

void onMouseMove(event) {
    if(lookType == LookType.position){
      object.rotation.y -= event.movementX*lookSpeed;
      object.rotation.x -= event.movementY*lookSpeed;
    }
    else{
      this.mouseX = event.pageX - this.domElement.offsetLeft - this.viewHalfX;
      this.mouseY = event.pageY - this.domElement.offsetTop - this.viewHalfY;
    }
}