Repository navigation
CodeAIR in a hand on the page: move arrows, rotation rings and a ranger card - #174
Open
david-firia wants to merge 6 commits into
Open
david-firia wants to merge 6 commits into
david-firia wants to merge 6 commits into
Conversation
…er card A move button in the simulator's bar shows arrows and rings over CodeAIR, as a slicer draws them (view/handles.js): arrows forward and back, left and right, and up, rings for roll, pitch and heading, lined up with the drone's heading. A drag on an arrow slides along it, on a ring turns about it, on the drone itself slides it across the floor; each asks the world's hold() for the pose, and the button again releases it. Every part a finger takes is 44 CSS pixels across at any camera distance, the rings grow to go round the drone when the camera is near, and pointer events make a touch the same as a mouse. A card button puts the ranger card upright 20 cm ahead of the drone, facing it, for the rangefinders to read; the handles then move the card (a tap on the drone or the card picks which). The worker passes hold, release and card on to the world. Let go tipped, the drone now settles flat on the floor: its lean decayed with the step squared and so stayed. The figure tilts roll then pitch, as the world does, so a drone held both rolled and pitched is drawn as it reads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SS5gJ2c2Qc8EBGyMEjiPVq
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SS5gJ2c2Qc8EBGyMEjiPVq
|
Visit the preview URL for this PR (updated for commit ac02aaa): https://firialabs-open-editor--pr174-codeair-handles-esbi1aqj.web.app (expires Thu, 10 Dec 2026 16:51:14 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 81259a1fec315ca1af3747d225d9c7424890be3e |
The card stands near the view's edge with the camera close, and its forward arrow can fall outside the canvas. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SS5gJ2c2Qc8EBGyMEjiPVq
In CI's narrower view the card stood beside the camera, its handles off the page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SS5gJ2c2Qc8EBGyMEjiPVq
…he bar The camera's picture leaves out the handles drawn over the scene. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SS5gJ2c2Qc8EBGyMEjiPVq
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SS5gJ2c2Qc8EBGyMEjiPVq
This branch has not been deployed
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.
CodeAIR in the student's hand on the page: a toggle in the simulator's bar shows slicer-style move arrows and rotation rings over the drone, so a grounded drone can be slid and turned for the FLY ground missions, and a second toggle puts a reflector card in front of it for the rangefinders.
Builds on #173 (the world's
hold,releaseand ranger card, merged). It follows the bar-toggle pattern of #167 with its own classes, so it needs none of #167's code. Its move and card buttons share one CodeAIR group in the bar with #171's camera button (on a phone, the first line, beside BTN 0 and BTN 1), and the camera's picture leaves out the handles.The handles (
src/sim/view/handles.js). Arrows forward and back, left and right, and up; rings for roll, pitch and heading; all lined up with the drone's heading, in the room's axis colours. A drag on an arrow slides along it, on a ring turns about it, on the drone itself slides it across the floor. Each drag asks the world'shold()for the pose; the move button againreleases it, and it falls and settles flat.The card. Upright, 12 cm ahead of the drone, facing it; the front ranger reads it (about 80 mm). The handles move to the card when it appears (a tap on the drone or the card picks which), in the drone's frame, so sliding it toward the front ranger is along one arrow.
Two fixes the handles showed. A drone let go tipped stayed tipped on the floor (its lean decayed with the time step squared); it now settles flat. The figure tilted pitch then roll, the world roll then pitch; it now matches, so a drone held both rolled and pitched is drawn as it reads.
Tests (
tests/sim-ui.mjs, in the CodeAIR flight section): the move button shows the handles; the forward arrow, pressed 18 px to the side of its line, slides it forward; the up arrow lifts it; a touch on the heading ring turns it; the roll ring tips it; the card button puts a card the front ranger reads (and taken away, the room again); the card's arrow moves it; the move button again lets go and it settles flat.sim.mjs,i18n,pseudo,a11yandsmokepass locally. Locallysim-ui.mjstimed out twice in CodeBot's Run and Pause steps, well before this section, on a host at load 23 on 12 cores; CI passes.Not yet: no keyboard way to move the drone (the arrow keys stay the camera's).
Screenshots (phone 390 px, Chromebook 1366 px, desktop 1440 px)
Chromebook:

Desktop:
🤖 Generated with Claude Code
https://claude.ai/code/session_01SS5gJ2c2Qc8EBGyMEjiPVq