@johnmorrisdotca/wakusei-planets 0.32.0 → 0.34.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 (56) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/NOTICE.md +15 -1
  3. package/README.md +11 -5
  4. package/dist/bodies/all.d.ts +1 -0
  5. package/dist/bodies/all.js +1 -0
  6. package/dist/bodies/minor.d.ts +1 -0
  7. package/dist/bodies/minor.js +16 -0
  8. package/dist/data/minor.d.ts +3 -0
  9. package/dist/data/minor.js +7 -0
  10. package/dist/data/tables.d.ts +4 -2
  11. package/dist/data/tables.js +1 -1
  12. package/dist/element.d.ts +10 -1
  13. package/dist/element.js +36 -6
  14. package/dist/embed.d.ts +1 -1
  15. package/dist/embed.js +3 -3
  16. package/dist/ephemeris.d.ts +7 -7
  17. package/dist/ephemeris.js +36 -13
  18. package/dist/facts.d.ts +28 -4
  19. package/dist/facts.js +24 -2
  20. package/dist/index.d.ts +1 -1
  21. package/dist/index.js +1 -1
  22. package/dist/nearest.js +6 -4
  23. package/dist/scene/body.d.ts +13 -2
  24. package/dist/scene/body.js +35 -0
  25. package/dist/scene/name-label.d.ts +116 -0
  26. package/dist/scene/name-label.js +232 -0
  27. package/dist/scene/painter.d.ts +29 -0
  28. package/dist/scene/painter.js +36 -0
  29. package/dist/scene/textures.d.ts +2 -2
  30. package/dist/space/arrows.d.ts +29 -3
  31. package/dist/space/arrows.js +38 -6
  32. package/dist/space/bodies.d.ts +6 -6
  33. package/dist/space/bodies.js +6 -6
  34. package/dist/space/element.d.ts +20 -0
  35. package/dist/space/element.js +44 -4
  36. package/dist/space/frame.d.ts +28 -3
  37. package/dist/space/frame.js +40 -4
  38. package/dist/space/index.d.ts +2 -2
  39. package/dist/space/index.js +2 -2
  40. package/dist/space/scale.d.ts +4 -4
  41. package/dist/space/scale.js +8 -2
  42. package/dist/space/scene.d.ts +17 -3
  43. package/dist/space/scene.js +36 -17
  44. package/dist/stops.d.ts +1 -1
  45. package/dist/stops.js +4 -1
  46. package/dist/tables/all.d.ts +1 -0
  47. package/dist/tables/all.js +1 -0
  48. package/dist/tables/lazy.d.ts +5 -0
  49. package/dist/tables/lazy.js +12 -0
  50. package/dist/tables/minor.d.ts +1 -0
  51. package/dist/tables/minor.js +317 -0
  52. package/dist/textures/vesta-1024.webp +0 -0
  53. package/dist/textures/vesta-512.webp +0 -0
  54. package/dist/version.d.ts +1 -1
  55. package/dist/version.js +1 -1
  56. package/package.json +12 -2
@@ -1,4 +1,5 @@
1
1
  import "./ceres.ts";
2
2
  import "./dwarfs.ts";
3
+ import "./minor.ts";
3
4
  import "./galilean.ts";
4
5
  import "./saturn-moons.ts";
@@ -1,4 +1,5 @@
1
1
  import "./ceres.js";
2
2
  import "./dwarfs.js";
3
+ import "./minor.js";
3
4
  import "./galilean.js";
4
5
  import "./saturn-moons.js";
@@ -1,2 +1,7 @@
1
1
  /** Fetch the theory for a planet's moons: resolves true for the one call that fetched it, false when it was already asked for or loaded, there is none for that planet, or it could not be fetched. */
2
2
  export declare function loadMoonTheory(planet: string): Promise<boolean>;
3
+ /**
4
+ * Fetch the fitted tables of the minor bodies (Vesta, Pallas, Chiron, Pholus, Halley: about 48 kB gzipped) when a picture of one of them is dated: resolves true for the one call that fetched them, false when they were already asked for
5
+ * or loaded, or could not be fetched. Until they arrive a minor body is placed from its osculating elements.
6
+ */
7
+ export declare function loadMinorTables(): Promise<boolean>;
@@ -1,5 +1,6 @@
1
1
  // Loads a planet's moon theory when a picture asks for its moons, so a page that shows one planet does not carry Jupiter's and Saturn's theories. A bundler with code splitting makes each a chunk of its own.
2
2
  import { moonTheoryOf } from "../data/theories.js";
3
+ import { tableOf } from "../data/tables.js";
3
4
  const LOADERS = {
4
5
  jupiter: { moon: "io", load: () => import("./galilean.js") },
5
6
  saturn: { moon: "mimas", load: () => import("./saturn-moons.js") },
@@ -13,3 +14,14 @@ export function loadMoonTheory(planet) {
13
14
  asked.add(planet);
14
15
  return loader.load().then(() => true, () => false);
15
16
  }
17
+ let askedMinor = false;
18
+ /**
19
+ * Fetch the fitted tables of the minor bodies (Vesta, Pallas, Chiron, Pholus, Halley: about 48 kB gzipped) when a picture of one of them is dated: resolves true for the one call that fetched them, false when they were already asked for
20
+ * or loaded, or could not be fetched. Until they arrive a minor body is placed from its osculating elements.
21
+ */
22
+ export function loadMinorTables() {
23
+ if (askedMinor || tableOf("vesta") !== undefined)
24
+ return Promise.resolve(false);
25
+ askedMinor = true;
26
+ return import("./minor.js").then(() => true, () => false);
27
+ }
@@ -0,0 +1 @@
1
+ export {};