feat: tactical icons, follow-camera orbit, and ship info panel

This commit is contained in:
2026-03-18 22:45:33 -04:00
parent f98c47a8a7
commit aa4a6930ba
17 changed files with 154 additions and 118 deletions

View File

@@ -57,6 +57,8 @@ export function createViewerControllers(host: any) {
getPovLevel: () => host.povLevel,
getSelectedItems: () => host.selectedItems,
getOrbitYaw: () => host.orbitYaw,
getFollowOrbitYaw: () => host.followOrbitYaw,
getFollowOrbitPitch: () => host.followOrbitPitch,
galaxyAnchor: host.galaxyAnchor,
systemAnchor: host.systemAnchor,
galaxyCamera: host.galaxyLayer.camera,
@@ -240,8 +242,13 @@ export function createViewerControllers(host: any) {
getFollowCameraFocus: () => host.followCameraFocus,
screenPointFromClient: (x, y) => presentationController.screenPointFromClient(x, y),
applyOrbitDelta: (delta: THREE.Vector2) => {
host.orbitYaw += delta.x * 0.008;
host.orbitPitch = THREE.MathUtils.clamp(host.orbitPitch + delta.y * 0.004, 0.18, 1.3);
if (host.cameraMode === "follow") {
host.followOrbitYaw += delta.x * 0.008;
host.followOrbitPitch = THREE.MathUtils.clamp(host.followOrbitPitch + delta.y * 0.004, 0.02, 1.45);
} else {
host.orbitYaw += delta.x * 0.008;
host.orbitPitch = THREE.MathUtils.clamp(host.orbitPitch + delta.y * 0.004, 0.18, 1.3);
}
},
syncFollowStateFromSelection: () => navigationController.syncFollowStateFromSelection(),
updatePanels: () => host.updatePanels(),