astro-viewer 1.3.3 → 1.4.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.
@@ -4503,9 +4503,7 @@ class Camera {
4503
4503
  this.goTo(raDeg, decDeg);
4504
4504
  }
4505
4505
  goTo(raDeg, decDeg) {
4506
- // mirror RA
4507
- const mirroredRA = 360 - raDeg;
4508
- this.goToPhiTheta(astroDegToSpherical(mirroredRA, decDeg));
4506
+ this.goToPhiTheta(astroDegToSpherical(raDeg, decDeg));
4509
4507
  }
4510
4508
  goToPhiTheta(ptDeg) {
4511
4509
  const xyz = sphericalToCartesian(ptDeg.phi, ptDeg.theta, this.cam_pos[2]);
@@ -6901,7 +6899,6 @@ class HiPSShaderProgram {
6901
6899
  */
6902
6900
 
6903
6901
 
6904
-
6905
6902
  class AbstractSkyEntity {
6906
6903
  // Public-ish properties used elsewhere in the app
6907
6904
  refreshMe = false;
@@ -6995,13 +6992,6 @@ class AbstractSkyEntity {
6995
6992
  const R_inverse = mat4_create();
6996
6993
  invert(R_inverse, this.R);
6997
6994
  mat4_multiply(this.modelMatrix, this.T, R_inverse);
6998
- // Flip Y if we're outside the sphere
6999
- if (!src_Global.insideSphere) {
7000
- this.modelMatrix[1] = -this.modelMatrix[1];
7001
- this.modelMatrix[5] = -this.modelMatrix[5];
7002
- this.modelMatrix[9] = -this.modelMatrix[9];
7003
- this.modelMatrix[13] = -this.modelMatrix[13];
7004
- }
7005
6995
  // Apply galactic frame transform if needed
7006
6996
  if (this.isGalacticHips) {
7007
6997
  mat4_multiply(this.modelMatrix, this.modelMatrix, this.galacticMatrixInverted);
@@ -11170,8 +11160,10 @@ class AstroSphere {
11170
11160
  }
11171
11161
  this.lastMouseX = newX;
11172
11162
  this.lastMouseY = newY;
11163
+ // During drag, camera rotation is applied in the render loop via inertia.
11164
+ // Defer the camera-changed event to that loop so coordinates reflect the
11165
+ // actual updated camera state instead of the pre-rotation state.
11173
11166
  this._cameraStatusChanged = true;
11174
- this.emitCameraChanged('pointermove');
11175
11167
  event.preventDefault();
11176
11168
  };
11177
11169
  const handleMouseWheel = (event) => {
@@ -11498,7 +11490,7 @@ class AstroSphere {
11498
11490
  this._webgl.disable(this._webgl.DEPTH_TEST);
11499
11491
  this._webgl.enable(this._webgl.BLEND);
11500
11492
  this._webgl.enable(this._webgl.CULL_FACE);
11501
- this._webgl.cullFace(src_Global.insideSphere ? this._webgl.BACK : this._webgl.FRONT);
11493
+ this._webgl.cullFace(src_Global.insideSphere ? this._webgl.FRONT : this._webgl.BACK);
11502
11494
  this._webgl.blendFunc(this._webgl.SRC_ALPHA, this._webgl.ONE_MINUS_SRC_ALPHA);
11503
11495
  const visibleOrder = Math.min(this._healpixGrid.visibleorder, this._activeHiPS.maxOrder);
11504
11496
  this._healpixGrid.visibleTilesManager.computeVisiblePixels(visibleOrder, this._webgl, this._camera, this._perspectiveMatrixManager.pMatrix);