flame
flame copied to clipboard
Add support for trackpad gestures
Problem to solve
Flutter recently added trackpad gestures: https://docs.flutter.dev/release/breaking-changes/trackpad-gestures Scrolling with two fingers on a trackpad does not work on mac osx
Proposal
This fix allows you to detect two finger scrolling See PR https://github.com/keithjohnston/flame/pull/1
More information
Example usage:
@override
void onPointerPanZoom(PointerPanZoomUpdateInfo info) {
cameraComponent.viewfinder.zoom = clampZoom(cameraComponent.viewfinder.zoom +
info.scrollDelta.game.y.sign * zoomPerScrollUnit);
}
Hi, can you please add your PR to the Flame repo instead of your clone. :)