Repository navigation
Improve mobile flight with gestures and a bottom instrument dock - #12
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phone flight controls previously required holding small arrow buttons, while the bombing panel, wind compass and minimap covered the flight view. This change moves those instruments into a bottom dock and lets the flight view respond directly to one- and two-finger gestures.
Holding one finger gently advances the drone and ramps horizontal thrust over two seconds. Dragging controls forward/backward flight and strafing; a second finger independently controls altitude and turning. Reversed inputs brake through zero. Release, cancellation, lost capture, window blur, backgrounding, resizing and unmount clear the relevant axes and stop the animation loop. Rust retains the existing acceleration, braking and speed limits.
The mobile dock adapts to portrait and landscape, preserves minimap dragging/zooming, and keeps the main buttons at least 44px high. Desktop menus and keyboard/mouse controls retain their existing behavior. Chinese, Japanese and English instructions and READMEs describe the new controls.
Validation:
npm run checkpassed all 261 Node and 46 Rust tests;npm run buildandgit diff --checkpassed. Thirteen new gesture tests cover the ramp, signed drags, independent pointer roles, cancellation/reset, bounded inputs, and real Rust/WASM acceleration and braking. Browser QA on the final Vite build covered 390×844, 320×640, 844×390, 600×360 and 1280×720; native drag, bombing, map zoom/pan/follow, camera cycling, pause/resume, day/night and immediate language switching passed with no overflow or console warnings/errors. Simultaneous touch and sustained hold were verified by controller/Rust tests; an actual phone Safari session was not available.