spacemap 0.1.22 → 0.1.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -180,6 +180,8 @@ export declare interface CameraPose {
180
180
  /** The camera as it stands. `body` is what it orbits, which is also what the
181
181
  * map draws in most detail. */
182
182
  export declare interface CameraState extends Required<CameraAngles> {
183
+ /** What `lat`, `lon` and `distanceKm` are measured from: the focused body,
184
+ * or the one a landed probe in focus stands on. */
183
185
  body: string;
184
186
  lat: number;
185
187
  lon: number;
@@ -189,7 +191,7 @@ export declare interface CameraState extends Required<CameraAngles> {
189
191
  /** Somewhere to move the camera to. What is left out is left as it is. */
190
192
  export declare interface CameraTarget extends CameraOptions {
191
193
  /** A feature on `body` to look at, rather than the body as a whole. Its
192
- * size frames the view, so `distanceKm` is not needed. */
194
+ * size frames the view: `lat`, `lon` and `distanceKm` are not read. */
193
195
  feature?: FeatureRef;
194
196
  }
195
197
 
@@ -238,6 +240,15 @@ export declare interface ClockState {
238
240
  live: boolean;
239
241
  }
240
242
 
243
+ /** The nearest the camera comes to a body, in km. Both change as the body's
244
+ * relief and finer imagery load. */
245
+ export declare interface ClosestApproach {
246
+ /** From the body's centre to its ground under the camera. */
247
+ groundKm: number;
248
+ /** How far over that ground the camera stops. */
249
+ clearanceKm: number;
250
+ }
251
+
241
252
  /** What both maps take: where to put it, where its data comes from, and what
242
253
  * language to read it in. */
243
254
  declare interface CommonOptions {
@@ -931,7 +942,7 @@ export declare interface FocusChange {
931
942
  body: Body_2 | undefined;
932
943
  /** The first settle after boot. */
933
944
  initial: boolean;
934
- /** The camera orbits a surface feature; `body` is its host. */
945
+ /** The camera moved onto a surface feature of `body`. */
935
946
  feature: boolean;
936
947
  }
937
948
 
@@ -1994,6 +2005,10 @@ export declare class SpaceMap {
1994
2005
  /* Excluded from this release type: webglError */
1995
2006
  /* Excluded from this release type: contextLost */
1996
2007
  /* Excluded from this release type: focusedBody */
2008
+ /* Excluded from this release type: cameraBody */
2009
+ /** A move onto a surface feature is under way: the focus it hands the
2010
+ * host is that move's. */
2011
+ private movingToFeature;
1997
2012
  /* Excluded from this release type: attribution */
1998
2013
  /** Objects of the host's own: a spacecraft, a station, a body the export
1999
2014
  * has never heard of. */
@@ -2050,7 +2065,8 @@ export declare class SpaceMap {
2050
2065
  /** What the map knows about an object it has loaded; undefined for one it
2051
2066
  * has not, which for a small body may simply mean not yet. */
2052
2067
  getBody(id: string): Body_2 | undefined;
2053
- /** The object the camera orbits. A surface feature reports its host body. */
2068
+ /** The object in view. For a landed probe this is the probe, and the
2069
+ * camera orbits the body it stands on. */
2054
2070
  getFocusedBody(): Body_2 | undefined;
2055
2071
  /** Ids of the objects orbiting `id` that this map has loaded. Loading is
2056
2072
  * driven by focus and by the clock, so the list grows as the reader moves. */
@@ -2123,9 +2139,10 @@ export declare class SpaceMap {
2123
2139
  private placedAncestor;
2124
2140
  /** The renderer, once the map draws. Null when it never will. */
2125
2141
  private rendering;
2126
- /** Turn to a feature on the body already framed, without travelling to it —
2127
- * the move a click on its label makes. Resolves when the camera comes
2128
- * round. */
2142
+ /** Turn to a feature on the body already framed, without travelling to it.
2143
+ * This is the move a click on its label makes. On another body the camera
2144
+ * flies to the feature, as {@link SpaceMap.flyTo} does. Resolves when the
2145
+ * camera comes round. */
2129
2146
  panTo(target: FeatureTarget): Promise<void>;
2130
2147
  /**
2131
2148
  * Put the camera at a place at once, with no flight. Use it to restore a
@@ -2168,6 +2185,10 @@ export declare class SpaceMap {
2168
2185
  setLimits(limits: CameraLimits): this;
2169
2186
  /** The limits as they stand. */
2170
2187
  getLimits(): CameraLimits;
2188
+ /** How near the map lets the camera come to what it orbits, where the
2189
+ * camera is now, whatever {@link SpaceMap.setLimits} adds. Null while
2190
+ * nothing is focused. */
2191
+ getClosestApproach(): ClosestApproach | null;
2171
2192
  private applyLimits;
2172
2193
  private applyGestures;
2173
2194
  /* Excluded from this release type: setStarSelectEnabled */