onPointerScroll method

  1. @override
Future<void> onPointerScroll(
  1. Vector2 localPosition,
  2. double scrollDelta
)
override

Implementation

@override
Future<void> onPointerScroll(
    Vector2 localPosition, double scrollDelta) async {
  if (_processing) {
    return;
  }
  try {
    _inputDeltas[InputType.SCROLLWHEEL] =
        (_inputDeltas[InputType.SCROLLWHEEL] ?? Vector3.zero()) +
            Vector3(0, 0, scrollDelta > 0 ? 1 : -1);
  } catch (e) {
    _logger.warning("Error during scroll accumulation: $e");
  }
}