@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
|
@@ -293,7 +293,7 @@
|
|
|
293
293
|
/**
|
|
294
294
|
* IconData.js
|
|
295
295
|
* Auto-generated module containing inline SVG icons as data URLs
|
|
296
|
-
* Generated at: 2025-11-
|
|
296
|
+
* Generated at: 2025-11-23T10:05:25.858Z
|
|
297
297
|
*
|
|
298
298
|
* This file is automatically generated by the build process.
|
|
299
299
|
* Do not edit manually - changes will be overwritten.
|
|
@@ -1131,6 +1131,13 @@
|
|
|
1131
1131
|
mc: this.astronomicalData.mc
|
|
1132
1132
|
}
|
|
1133
1133
|
);
|
|
1134
|
+
|
|
1135
|
+
// Auto-rotate the wheel to position the Ascendant at 9 o'clock
|
|
1136
|
+
// Only set if not already explicitly configured
|
|
1137
|
+
if (this.houseCusps.length > 0 && this.houseSettings.rotationAngle === 0) {
|
|
1138
|
+
console.log(`ChartConfig: Auto-rotating wheel to Ascendant at ${this.astronomicalData.ascendant}°`);
|
|
1139
|
+
this.houseSettings.rotationAngle = this.astronomicalData.ascendant;
|
|
1140
|
+
}
|
|
1134
1141
|
} catch (error) {
|
|
1135
1142
|
console.error("Failed to calculate house cusps:", error?.message || error);
|
|
1136
1143
|
// Set empty cusps array if calculation fails
|
|
@@ -2840,7 +2847,8 @@
|
|
|
2840
2847
|
const adjustedPositions = [...positions];
|
|
2841
2848
|
|
|
2842
2849
|
// The minimum angular distance needed to prevent overlap at base radius
|
|
2843
|
-
|
|
2850
|
+
// Add safety factor to ensure visual separation
|
|
2851
|
+
const minAngularDistance = (minDistance / baseRadius) * (180 / Math.PI) * 1.3; // 30% extra spacing
|
|
2844
2852
|
console.log(`PlanetPositionCalculator: Minimum angular distance: ${minAngularDistance.toFixed(2)}°`);
|
|
2845
2853
|
|
|
2846
2854
|
// Sort positions by longitude for overlap detection
|
|
@@ -2990,10 +2998,16 @@
|
|
|
2990
2998
|
static _distributeClusterByAngle(positions, radius, minAngularDistance, centerX, centerY, iconSize) {
|
|
2991
2999
|
const n = positions.length;
|
|
2992
3000
|
|
|
3001
|
+
// If only one planet, keep its original position
|
|
3002
|
+
if (n === 1) {
|
|
3003
|
+
this._setExactPosition(positions[0], positions[0].longitude, radius, centerX, centerY, iconSize);
|
|
3004
|
+
return;
|
|
3005
|
+
}
|
|
3006
|
+
|
|
2993
3007
|
// Sort positions by their original longitude to maintain order
|
|
2994
3008
|
positions.sort((a, b) => a.longitude - b.longitude);
|
|
2995
3009
|
|
|
2996
|
-
// Calculate central angle and total span
|
|
3010
|
+
// Calculate central angle and total span
|
|
2997
3011
|
const firstPos = positions[0].longitude;
|
|
2998
3012
|
const lastPos = positions[n-1].longitude;
|
|
2999
3013
|
let totalArc = lastPos - firstPos;
|
|
@@ -3003,26 +3017,25 @@
|
|
|
3003
3017
|
totalArc = (360 + lastPos - firstPos) % 360;
|
|
3004
3018
|
}
|
|
3005
3019
|
|
|
3006
|
-
// Calculate the center of the cluster
|
|
3007
|
-
let
|
|
3020
|
+
// Calculate the center of the cluster (weighted average of all positions)
|
|
3021
|
+
let sumAngles = 0;
|
|
3022
|
+
for (let i = 0; i < n; i++) {
|
|
3023
|
+
sumAngles += positions[i].longitude;
|
|
3024
|
+
}
|
|
3025
|
+
let centerAngle = (sumAngles / n) % 360;
|
|
3008
3026
|
|
|
3009
3027
|
// Determine minimum arc needed for n planets with minimum spacing
|
|
3010
|
-
|
|
3028
|
+
// Add extra spacing factor to ensure planets don't overlap
|
|
3029
|
+
const minRequiredArc = (n - 1) * minAngularDistance * 1.2; // 20% extra spacing
|
|
3011
3030
|
|
|
3012
|
-
//
|
|
3013
|
-
const spanToUse = Math.max(
|
|
3031
|
+
// Always use at least the minimum required arc
|
|
3032
|
+
const spanToUse = Math.max(minRequiredArc, totalArc);
|
|
3014
3033
|
|
|
3015
3034
|
// Calculate start angle (center - half of span)
|
|
3016
3035
|
const startAngle = (centerAngle - spanToUse/2 + 360) % 360;
|
|
3017
3036
|
|
|
3018
3037
|
// Distribute planets evenly from the start angle
|
|
3019
3038
|
for (let i = 0; i < n; i++) {
|
|
3020
|
-
// If only one planet, keep its original position
|
|
3021
|
-
if (n === 1) {
|
|
3022
|
-
this._setExactPosition(positions[i], positions[i].longitude, radius, centerX, centerY, iconSize);
|
|
3023
|
-
continue;
|
|
3024
|
-
}
|
|
3025
|
-
|
|
3026
3039
|
const angle = (startAngle + i * (spanToUse / (n-1))) % 360;
|
|
3027
3040
|
this._setExactPosition(positions[i], angle, radius, centerX, centerY, iconSize);
|
|
3028
3041
|
}
|
|
@@ -3994,7 +4007,7 @@
|
|
|
3994
4007
|
class: `projection-dot projection-${planet.name}`,
|
|
3995
4008
|
fill: 'none',
|
|
3996
4009
|
stroke: planet.color || '#666666',
|
|
3997
|
-
'stroke-width': '1
|
|
4010
|
+
'stroke-width': '1'
|
|
3998
4011
|
});
|
|
3999
4012
|
|
|
4000
4013
|
// Add tooltip
|
|
@@ -4910,6 +4923,13 @@
|
|
|
4910
4923
|
|
|
4911
4924
|
this.houses = options.houses || [];
|
|
4912
4925
|
|
|
4926
|
+
// Auto-rotate the wheel if houses are provided
|
|
4927
|
+
// This ensures the Ascendant (1st house cusp) is positioned at 9 o'clock
|
|
4928
|
+
if (this.houses.length > 0 && this.houses[0] && typeof this.houses[0].lon === 'number') {
|
|
4929
|
+
console.log(`NocturnaWheel: Auto-rotating wheel to Ascendant at ${this.houses[0].lon}°`);
|
|
4930
|
+
this.config.houseSettings.rotationAngle = this.houses[0].lon;
|
|
4931
|
+
}
|
|
4932
|
+
|
|
4913
4933
|
// Override aspect settings if provided (legacy support)
|
|
4914
4934
|
if (options.aspectSettings) {
|
|
4915
4935
|
this.config.updateAspectSettings(options.aspectSettings);
|