@project-skymap/library 0.7.3 → 0.7.5

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/dist/index.js CHANGED
@@ -454,6 +454,7 @@ var init_ConstellationArtworkLayer = __esm({
454
454
  }
455
455
  load(config, getPosition) {
456
456
  this.clear();
457
+ console.log(`[Constellation] Loading ${config.constellations.length} constellations from ${config.atlasBasePath}`);
457
458
  const basePath = config.atlasBasePath.replace(/\/$/, "");
458
459
  config.constellations.forEach((c) => {
459
460
  let center = new THREE5.Vector3();
@@ -622,10 +623,12 @@ var init_ConstellationArtworkLayer = __esm({
622
623
  const natAspect = tex.image.width / tex.image.height;
623
624
  material.uniforms.uImgAspect.value = natAspect;
624
625
  }
626
+ console.log(`[Constellation] Loaded: ${c.id} (${tex.image.width}x${tex.image.height})`);
627
+ },
628
+ (progress) => {
625
629
  },
626
- void 0,
627
630
  (err) => {
628
- console.warn(`Failed to load constellation texture: ${texPath}`, err);
631
+ console.error(`[Constellation] Failed to load: ${texPath}`, err);
629
632
  }
630
633
  );
631
634
  if (c.zBias) {
@@ -646,7 +649,9 @@ var init_ConstellationArtworkLayer = __esm({
646
649
  }
647
650
  update(fov, showArt) {
648
651
  this.root.visible = showArt;
649
- if (!showArt) return;
652
+ if (!showArt) {
653
+ return;
654
+ }
650
655
  for (const item of this.items) {
651
656
  const { fade } = item.config;
652
657
  let opacity = fade.maxOpacity;
@@ -965,8 +970,10 @@ function createEngine({
965
970
  let scale = currentProjection.getScale(fovRad);
966
971
  const aspect = camera.aspect;
967
972
  if (currentConfig?.fitProjection) {
968
- if (aspect > 1) {
973
+ if (aspect >= 1) {
969
974
  scale /= aspect;
975
+ } else {
976
+ scale *= aspect * aspect;
970
977
  }
971
978
  }
972
979
  globalUniforms.uScale.value = scale;