@eaprelsky/nocturna-wheel 3.1.0 → 4.0.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.
- package/README.md +41 -1
- package/dist/assets/css/nocturna-wheel.css +16 -1
- package/dist/nocturna-wheel.bundle.js +35 -15
- package/dist/nocturna-wheel.bundle.js.map +1 -1
- package/dist/nocturna-wheel.es.js +35 -15
- package/dist/nocturna-wheel.es.js.map +1 -1
- package/dist/nocturna-wheel.min.js +1 -1
- package/dist/nocturna-wheel.min.js.map +1 -1
- package/dist/nocturna-wheel.umd.js +35 -15
- package/dist/nocturna-wheel.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -287,7 +287,7 @@ class IconProvider {
|
|
|
287
287
|
/**
|
|
288
288
|
* IconData.js
|
|
289
289
|
* Auto-generated module containing inline SVG icons as data URLs
|
|
290
|
-
* Generated at: 2025-11-
|
|
290
|
+
* Generated at: 2025-11-23T10:05:25.858Z
|
|
291
291
|
*
|
|
292
292
|
* This file is automatically generated by the build process.
|
|
293
293
|
* Do not edit manually - changes will be overwritten.
|
|
@@ -1125,6 +1125,13 @@ class ChartConfig {
|
|
|
1125
1125
|
mc: this.astronomicalData.mc
|
|
1126
1126
|
}
|
|
1127
1127
|
);
|
|
1128
|
+
|
|
1129
|
+
// Auto-rotate the wheel to position the Ascendant at 9 o'clock
|
|
1130
|
+
// Only set if not already explicitly configured
|
|
1131
|
+
if (this.houseCusps.length > 0 && this.houseSettings.rotationAngle === 0) {
|
|
1132
|
+
console.log(`ChartConfig: Auto-rotating wheel to Ascendant at ${this.astronomicalData.ascendant}°`);
|
|
1133
|
+
this.houseSettings.rotationAngle = this.astronomicalData.ascendant;
|
|
1134
|
+
}
|
|
1128
1135
|
} catch (error) {
|
|
1129
1136
|
console.error("Failed to calculate house cusps:", error?.message || error);
|
|
1130
1137
|
// Set empty cusps array if calculation fails
|
|
@@ -2834,7 +2841,8 @@ class PlanetPositionCalculator {
|
|
|
2834
2841
|
const adjustedPositions = [...positions];
|
|
2835
2842
|
|
|
2836
2843
|
// The minimum angular distance needed to prevent overlap at base radius
|
|
2837
|
-
|
|
2844
|
+
// Add safety factor to ensure visual separation
|
|
2845
|
+
const minAngularDistance = (minDistance / baseRadius) * (180 / Math.PI) * 1.3; // 30% extra spacing
|
|
2838
2846
|
console.log(`PlanetPositionCalculator: Minimum angular distance: ${minAngularDistance.toFixed(2)}°`);
|
|
2839
2847
|
|
|
2840
2848
|
// Sort positions by longitude for overlap detection
|
|
@@ -2984,10 +2992,16 @@ class PlanetPositionCalculator {
|
|
|
2984
2992
|
static _distributeClusterByAngle(positions, radius, minAngularDistance, centerX, centerY, iconSize) {
|
|
2985
2993
|
const n = positions.length;
|
|
2986
2994
|
|
|
2995
|
+
// If only one planet, keep its original position
|
|
2996
|
+
if (n === 1) {
|
|
2997
|
+
this._setExactPosition(positions[0], positions[0].longitude, radius, centerX, centerY, iconSize);
|
|
2998
|
+
return;
|
|
2999
|
+
}
|
|
3000
|
+
|
|
2987
3001
|
// Sort positions by their original longitude to maintain order
|
|
2988
3002
|
positions.sort((a, b) => a.longitude - b.longitude);
|
|
2989
3003
|
|
|
2990
|
-
// Calculate central angle and total span
|
|
3004
|
+
// Calculate central angle and total span
|
|
2991
3005
|
const firstPos = positions[0].longitude;
|
|
2992
3006
|
const lastPos = positions[n-1].longitude;
|
|
2993
3007
|
let totalArc = lastPos - firstPos;
|
|
@@ -2997,26 +3011,25 @@ class PlanetPositionCalculator {
|
|
|
2997
3011
|
totalArc = (360 + lastPos - firstPos) % 360;
|
|
2998
3012
|
}
|
|
2999
3013
|
|
|
3000
|
-
// Calculate the center of the cluster
|
|
3001
|
-
let
|
|
3014
|
+
// Calculate the center of the cluster (weighted average of all positions)
|
|
3015
|
+
let sumAngles = 0;
|
|
3016
|
+
for (let i = 0; i < n; i++) {
|
|
3017
|
+
sumAngles += positions[i].longitude;
|
|
3018
|
+
}
|
|
3019
|
+
let centerAngle = (sumAngles / n) % 360;
|
|
3002
3020
|
|
|
3003
3021
|
// Determine minimum arc needed for n planets with minimum spacing
|
|
3004
|
-
|
|
3022
|
+
// Add extra spacing factor to ensure planets don't overlap
|
|
3023
|
+
const minRequiredArc = (n - 1) * minAngularDistance * 1.2; // 20% extra spacing
|
|
3005
3024
|
|
|
3006
|
-
//
|
|
3007
|
-
const spanToUse = Math.max(
|
|
3025
|
+
// Always use at least the minimum required arc
|
|
3026
|
+
const spanToUse = Math.max(minRequiredArc, totalArc);
|
|
3008
3027
|
|
|
3009
3028
|
// Calculate start angle (center - half of span)
|
|
3010
3029
|
const startAngle = (centerAngle - spanToUse/2 + 360) % 360;
|
|
3011
3030
|
|
|
3012
3031
|
// Distribute planets evenly from the start angle
|
|
3013
3032
|
for (let i = 0; i < n; i++) {
|
|
3014
|
-
// If only one planet, keep its original position
|
|
3015
|
-
if (n === 1) {
|
|
3016
|
-
this._setExactPosition(positions[i], positions[i].longitude, radius, centerX, centerY, iconSize);
|
|
3017
|
-
continue;
|
|
3018
|
-
}
|
|
3019
|
-
|
|
3020
3033
|
const angle = (startAngle + i * (spanToUse / (n-1))) % 360;
|
|
3021
3034
|
this._setExactPosition(positions[i], angle, radius, centerX, centerY, iconSize);
|
|
3022
3035
|
}
|
|
@@ -3988,7 +4001,7 @@ class ClientSideAspectRenderer extends BaseRenderer { // No longer extends IAspe
|
|
|
3988
4001
|
class: `projection-dot projection-${planet.name}`,
|
|
3989
4002
|
fill: 'none',
|
|
3990
4003
|
stroke: planet.color || '#666666',
|
|
3991
|
-
'stroke-width': '1
|
|
4004
|
+
'stroke-width': '1'
|
|
3992
4005
|
});
|
|
3993
4006
|
|
|
3994
4007
|
// Add tooltip
|
|
@@ -4904,6 +4917,13 @@ class NocturnaWheel {
|
|
|
4904
4917
|
|
|
4905
4918
|
this.houses = options.houses || [];
|
|
4906
4919
|
|
|
4920
|
+
// Auto-rotate the wheel if houses are provided
|
|
4921
|
+
// This ensures the Ascendant (1st house cusp) is positioned at 9 o'clock
|
|
4922
|
+
if (this.houses.length > 0 && this.houses[0] && typeof this.houses[0].lon === 'number') {
|
|
4923
|
+
console.log(`NocturnaWheel: Auto-rotating wheel to Ascendant at ${this.houses[0].lon}°`);
|
|
4924
|
+
this.config.houseSettings.rotationAngle = this.houses[0].lon;
|
|
4925
|
+
}
|
|
4926
|
+
|
|
4907
4927
|
// Override aspect settings if provided (legacy support)
|
|
4908
4928
|
if (options.aspectSettings) {
|
|
4909
4929
|
this.config.updateAspectSettings(options.aspectSettings);
|