cduss Claude Opus 4.5 commited on
Commit
1edf14b
·
1 Parent(s): 2882d76

Add desktop side-by-side layout and fix pitch direction

Browse files

- Add media query for desktop (900px+): video and controls side by side
- Fix joystick pitch: up now correctly looks up (was inverted)
- Canvas Y increases downward, so up = negative joystickY = negative pitch

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Files changed (1) hide show
  1. index.html +59 -4
index.html CHANGED
@@ -534,6 +534,61 @@
534
  font-family: monospace;
535
  }
536
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
537
  /* Login View */
538
  .login-view {
539
  min-height: 100vh;
@@ -1180,10 +1235,10 @@
1180
  const rollInput = parseFloat(rollSlider.value) / 100;
1181
 
1182
  // Joystick mapping:
1183
- // Left/Right (X) controls Yaw: left = positive yaw (turn left)
1184
- // Up/Down (Y) controls Pitch: up = negative pitch (look up)
1185
- targetYaw += -joystickX * speed; // Right = negative = turn right
1186
- targetPitch += -joystickY * speed; // Down = positive = look down
1187
  targetRoll += rollInput * speed;
1188
 
1189
  // Clamp to limits
 
534
  font-family: monospace;
535
  }
536
 
537
+ /* Desktop Layout - Side by Side */
538
+ @media (min-width: 900px) {
539
+ .app-container {
540
+ display: grid;
541
+ grid-template-columns: 1fr 1fr;
542
+ grid-template-rows: auto auto auto auto;
543
+ max-width: 1200px;
544
+ gap: 12px;
545
+ }
546
+
547
+ .video-container {
548
+ grid-column: 1;
549
+ grid-row: 1 / 3;
550
+ }
551
+
552
+ .state-bar {
553
+ grid-column: 1;
554
+ grid-row: 3;
555
+ }
556
+
557
+ #robotSelector {
558
+ grid-column: 1;
559
+ grid-row: 4;
560
+ }
561
+
562
+ .panel:nth-of-type(1) { /* Head Control */
563
+ grid-column: 2;
564
+ grid-row: 1;
565
+ }
566
+
567
+ .panel:nth-of-type(2) { /* Antennas */
568
+ grid-column: 2;
569
+ grid-row: 2;
570
+ }
571
+
572
+ .panel:nth-of-type(3) { /* Sound & Voice */
573
+ grid-column: 2;
574
+ grid-row: 3;
575
+ }
576
+
577
+ .panel:nth-of-type(4) { /* Recording */
578
+ grid-column: 2;
579
+ grid-row: 4;
580
+ }
581
+
582
+ .joystick-area {
583
+ width: 220px;
584
+ height: 220px;
585
+ }
586
+
587
+ .roll-slider {
588
+ height: 200px;
589
+ }
590
+ }
591
+
592
  /* Login View */
593
  .login-view {
594
  min-height: 100vh;
 
1235
  const rollInput = parseFloat(rollSlider.value) / 100;
1236
 
1237
  // Joystick mapping:
1238
+ // Left/Right (X) controls Yaw: right = turn head right (negative yaw)
1239
+ // Up/Down (Y) controls Pitch: up = look up (negative pitch in this coord system)
1240
+ targetYaw += -joystickX * speed;
1241
+ targetPitch += joystickY * speed; // Fixed: up (neg Y) → neg pitch → look up
1242
  targetRoll += rollInput * speed;
1243
 
1244
  // Clamp to limits