feat: tactical icons, follow-camera orbit, and ship info panel
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user