Vessel Surfer: mouse drag joystick on computers, U-turn about a fixed axis - #82
Conversation
… axis Click and hold anywhere to raise the floating joystick under the pointer and drag to steer, as on a phone without motion sensors; a resting or moving pointer still never steers, so the controls stay reachable. The U-turn now rotates about the up axis captured when it starts and skips levelling while turning, so it ends facing exactly backwards from a pitched or rolled heading. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (6)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe Vessel Surfer now supports held mouse-drag steering on computers. U-turns rotate around the up axis captured at turn start. Documentation, browser tests, and the package version reflect these changes. ChangesVessel Surfer controls
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant Browser
participant CanvasPointerHandler
participant Joystick
participant RenderLoop
Browser->>CanvasPointerHandler: press and hold left mouse button
CanvasPointerHandler->>Joystick: show joystick at pointer
Joystick->>RenderLoop: provide drag steering
RenderLoop->>Browser: update vessel heading
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (4 skipped: 4 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The mouse control requested after #75, plus a U-turn fix found while testing it. (This commit was pushed to the #81 branch just after that PR was merged, so it did not ship with it.)
Mouse drag joystick. On a computer, click and hold anywhere to raise the floating joystick under the pointer and drag to steer, the same control a phone uses without motion sensors. A resting or moving pointer still never steers, so the speed slider and buttons stay reachable.
U-turn. Each yaw step rotated about the camera's up vector while the levelling logic rolled that vector, so a 180° sweep from a pitched or rolled heading ended short of backwards. It now rotates about the up axis captured when the turn starts and skips levelling while turning.
Verification. All 30 unit tests and 10 browser tests pass. The desktop spec checks that a moving mouse does not steer, that a held drag does, and that the U-turn ends facing backwards.
🤖 Generated with Claude Code
Summary by CodeRabbit