/** * CloudXRUI.tsx - CloudXR User Interface Component * * This component renders the in-VR user interface for the CloudXR application using * React Three UIKit. It provides: * - CloudXR branding and title display * - Server connection information and status display * - Interactive control buttons (Start Teleop, Reset Teleop, Disconnect) * - Responsive button layout with hover effects * - Integration with parent component event handlers * - Configurable position and rotation in world space for flexible UI placement * * The UI is positioned in 3D space and designed for VR/AR interaction with * visual feedback and clear button labeling. All interactions are passed * back to the parent component through callback props. */ import { Container, Text, Image } from '@react-three/uikit'; import { Button } from '@react-three/uikit-default'; import React from 'react'; interface CloudXRUIProps { onStartTeleop?: () => void; onDisconnect?: () => void; onResetTeleop?: () => void; serverAddress?: string; sessionStatus?: string; playLabel?: string; playDisabled?: boolean; countdownSeconds?: number; onCountdownIncrease?: () => void; onCountdownDecrease?: () => void; countdownDisabled?: boolean; position?: [number, number, number]; rotation?: [number, number, number]; } export default function CloudXR3DUI({ onStartTeleop, onDisconnect, onResetTeleop, serverAddress = '127.0.0.1', sessionStatus = 'Disconnected', playLabel = 'Play', playDisabled = false, countdownSeconds, onCountdownIncrease, onCountdownDecrease, countdownDisabled = false, position = [1.8, 1.75, -1.3], rotation = [0, -0.3, 0], }: CloudXRUIProps) { return ( {/* Title */} Controls {/* Server Info */} Server address: {serverAddress} Session status: {sessionStatus} {/* Countdown Config Row */} Countdown {countdownSeconds}s {/* Button Grid */} {/* Start/reset row*/} {/* Bottom Row */} ); }