getMouseOnCircle method

dynamic getMouseOnCircle(
  1. dynamic pageX,
  2. dynamic pageY
)

Implementation

getMouseOnCircle(pageX, pageY) {
  vector.set(
      ((pageX - scope.screen['width'] * 0.5 - scope.screen['left']) /
          (scope.screen['width'] * 0.5)),
      ((scope.screen['height'] + 2 * (scope.screen['top'] - pageY)) /
          scope.screen['width']) // screen.width intentional
      );

  return vector;
}