@johnmorrisdotca/wakusei-planets 0.63.0 → 0.64.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.
@@ -159,9 +159,11 @@ export class WakuseiSurface extends HTMLElement {
159
159
  this.#look = clampLook(value);
160
160
  this.#changed();
161
161
  }
162
- /** Where the eyes are: metres east and north of the site, and metres over the ground under them. */
162
+ /** Where the eyes are: metres east and north of the site, and metres over the ground under them. Standing, that is a person's height; while the rover is driven or the landing watched, it is the height of the view being drawn (the seat, the chase camera). */
163
163
  get position() {
164
- return { ...this.#at, up: EYE_HEIGHT };
164
+ if (this.#terrain === undefined || (this.#vehicle === undefined && this.#landing === undefined))
165
+ return { ...this.#at, up: EYE_HEIGHT };
166
+ return { ...this.#at, up: this.#eyeUp() - this.#groundAt(this.#at.east, this.#at.north) };
165
167
  }
166
168
  /** The sky now: the Sun and the Earth in it. */
167
169
  get sky() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@johnmorrisdotca/wakusei-planets",
3
- "version": "0.63.0",
3
+ "version": "0.64.0",
4
4
  "description": "Wakusei Planets 惑星 — The Sun, planets and moons for the web: each as a clean line drawing, a shaded realistic drawing or a painted surface map, with real sizes, axial tilt and rotation as data, and positions of the moons for any date and time. SVG for the lines, three.js (optional) for the rest.",
5
5
  "keywords": [
6
6
  "planets",
@@ -441,6 +441,11 @@
441
441
  "import": "./dist/sky-bodies.js",
442
442
  "default": "./dist/sky-bodies.js"
443
443
  },
444
+ "./sky": {
445
+ "types": "./dist/sky.d.ts",
446
+ "import": "./dist/sky.js",
447
+ "default": "./dist/sky.js"
448
+ },
444
449
  "./suncalc": {
445
450
  "types": "./dist/suncalc.d.ts",
446
451
  "import": "./dist/suncalc.js",
@@ -720,9 +725,13 @@
720
725
  },
721
726
  "peerDependencies": {
722
727
  "@johnmorrisdotca/chikyu-earth": ">=0.10.0",
728
+ "astronomy-engine": ">=2.1.19 <3",
723
729
  "three": ">=0.160.0"
724
730
  },
725
731
  "peerDependenciesMeta": {
732
+ "astronomy-engine": {
733
+ "optional": true
734
+ },
726
735
  "three": {
727
736
  "optional": true
728
737
  },