code: function onMouseMove(event) {
        if (ctrlDown) {
          if (drag.start.x === null) {
            drag.start.x = event.clientX;
            drag.start.y = event.clientY;
          }
          let threshold = 15;
  
          stackHelper.slice.intensityAuto = false;
  
          let dynamicRange = stack.minMax[1] - stack.minMax[0];
          dynamicRange /= threeD.clientWidth;
  
          if (Math.abs(event.clientX - drag.start.x) > threshold) {
            // window width
            stackHelper.slice.windowWidth += dynamicRange * (event.clientX - drag.start.x);
            drag.start.x = event.clientX;
          }
  
          if (Math.abs(event.clientY - drag.start.y) > threshold) {
            // window center
            stackHelper.slice.windowCenter -= dynamicRange * (event.clientY - drag.start.y);
            drag.start.y = event.clientY;
          }
        }
      }
docs: On mouse move callback