onPointerMove method

  1. @override
Future<void> onPointerMove(
  1. Vector2 localPosition,
  2. Vector2 delta,
  3. bool isMiddle
)
override

Implementation

@override
Future<void> onPointerMove(
    Vector2 localPosition, Vector2 delta, bool isMiddle) async {
  if (_processing) {
    return;
  }
  if (isMiddle) {
    _inputDeltas[InputType.MMB_HOLD_AND_MOVE] =
        (_inputDeltas[InputType.MMB_HOLD_AND_MOVE] ?? Vector3.zero()) +
            Vector3(delta.x, delta.y, 0.0);
  } else {
    _inputDeltas[InputType.LMB_HOLD_AND_MOVE] =
        (_inputDeltas[InputType.LMB_HOLD_AND_MOVE] ?? Vector3.zero()) +
            Vector3(delta.x, delta.y, 0.0);
  }
}