@johnmorrisdotca/wakusei-planets 0.67.0 → 0.68.0

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.
Files changed (250) hide show
  1. package/CHANGELOG.md +13 -2
  2. package/NOTICE.md +10 -0
  3. package/README.md +3 -3
  4. package/dist/data/moon-catalogue.d.ts +1 -1
  5. package/dist/data/moon-catalogue.js +1 -1
  6. package/dist/data/places-added.d.ts +2 -0
  7. package/dist/data/places-added.js +2 -0
  8. package/dist/data/places-aliases.d.ts +1 -0
  9. package/dist/data/places-aliases.js +14 -0
  10. package/dist/data/places-planned.js +1 -1
  11. package/dist/data/places-search-67p.d.ts +1 -0
  12. package/dist/data/places-search-67p.js +3 -0
  13. package/dist/data/places-search-amalthea.d.ts +1 -0
  14. package/dist/data/places-search-amalthea.js +3 -0
  15. package/dist/data/places-search-ariel.d.ts +1 -0
  16. package/dist/data/places-search-ariel.js +3 -0
  17. package/dist/data/places-search-bennu.d.ts +1 -0
  18. package/dist/data/places-search-bennu.js +3 -0
  19. package/dist/data/places-search-bodies.d.ts +25 -0
  20. package/dist/data/places-search-bodies.js +125 -0
  21. package/dist/data/places-search-callisto.d.ts +1 -0
  22. package/dist/data/places-search-callisto.js +3 -0
  23. package/dist/data/places-search-ceres.d.ts +1 -0
  24. package/dist/data/places-search-ceres.js +3 -0
  25. package/dist/data/places-search-charon.d.ts +1 -0
  26. package/dist/data/places-search-charon.js +3 -0
  27. package/dist/data/places-search-dactyl.d.ts +1 -0
  28. package/dist/data/places-search-dactyl.js +3 -0
  29. package/dist/data/places-search-deimos.d.ts +1 -0
  30. package/dist/data/places-search-deimos.js +3 -0
  31. package/dist/data/places-search-didymos.d.ts +1 -0
  32. package/dist/data/places-search-didymos.js +3 -0
  33. package/dist/data/places-search-dimorphos.d.ts +1 -0
  34. package/dist/data/places-search-dimorphos.js +3 -0
  35. package/dist/data/places-search-dinkinesh.d.ts +1 -0
  36. package/dist/data/places-search-dinkinesh.js +3 -0
  37. package/dist/data/places-search-dione.d.ts +1 -0
  38. package/dist/data/places-search-dione.js +3 -0
  39. package/dist/data/places-search-donaldjohanson.d.ts +1 -0
  40. package/dist/data/places-search-donaldjohanson.js +3 -0
  41. package/dist/data/places-search-enceladus.d.ts +1 -0
  42. package/dist/data/places-search-enceladus.js +3 -0
  43. package/dist/data/places-search-epimetheus.d.ts +1 -0
  44. package/dist/data/places-search-epimetheus.js +3 -0
  45. package/dist/data/places-search-eros.d.ts +1 -0
  46. package/dist/data/places-search-eros.js +3 -0
  47. package/dist/data/places-search-europa.d.ts +1 -0
  48. package/dist/data/places-search-europa.js +3 -0
  49. package/dist/data/places-search-ganymede.d.ts +1 -0
  50. package/dist/data/places-search-ganymede.js +3 -0
  51. package/dist/data/places-search-gaspra.d.ts +1 -0
  52. package/dist/data/places-search-gaspra.js +3 -0
  53. package/dist/data/places-search-hyperion.d.ts +1 -0
  54. package/dist/data/places-search-hyperion.js +3 -0
  55. package/dist/data/places-search-iapetus.d.ts +1 -0
  56. package/dist/data/places-search-iapetus.js +3 -0
  57. package/dist/data/places-search-ida.d.ts +1 -0
  58. package/dist/data/places-search-ida.js +3 -0
  59. package/dist/data/places-search-io.d.ts +1 -0
  60. package/dist/data/places-search-io.js +3 -0
  61. package/dist/data/places-search-itokawa.d.ts +1 -0
  62. package/dist/data/places-search-itokawa.js +3 -0
  63. package/dist/data/places-search-janus.d.ts +1 -0
  64. package/dist/data/places-search-janus.js +3 -0
  65. package/dist/data/places-search-jupiter.d.ts +1 -0
  66. package/dist/data/places-search-jupiter.js +3 -0
  67. package/dist/data/places-search-lutetia.d.ts +1 -0
  68. package/dist/data/places-search-lutetia.js +3 -0
  69. package/dist/data/places-search-mars.d.ts +1 -0
  70. package/dist/data/places-search-mars.js +3 -0
  71. package/dist/data/places-search-mathilde.d.ts +1 -0
  72. package/dist/data/places-search-mathilde.js +3 -0
  73. package/dist/data/places-search-mercury.d.ts +1 -0
  74. package/dist/data/places-search-mercury.js +3 -0
  75. package/dist/data/places-search-mimas.d.ts +1 -0
  76. package/dist/data/places-search-mimas.js +3 -0
  77. package/dist/data/places-search-miranda.d.ts +1 -0
  78. package/dist/data/places-search-miranda.js +3 -0
  79. package/dist/data/places-search-moon-satellites.d.ts +1 -0
  80. package/dist/data/places-search-moon-satellites.js +3 -0
  81. package/dist/data/places-search-moon.d.ts +1 -0
  82. package/dist/data/places-search-moon.js +3 -0
  83. package/dist/data/places-search-oberon.d.ts +1 -0
  84. package/dist/data/places-search-oberon.js +3 -0
  85. package/dist/data/places-search-phobos.d.ts +1 -0
  86. package/dist/data/places-search-phobos.js +3 -0
  87. package/dist/data/places-search-phoebe.d.ts +1 -0
  88. package/dist/data/places-search-phoebe.js +3 -0
  89. package/dist/data/places-search-pluto.d.ts +1 -0
  90. package/dist/data/places-search-pluto.js +3 -0
  91. package/dist/data/places-search-proteus.d.ts +1 -0
  92. package/dist/data/places-search-proteus.js +3 -0
  93. package/dist/data/places-search-rhea.d.ts +1 -0
  94. package/dist/data/places-search-rhea.js +3 -0
  95. package/dist/data/places-search-ryugu.d.ts +1 -0
  96. package/dist/data/places-search-ryugu.js +3 -0
  97. package/dist/data/places-search-saturn.d.ts +1 -0
  98. package/dist/data/places-search-saturn.js +3 -0
  99. package/dist/data/places-search-steins.d.ts +1 -0
  100. package/dist/data/places-search-steins.js +3 -0
  101. package/dist/data/places-search-tempel-1.d.ts +1 -0
  102. package/dist/data/places-search-tempel-1.js +3 -0
  103. package/dist/data/places-search-tethys.d.ts +1 -0
  104. package/dist/data/places-search-tethys.js +3 -0
  105. package/dist/data/places-search-thebe.d.ts +1 -0
  106. package/dist/data/places-search-thebe.js +3 -0
  107. package/dist/data/places-search-titan.d.ts +1 -0
  108. package/dist/data/places-search-titan.js +3 -0
  109. package/dist/data/places-search-titania.d.ts +1 -0
  110. package/dist/data/places-search-titania.js +3 -0
  111. package/dist/data/places-search-triton.d.ts +1 -0
  112. package/dist/data/places-search-triton.js +3 -0
  113. package/dist/data/places-search-types.d.ts +1 -0
  114. package/dist/data/places-search-types.js +59 -0
  115. package/dist/data/places-search-umbriel.d.ts +1 -0
  116. package/dist/data/places-search-umbriel.js +3 -0
  117. package/dist/data/places-search-venus.d.ts +1 -0
  118. package/dist/data/places-search-venus.js +3 -0
  119. package/dist/data/places-search-vesta.d.ts +1 -0
  120. package/dist/data/places-search-vesta.js +3 -0
  121. package/dist/fact-sheets.d.ts +1 -1
  122. package/dist/fact-sheets.js +1 -1
  123. package/dist/flat/words.js +2 -0
  124. package/dist/moon-catalogue.d.ts +190 -0
  125. package/dist/moon-catalogue.js +189 -3
  126. package/dist/place-marks.js +1 -1
  127. package/dist/place-search.d.ts +157 -0
  128. package/dist/place-search.js +198 -0
  129. package/dist/places/moon.js +4 -1
  130. package/dist/places/search/67p.d.ts +12 -0
  131. package/dist/places/search/67p.js +14 -0
  132. package/dist/places/search/amalthea.d.ts +12 -0
  133. package/dist/places/search/amalthea.js +14 -0
  134. package/dist/places/search/ariel.d.ts +12 -0
  135. package/dist/places/search/ariel.js +14 -0
  136. package/dist/places/search/bennu.d.ts +12 -0
  137. package/dist/places/search/bennu.js +14 -0
  138. package/dist/places/search/callisto.d.ts +12 -0
  139. package/dist/places/search/callisto.js +14 -0
  140. package/dist/places/search/ceres.d.ts +12 -0
  141. package/dist/places/search/ceres.js +14 -0
  142. package/dist/places/search/charon.d.ts +12 -0
  143. package/dist/places/search/charon.js +14 -0
  144. package/dist/places/search/dactyl.d.ts +12 -0
  145. package/dist/places/search/dactyl.js +14 -0
  146. package/dist/places/search/deimos.d.ts +12 -0
  147. package/dist/places/search/deimos.js +14 -0
  148. package/dist/places/search/didymos.d.ts +12 -0
  149. package/dist/places/search/didymos.js +14 -0
  150. package/dist/places/search/dimorphos.d.ts +12 -0
  151. package/dist/places/search/dimorphos.js +14 -0
  152. package/dist/places/search/dinkinesh.d.ts +12 -0
  153. package/dist/places/search/dinkinesh.js +14 -0
  154. package/dist/places/search/dione.d.ts +12 -0
  155. package/dist/places/search/dione.js +14 -0
  156. package/dist/places/search/donaldjohanson.d.ts +12 -0
  157. package/dist/places/search/donaldjohanson.js +14 -0
  158. package/dist/places/search/enceladus.d.ts +12 -0
  159. package/dist/places/search/enceladus.js +14 -0
  160. package/dist/places/search/epimetheus.d.ts +12 -0
  161. package/dist/places/search/epimetheus.js +14 -0
  162. package/dist/places/search/eros.d.ts +12 -0
  163. package/dist/places/search/eros.js +14 -0
  164. package/dist/places/search/europa.d.ts +12 -0
  165. package/dist/places/search/europa.js +14 -0
  166. package/dist/places/search/ganymede.d.ts +12 -0
  167. package/dist/places/search/ganymede.js +14 -0
  168. package/dist/places/search/gaspra.d.ts +12 -0
  169. package/dist/places/search/gaspra.js +14 -0
  170. package/dist/places/search/hyperion.d.ts +12 -0
  171. package/dist/places/search/hyperion.js +14 -0
  172. package/dist/places/search/iapetus.d.ts +12 -0
  173. package/dist/places/search/iapetus.js +14 -0
  174. package/dist/places/search/ida.d.ts +12 -0
  175. package/dist/places/search/ida.js +14 -0
  176. package/dist/places/search/io.d.ts +12 -0
  177. package/dist/places/search/io.js +14 -0
  178. package/dist/places/search/itokawa.d.ts +12 -0
  179. package/dist/places/search/itokawa.js +14 -0
  180. package/dist/places/search/janus.d.ts +12 -0
  181. package/dist/places/search/janus.js +14 -0
  182. package/dist/places/search/jupiter.d.ts +12 -0
  183. package/dist/places/search/jupiter.js +14 -0
  184. package/dist/places/search/lutetia.d.ts +12 -0
  185. package/dist/places/search/lutetia.js +14 -0
  186. package/dist/places/search/mars.d.ts +12 -0
  187. package/dist/places/search/mars.js +14 -0
  188. package/dist/places/search/mathilde.d.ts +12 -0
  189. package/dist/places/search/mathilde.js +14 -0
  190. package/dist/places/search/mercury.d.ts +12 -0
  191. package/dist/places/search/mercury.js +14 -0
  192. package/dist/places/search/mimas.d.ts +12 -0
  193. package/dist/places/search/mimas.js +14 -0
  194. package/dist/places/search/miranda.d.ts +12 -0
  195. package/dist/places/search/miranda.js +14 -0
  196. package/dist/places/search/moon-satellites.d.ts +12 -0
  197. package/dist/places/search/moon-satellites.js +14 -0
  198. package/dist/places/search/moon.d.ts +12 -0
  199. package/dist/places/search/moon.js +14 -0
  200. package/dist/places/search/oberon.d.ts +12 -0
  201. package/dist/places/search/oberon.js +14 -0
  202. package/dist/places/search/phobos.d.ts +12 -0
  203. package/dist/places/search/phobos.js +14 -0
  204. package/dist/places/search/phoebe.d.ts +12 -0
  205. package/dist/places/search/phoebe.js +14 -0
  206. package/dist/places/search/pluto.d.ts +12 -0
  207. package/dist/places/search/pluto.js +14 -0
  208. package/dist/places/search/proteus.d.ts +12 -0
  209. package/dist/places/search/proteus.js +14 -0
  210. package/dist/places/search/rhea.d.ts +12 -0
  211. package/dist/places/search/rhea.js +14 -0
  212. package/dist/places/search/ryugu.d.ts +12 -0
  213. package/dist/places/search/ryugu.js +14 -0
  214. package/dist/places/search/saturn.d.ts +12 -0
  215. package/dist/places/search/saturn.js +14 -0
  216. package/dist/places/search/steins.d.ts +12 -0
  217. package/dist/places/search/steins.js +14 -0
  218. package/dist/places/search/tempel-1.d.ts +12 -0
  219. package/dist/places/search/tempel-1.js +14 -0
  220. package/dist/places/search/tethys.d.ts +12 -0
  221. package/dist/places/search/tethys.js +14 -0
  222. package/dist/places/search/thebe.d.ts +12 -0
  223. package/dist/places/search/thebe.js +14 -0
  224. package/dist/places/search/titan.d.ts +12 -0
  225. package/dist/places/search/titan.js +14 -0
  226. package/dist/places/search/titania.d.ts +12 -0
  227. package/dist/places/search/titania.js +14 -0
  228. package/dist/places/search/triton.d.ts +12 -0
  229. package/dist/places/search/triton.js +14 -0
  230. package/dist/places/search/umbriel.d.ts +12 -0
  231. package/dist/places/search/umbriel.js +14 -0
  232. package/dist/places/search/venus.d.ts +12 -0
  233. package/dist/places/search/venus.js +14 -0
  234. package/dist/places/search/vesta.d.ts +12 -0
  235. package/dist/places/search/vesta.js +14 -0
  236. package/dist/places/search.d.ts +25 -0
  237. package/dist/places/search.js +28 -0
  238. package/dist/places.d.ts +4 -3
  239. package/dist/scene/place-layer.js +1 -0
  240. package/dist/space/all-moons.d.ts +81 -10
  241. package/dist/space/all-moons.js +132 -27
  242. package/dist/space/element.d.ts +31 -5
  243. package/dist/space/element.js +122 -23
  244. package/dist/space/moon-settings.d.ts +25 -0
  245. package/dist/space/moon-settings.js +43 -0
  246. package/dist/space/orbit-rules.d.ts +25 -0
  247. package/dist/space/orbit-rules.js +36 -0
  248. package/dist/space/scene.d.ts +9 -3
  249. package/dist/space/scene.js +27 -17
  250. package/package.json +271 -1
@@ -0,0 +1,12 @@
1
+ import { type PlaceHit } from "../../place-search.ts";
2
+ /**
3
+ * The search list of comet Tempel 1: 1 rows (0 named features, the rest sites), the sites first by date, then the features in the order of their Gazetteer ids. Read from a compact table when the entry is first imported.
4
+ *
5
+ * @example
6
+ * ```ts
7
+ * import { PLACE_HITS_TEMPEL_1 } from "@johnmorrisdotca/wakusei-planets/places/search/tempel-1";
8
+ *
9
+ * console.log(PLACE_HITS_TEMPEL_1.length, "rows;", PLACE_HITS_TEMPEL_1[0]?.name.en);
10
+ * ```
11
+ */
12
+ export declare const PLACE_HITS_TEMPEL_1: readonly PlaceHit[];
@@ -0,0 +1,14 @@
1
+ // The search list of comet Tempel 1: one row for each point of interest, from the IAU Gazetteer of Planetary Nomenclature and the sites. See `/places/search` for the record's shape and the search.
2
+ import { SEARCH_TEMPEL_1 as DATA } from "../../data/places-search-tempel-1.js";
3
+ import { readPlaceHits } from "../../place-search.js";
4
+ /**
5
+ * The search list of comet Tempel 1: 1 rows (0 named features, the rest sites), the sites first by date, then the features in the order of their Gazetteer ids. Read from a compact table when the entry is first imported.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * import { PLACE_HITS_TEMPEL_1 } from "@johnmorrisdotca/wakusei-planets/places/search/tempel-1";
10
+ *
11
+ * console.log(PLACE_HITS_TEMPEL_1.length, "rows;", PLACE_HITS_TEMPEL_1[0]?.name.en);
12
+ * ```
13
+ */
14
+ export const PLACE_HITS_TEMPEL_1 = readPlaceHits("tempel-1", DATA);
@@ -0,0 +1,12 @@
1
+ import { type PlaceHit } from "../../place-search.ts";
2
+ /**
3
+ * The search list of Tethys: 53 rows (53 named features, the rest sites), the sites first by date, then the features in the order of their Gazetteer ids. Read from a compact table when the entry is first imported.
4
+ *
5
+ * @example
6
+ * ```ts
7
+ * import { PLACE_HITS_TETHYS } from "@johnmorrisdotca/wakusei-planets/places/search/tethys";
8
+ *
9
+ * console.log(PLACE_HITS_TETHYS.length, "rows;", PLACE_HITS_TETHYS[0]?.name.en);
10
+ * ```
11
+ */
12
+ export declare const PLACE_HITS_TETHYS: readonly PlaceHit[];
@@ -0,0 +1,14 @@
1
+ // The search list of Tethys: one row for each point of interest, from the IAU Gazetteer of Planetary Nomenclature and the sites. See `/places/search` for the record's shape and the search.
2
+ import { SEARCH_TETHYS as DATA } from "../../data/places-search-tethys.js";
3
+ import { readPlaceHits } from "../../place-search.js";
4
+ /**
5
+ * The search list of Tethys: 53 rows (53 named features, the rest sites), the sites first by date, then the features in the order of their Gazetteer ids. Read from a compact table when the entry is first imported.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * import { PLACE_HITS_TETHYS } from "@johnmorrisdotca/wakusei-planets/places/search/tethys";
10
+ *
11
+ * console.log(PLACE_HITS_TETHYS.length, "rows;", PLACE_HITS_TETHYS[0]?.name.en);
12
+ * ```
13
+ */
14
+ export const PLACE_HITS_TETHYS = readPlaceHits("tethys", DATA);
@@ -0,0 +1,12 @@
1
+ import { type PlaceHit } from "../../place-search.ts";
2
+ /**
3
+ * The search list of Thebe: 1 rows (1 named features, the rest sites), the sites first by date, then the features in the order of their Gazetteer ids. Read from a compact table when the entry is first imported.
4
+ *
5
+ * @example
6
+ * ```ts
7
+ * import { PLACE_HITS_THEBE } from "@johnmorrisdotca/wakusei-planets/places/search/thebe";
8
+ *
9
+ * console.log(PLACE_HITS_THEBE.length, "rows;", PLACE_HITS_THEBE[0]?.name.en);
10
+ * ```
11
+ */
12
+ export declare const PLACE_HITS_THEBE: readonly PlaceHit[];
@@ -0,0 +1,14 @@
1
+ // The search list of Thebe: one row for each point of interest, from the IAU Gazetteer of Planetary Nomenclature and the sites. See `/places/search` for the record's shape and the search.
2
+ import { SEARCH_THEBE as DATA } from "../../data/places-search-thebe.js";
3
+ import { readPlaceHits } from "../../place-search.js";
4
+ /**
5
+ * The search list of Thebe: 1 rows (1 named features, the rest sites), the sites first by date, then the features in the order of their Gazetteer ids. Read from a compact table when the entry is first imported.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * import { PLACE_HITS_THEBE } from "@johnmorrisdotca/wakusei-planets/places/search/thebe";
10
+ *
11
+ * console.log(PLACE_HITS_THEBE.length, "rows;", PLACE_HITS_THEBE[0]?.name.en);
12
+ * ```
13
+ */
14
+ export const PLACE_HITS_THEBE = readPlaceHits("thebe", DATA);
@@ -0,0 +1,12 @@
1
+ import { type PlaceHit } from "../../place-search.ts";
2
+ /**
3
+ * The search list of Titan: 305 rows (304 named features, the rest sites), the sites first by date, then the features in the order of their Gazetteer ids. Read from a compact table when the entry is first imported.
4
+ *
5
+ * @example
6
+ * ```ts
7
+ * import { PLACE_HITS_TITAN } from "@johnmorrisdotca/wakusei-planets/places/search/titan";
8
+ *
9
+ * console.log(PLACE_HITS_TITAN.length, "rows;", PLACE_HITS_TITAN[0]?.name.en);
10
+ * ```
11
+ */
12
+ export declare const PLACE_HITS_TITAN: readonly PlaceHit[];
@@ -0,0 +1,14 @@
1
+ // The search list of Titan: one row for each point of interest, from the IAU Gazetteer of Planetary Nomenclature and the sites. See `/places/search` for the record's shape and the search.
2
+ import { SEARCH_TITAN as DATA } from "../../data/places-search-titan.js";
3
+ import { readPlaceHits } from "../../place-search.js";
4
+ /**
5
+ * The search list of Titan: 305 rows (304 named features, the rest sites), the sites first by date, then the features in the order of their Gazetteer ids. Read from a compact table when the entry is first imported.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * import { PLACE_HITS_TITAN } from "@johnmorrisdotca/wakusei-planets/places/search/titan";
10
+ *
11
+ * console.log(PLACE_HITS_TITAN.length, "rows;", PLACE_HITS_TITAN[0]?.name.en);
12
+ * ```
13
+ */
14
+ export const PLACE_HITS_TITAN = readPlaceHits("titan", DATA);
@@ -0,0 +1,12 @@
1
+ import { type PlaceHit } from "../../place-search.ts";
2
+ /**
3
+ * The search list of Titania: 18 rows (18 named features, the rest sites), the sites first by date, then the features in the order of their Gazetteer ids. Read from a compact table when the entry is first imported.
4
+ *
5
+ * @example
6
+ * ```ts
7
+ * import { PLACE_HITS_TITANIA } from "@johnmorrisdotca/wakusei-planets/places/search/titania";
8
+ *
9
+ * console.log(PLACE_HITS_TITANIA.length, "rows;", PLACE_HITS_TITANIA[0]?.name.en);
10
+ * ```
11
+ */
12
+ export declare const PLACE_HITS_TITANIA: readonly PlaceHit[];
@@ -0,0 +1,14 @@
1
+ // The search list of Titania: one row for each point of interest, from the IAU Gazetteer of Planetary Nomenclature and the sites. See `/places/search` for the record's shape and the search.
2
+ import { SEARCH_TITANIA as DATA } from "../../data/places-search-titania.js";
3
+ import { readPlaceHits } from "../../place-search.js";
4
+ /**
5
+ * The search list of Titania: 18 rows (18 named features, the rest sites), the sites first by date, then the features in the order of their Gazetteer ids. Read from a compact table when the entry is first imported.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * import { PLACE_HITS_TITANIA } from "@johnmorrisdotca/wakusei-planets/places/search/titania";
10
+ *
11
+ * console.log(PLACE_HITS_TITANIA.length, "rows;", PLACE_HITS_TITANIA[0]?.name.en);
12
+ * ```
13
+ */
14
+ export const PLACE_HITS_TITANIA = readPlaceHits("titania", DATA);
@@ -0,0 +1,12 @@
1
+ import { type PlaceHit } from "../../place-search.ts";
2
+ /**
3
+ * The search list of Triton: 63 rows (63 named features, the rest sites), the sites first by date, then the features in the order of their Gazetteer ids. Read from a compact table when the entry is first imported.
4
+ *
5
+ * @example
6
+ * ```ts
7
+ * import { PLACE_HITS_TRITON } from "@johnmorrisdotca/wakusei-planets/places/search/triton";
8
+ *
9
+ * console.log(PLACE_HITS_TRITON.length, "rows;", PLACE_HITS_TRITON[0]?.name.en);
10
+ * ```
11
+ */
12
+ export declare const PLACE_HITS_TRITON: readonly PlaceHit[];
@@ -0,0 +1,14 @@
1
+ // The search list of Triton: one row for each point of interest, from the IAU Gazetteer of Planetary Nomenclature and the sites. See `/places/search` for the record's shape and the search.
2
+ import { SEARCH_TRITON as DATA } from "../../data/places-search-triton.js";
3
+ import { readPlaceHits } from "../../place-search.js";
4
+ /**
5
+ * The search list of Triton: 63 rows (63 named features, the rest sites), the sites first by date, then the features in the order of their Gazetteer ids. Read from a compact table when the entry is first imported.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * import { PLACE_HITS_TRITON } from "@johnmorrisdotca/wakusei-planets/places/search/triton";
10
+ *
11
+ * console.log(PLACE_HITS_TRITON.length, "rows;", PLACE_HITS_TRITON[0]?.name.en);
12
+ * ```
13
+ */
14
+ export const PLACE_HITS_TRITON = readPlaceHits("triton", DATA);
@@ -0,0 +1,12 @@
1
+ import { type PlaceHit } from "../../place-search.ts";
2
+ /**
3
+ * The search list of Umbriel: 13 rows (13 named features, the rest sites), the sites first by date, then the features in the order of their Gazetteer ids. Read from a compact table when the entry is first imported.
4
+ *
5
+ * @example
6
+ * ```ts
7
+ * import { PLACE_HITS_UMBRIEL } from "@johnmorrisdotca/wakusei-planets/places/search/umbriel";
8
+ *
9
+ * console.log(PLACE_HITS_UMBRIEL.length, "rows;", PLACE_HITS_UMBRIEL[0]?.name.en);
10
+ * ```
11
+ */
12
+ export declare const PLACE_HITS_UMBRIEL: readonly PlaceHit[];
@@ -0,0 +1,14 @@
1
+ // The search list of Umbriel: one row for each point of interest, from the IAU Gazetteer of Planetary Nomenclature and the sites. See `/places/search` for the record's shape and the search.
2
+ import { SEARCH_UMBRIEL as DATA } from "../../data/places-search-umbriel.js";
3
+ import { readPlaceHits } from "../../place-search.js";
4
+ /**
5
+ * The search list of Umbriel: 13 rows (13 named features, the rest sites), the sites first by date, then the features in the order of their Gazetteer ids. Read from a compact table when the entry is first imported.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * import { PLACE_HITS_UMBRIEL } from "@johnmorrisdotca/wakusei-planets/places/search/umbriel";
10
+ *
11
+ * console.log(PLACE_HITS_UMBRIEL.length, "rows;", PLACE_HITS_UMBRIEL[0]?.name.en);
12
+ * ```
13
+ */
14
+ export const PLACE_HITS_UMBRIEL = readPlaceHits("umbriel", DATA);
@@ -0,0 +1,12 @@
1
+ import { type PlaceHit } from "../../place-search.ts";
2
+ /**
3
+ * The search list of Venus: 2003 rows (1985 named features, the rest sites), the sites first by date, then the features in the order of their Gazetteer ids. Read from a compact table when the entry is first imported.
4
+ *
5
+ * @example
6
+ * ```ts
7
+ * import { PLACE_HITS_VENUS } from "@johnmorrisdotca/wakusei-planets/places/search/venus";
8
+ *
9
+ * console.log(PLACE_HITS_VENUS.length, "rows;", PLACE_HITS_VENUS[0]?.name.en);
10
+ * ```
11
+ */
12
+ export declare const PLACE_HITS_VENUS: readonly PlaceHit[];
@@ -0,0 +1,14 @@
1
+ // The search list of Venus: one row for each point of interest, from the IAU Gazetteer of Planetary Nomenclature and the sites. See `/places/search` for the record's shape and the search.
2
+ import { SEARCH_VENUS as DATA } from "../../data/places-search-venus.js";
3
+ import { readPlaceHits } from "../../place-search.js";
4
+ /**
5
+ * The search list of Venus: 2003 rows (1985 named features, the rest sites), the sites first by date, then the features in the order of their Gazetteer ids. Read from a compact table when the entry is first imported.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * import { PLACE_HITS_VENUS } from "@johnmorrisdotca/wakusei-planets/places/search/venus";
10
+ *
11
+ * console.log(PLACE_HITS_VENUS.length, "rows;", PLACE_HITS_VENUS[0]?.name.en);
12
+ * ```
13
+ */
14
+ export const PLACE_HITS_VENUS = readPlaceHits("venus", DATA);
@@ -0,0 +1,12 @@
1
+ import { type PlaceHit } from "../../place-search.ts";
2
+ /**
3
+ * The search list of Vesta: 106 rows (106 named features, the rest sites), the sites first by date, then the features in the order of their Gazetteer ids. Read from a compact table when the entry is first imported.
4
+ *
5
+ * @example
6
+ * ```ts
7
+ * import { PLACE_HITS_VESTA } from "@johnmorrisdotca/wakusei-planets/places/search/vesta";
8
+ *
9
+ * console.log(PLACE_HITS_VESTA.length, "rows;", PLACE_HITS_VESTA[0]?.name.en);
10
+ * ```
11
+ */
12
+ export declare const PLACE_HITS_VESTA: readonly PlaceHit[];
@@ -0,0 +1,14 @@
1
+ // The search list of Vesta: one row for each point of interest, from the IAU Gazetteer of Planetary Nomenclature and the sites. See `/places/search` for the record's shape and the search.
2
+ import { SEARCH_VESTA as DATA } from "../../data/places-search-vesta.js";
3
+ import { readPlaceHits } from "../../place-search.js";
4
+ /**
5
+ * The search list of Vesta: 106 rows (106 named features, the rest sites), the sites first by date, then the features in the order of their Gazetteer ids. Read from a compact table when the entry is first imported.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * import { PLACE_HITS_VESTA } from "@johnmorrisdotca/wakusei-planets/places/search/vesta";
10
+ *
11
+ * console.log(PLACE_HITS_VESTA.length, "rows;", PLACE_HITS_VESTA[0]?.name.en);
12
+ * ```
13
+ */
14
+ export const PLACE_HITS_VESTA = readPlaceHits("vesta", DATA);
@@ -0,0 +1,25 @@
1
+ import { type PlaceSearchBody } from "../data/places-search-bodies.ts";
2
+ import type { PlaceHit } from "../place-search.ts";
3
+ export { hitToPlace, PLACE_KIND_WORDS, placeHitUrl, readPlaceHits, resolvePlaceId, searchPlaces, SEARCH_SOURCE_IDS, type PlaceHit } from "../place-search.ts";
4
+ export { PLACE_SEARCH_BODIES, type PlaceSearchBody } from "../data/places-search-bodies.ts";
5
+ /**
6
+ * The search list of a body, fetched when asked for: the table of `/places/search/<body>` arrives as a chunk of its own the first time, so a page that never searches a body does not carry it. The Moon's 7,064 lettered satellite craters are a chunk
7
+ * of their own too, fetched only with `{ satellites: true }`.
8
+ *
9
+ * @param body - One of `PLACE_SEARCH_BODIES`: `moon`, `mars`, `venus`, `ceres`, `phobos`, `itokawa` and the rest.
10
+ * @param options - `satellites: true` adds the Moon's lettered craters to the list of `moon` (nothing for any other body).
11
+ * @returns The list: the sites first, by date, then the named features in the order of their Gazetteer ids (the larger bodies' search puts the larger ones first anyway: `searchPlaces` ranks). An unknown body is a rejected `RangeError`.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * import { loadPlaceSearch, searchPlaces } from "@johnmorrisdotca/wakusei-planets/places/search";
16
+ *
17
+ * const mars = await loadPlaceSearch("mars");
18
+ * console.log(mars.length, "points of interest on Mars;", searchPlaces(mars, "perseverance", { limit: 3 }).map((hit) => hit.name.en).join(", "));
19
+ * const moon = await loadPlaceSearch("moon", { satellites: true });
20
+ * console.log(moon.length, "on the Moon, with the lettered craters");
21
+ * ```
22
+ */
23
+ export declare function loadPlaceSearch(body: PlaceSearchBody, options?: {
24
+ satellites?: boolean;
25
+ }): Promise<readonly PlaceHit[]>;
@@ -0,0 +1,28 @@
1
+ // The search lists of every point of interest on every body, and the search over them. The lists are the entry points `/places/search/<body>`, fetched one at a time by `loadPlaceSearch`; see `/places` for the full records of the larger bodies.
2
+ import { PLACE_SEARCH_BODIES, readSearchTable } from "../data/places-search-bodies.js";
3
+ export { hitToPlace, PLACE_KIND_WORDS, placeHitUrl, readPlaceHits, resolvePlaceId, searchPlaces, SEARCH_SOURCE_IDS } from "../place-search.js";
4
+ export { PLACE_SEARCH_BODIES } from "../data/places-search-bodies.js";
5
+ /**
6
+ * The search list of a body, fetched when asked for: the table of `/places/search/<body>` arrives as a chunk of its own the first time, so a page that never searches a body does not carry it. The Moon's 7,064 lettered satellite craters are a chunk
7
+ * of their own too, fetched only with `{ satellites: true }`.
8
+ *
9
+ * @param body - One of `PLACE_SEARCH_BODIES`: `moon`, `mars`, `venus`, `ceres`, `phobos`, `itokawa` and the rest.
10
+ * @param options - `satellites: true` adds the Moon's lettered craters to the list of `moon` (nothing for any other body).
11
+ * @returns The list: the sites first, by date, then the named features in the order of their Gazetteer ids (the larger bodies' search puts the larger ones first anyway: `searchPlaces` ranks). An unknown body is a rejected `RangeError`.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * import { loadPlaceSearch, searchPlaces } from "@johnmorrisdotca/wakusei-planets/places/search";
16
+ *
17
+ * const mars = await loadPlaceSearch("mars");
18
+ * console.log(mars.length, "points of interest on Mars;", searchPlaces(mars, "perseverance", { limit: 3 }).map((hit) => hit.name.en).join(", "));
19
+ * const moon = await loadPlaceSearch("moon", { satellites: true });
20
+ * console.log(moon.length, "on the Moon, with the lettered craters");
21
+ * ```
22
+ */
23
+ export async function loadPlaceSearch(body, options = {}) {
24
+ if (!PLACE_SEARCH_BODIES.includes(body))
25
+ throw new RangeError(`search lists are held for ${PLACE_SEARCH_BODIES.join(", ")}, not "${String(body)}"`);
26
+ const list = await readSearchTable(body);
27
+ return body === "moon" && options.satellites === true ? [...list, ...(await readSearchTable("moon-satellites"))] : list;
28
+ }
package/dist/places.d.ts CHANGED
@@ -4,17 +4,18 @@ export type { When } from "./when.ts";
4
4
  export { layerOf, MARK_RULES, PLACE_LAYERS, marksToShow, placeMarks, placeRank, type Obstacle, pointUnder, readPlaceLayers, readSurfaceNames, spotView, surfacePoint, turnToPlace, type PlaceLayer, type PlaceMark, type SpotView, type SurfaceSpot, type SurfaceView } from "./place-marks.ts";
5
5
  /**
6
6
  * What a place is: a `crewed` landing (an Apollo lunar module), a `landing` (a lander that worked after touchdown), a `rover` that drove there, a `crash` (a craft that hit the surface and was lost, by accident or at the end of its mission), an
7
- * `impact` (a craft sent to hit it on purpose), an `entry` (a probe or orbiter lost in the atmosphere of Venus, Jupiter or Saturn: no surface was reached or none is there), a `planned` landing (announced, not flown) or a named `feature` of the surface.
7
+ * `impact` (a craft sent to hit it on purpose), an `entry` (a probe or orbiter lost in the atmosphere of Venus, Jupiter or Saturn: no surface was reached or none is there), a `planned` landing (announced, not flown), a named `feature` of the surface or a piece of
8
+ * `hardware` (equipment left on a surface or hardware that fell to it: an Apollo experiment package, an ejected camera, a heat shield, a backshell, a parachute, a cruise stage). Hardware is held in the search lists of `/places/search` only.
8
9
  *
9
10
  * @example
10
11
  * ```ts
11
12
  * import type { PlaceKind } from "@johnmorrisdotca/wakusei-planets/places";
12
13
  *
13
- * const kinds: PlaceKind[] = ["crewed", "landing", "rover", "crash", "impact", "entry", "planned", "feature"];
14
+ * const kinds: PlaceKind[] = ["crewed", "landing", "rover", "crash", "impact", "entry", "planned", "feature", "hardware"];
14
15
  * console.log(kinds.length);
15
16
  * ```
16
17
  */
17
- export type PlaceKind = "crewed" | "landing" | "rover" | "crash" | "impact" | "entry" | "planned" | "feature";
18
+ export type PlaceKind = "crewed" | "landing" | "rover" | "crash" | "impact" | "entry" | "planned" | "feature" | "hardware";
18
19
  /**
19
20
  * One place on a body. Latitude and longitude are degrees, east positive, from -180 to 180 on every body: the Moon's in the mean Earth/polar axis frame, the others' in the IAU frame the Gazetteer or the source uses (Venus, Mars, Mercury and the moons 0 to 360 east,
20
21
  * converted; a source's west longitude is negated). Every feature is planetocentric (the Gazetteer's shapefiles are "in east longitude, planetocentric latitude"). On Mars every place is planetocentric: a lander's `source.latitude` says whether its source is planetocentric,
@@ -29,6 +29,7 @@ const KIND_WORD = {
29
29
  entry: { en: "lost in the atmosphere", ja: "大気圏で消失" },
30
30
  planned: { en: "planned landing", ja: "着陸予定" },
31
31
  feature: { en: "feature", ja: "地形" },
32
+ hardware: { en: "hardware", ja: "機器・部品" },
32
33
  };
33
34
  /**
34
35
  * The short line under a place's name: what it is and when (a site's year, a planned landing's announced year, a feature's kind and size), in English or Japanese.
@@ -2,22 +2,92 @@ import type * as THREE from "three";
2
2
  import { type Vec3 } from "../vec.ts";
3
3
  import type { SpaceDwarf, SpacePlanet } from "./frame.ts";
4
4
  import { type ScaleMode } from "./scale.ts";
5
- /** The parts of three.js the dots use, over and above the ones every body needs. */
6
- export type DotsThree = Pick<typeof THREE, "BufferAttribute" | "BufferGeometry" | "Points" | "PointsMaterial">;
5
+ /** The parts of three.js the dots and the orbits use, over and above the ones every body needs. */
6
+ export type DotsThree = Pick<typeof THREE, "BufferAttribute" | "BufferGeometry" | "Points" | "PointsMaterial" | "LineSegments" | "LineBasicMaterial">;
7
+ type Host = SpacePlanet | SpaceDwarf;
7
8
  /** One moon to draw as a dot: its planet, and where it is from the planet's centre in kilometres, in the J2000 ecliptic frame (what `catalogueMoonPosition` gives). */
8
9
  export interface MoonDot {
9
- host: SpacePlanet | SpaceDwarf;
10
+ host: Host;
10
11
  km: Vec3;
11
12
  }
12
- /** The dots of the view. */
13
- export interface MoonDots {
14
- object: THREE.Points;
15
- /** Places the dots: `at(host)` is where the host is drawn and `radius(host)` its drawn radius, in the view's units. Returns how many are drawn. */
16
- update(dots: readonly MoonDot[], mode: ScaleMode, at: (host: SpacePlanet | SpaceDwarf) => Vec3, radius: (host: SpacePlanet | SpaceDwarf) => number, ratio: number): number;
13
+ /** What `moons-colors` says an orbit's colour means: the moon's family, or the way it goes round. */
14
+ export type MoonColorChoice = "group" | "direction";
15
+ /** A moon of the catalogue as the layer needs it, without the catalogue's rows: the element makes these from the chunk, so this file never imports it. */
16
+ export interface SourceMoon {
17
+ /** The catalogue's id (`himalia`). */
18
+ id: string;
19
+ /** What to print: the name, else the designation. */
20
+ label: string;
21
+ /** The Japanese name, where one is written down. */
22
+ ja: string | null;
23
+ host: Host;
24
+ /** Whether the view draws it in full: then it is a body, not a dot, and only its orbit is drawn here. */
25
+ full: boolean;
26
+ /** `#rrggbb` of its orbit by group and by direction. */
27
+ colors: Readonly<Record<MoonColorChoice, string>>;
28
+ }
29
+ /** The catalogue as a source of places and orbits. */
30
+ export interface MoonSource {
31
+ /** The moons with an orbit, of every host. */
32
+ moons: readonly SourceMoon[];
33
+ /** Where a moon is at a moment, kilometres from its planet's centre, J2000 ecliptic. */
34
+ position(moon: SourceMoon, ms: number): Vec3;
35
+ /** A closed line of the orbit a moon follows at a moment, in the same frame and unit. */
36
+ orbit(moon: SourceMoon, ms: number, points: number): Vec3[];
37
+ }
38
+ /** A dot's place on the screen, for a press. */
39
+ export interface MoonSpot {
40
+ id: string;
41
+ host: Host;
42
+ x: number;
43
+ y: number;
44
+ }
45
+ /** What one draw of the layer is given. */
46
+ export interface MoonLayerInput {
47
+ source: MoonSource;
48
+ /** The planets whose moons are all shown. */
49
+ hosts: ReadonlySet<string>;
50
+ by: MoonColorChoice;
51
+ mode: ScaleMode;
52
+ /** The view's moment, in milliseconds since 1970 (UTC). */
53
+ time: number;
54
+ /** Whether the view draws orbit lines at all (the attribute `orbits`). */
55
+ orbits: boolean;
56
+ at: (host: Host) => Vec3;
57
+ radius: (host: Host) => number;
58
+ ratio: number;
59
+ /** The screen place of a point of the scene, or `null` off the screen or behind the camera. */
60
+ spot: (point: Vec3) => {
61
+ x: number;
62
+ y: number;
63
+ } | null;
64
+ }
65
+ /** What a draw drew. */
66
+ export interface MoonLayerDrawn {
67
+ dots: number;
68
+ /** The orbits drawn. */
69
+ orbits: number;
70
+ /** The dots that are on the screen, for a press. */
71
+ spots: MoonSpot[];
72
+ }
73
+ /** The dots and the orbits of the view. */
74
+ export interface MoonLayer {
75
+ update(input: MoonLayerInput): MoonLayerDrawn;
76
+ /** The moons whose orbits a planet's `LineSegments` holds, in order, each with how many segments it has: segment number n of the object belongs to the moon where the running total passes n. For a hover on a line. */
77
+ orbitMoons(host: string): readonly {
78
+ id: string;
79
+ segments: number;
80
+ }[];
17
81
  dispose(): void;
18
82
  }
19
83
  /** The most dots drawn: more than every known moon, with room for the years of finds to come. */
20
84
  export declare const MAX_MOON_DOTS = 1024;
85
+ /** The opacity of every orbit line, set here and nowhere else. */
86
+ export declare const MOON_ORBIT_OPACITY = 0.6;
87
+ /** How many points go round an orbit. */
88
+ export declare const MOON_ORBIT_POINTS = 72;
89
+ /** An orbit is drawn again when the view's moment is this far from the one it was drawn for: the orbits of the irregular moons turn over years. */
90
+ export declare const MOON_ORBIT_KEEP_MS: number;
21
91
  /**
22
92
  * Where the view draws a moon of the catalogue: its place from the planet in the planet's radii, turned into the scene's axes and drawn nearer in a compressed view (the same mapping as the drawn moons).
23
93
  *
@@ -26,5 +96,6 @@ export declare const MAX_MOON_DOTS = 1024;
26
96
  * @returns The offset from the planet's centre, in the planet's radii, in the scene's axes.
27
97
  */
28
98
  export declare function moonDotOffset(mode: ScaleMode, dot: MoonDot): Vec3;
29
- /** The dots, in one `Points` draw that is hidden until it has something to show. */
30
- export declare function createMoonDots(T: DotsThree): MoonDots;
99
+ /** The dots and the orbits, each a draw that is hidden until it has something to show. */
100
+ export declare function createMoonLayer(T: DotsThree, parent: THREE.Object3D): MoonLayer;
101
+ export {};