@project-skymap/library 0.7.3 → 0.7.4
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.cjs +10 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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.
|
|
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)
|
|
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;
|
|
@@ -967,6 +972,8 @@ function createEngine({
|
|
|
967
972
|
if (currentConfig?.fitProjection) {
|
|
968
973
|
if (aspect > 1) {
|
|
969
974
|
scale /= aspect;
|
|
975
|
+
} else {
|
|
976
|
+
scale *= aspect;
|
|
970
977
|
}
|
|
971
978
|
}
|
|
972
979
|
globalUniforms.uScale.value = scale;
|