@eaprelsky/nocturna-wheel 4.0.0 → 4.0.2
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/nocturna-wheel.bundle.js +27 -20
- package/dist/nocturna-wheel.bundle.js.map +1 -1
- package/dist/nocturna-wheel.es.js +27 -20
- 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 +27 -20
- 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-
|
|
296
|
+
* Generated at: 2025-12-21T14:49:28.184Z
|
|
297
297
|
*
|
|
298
298
|
* This file is automatically generated by the build process.
|
|
299
299
|
* Do not edit manually - changes will be overwritten.
|
|
@@ -2337,21 +2337,26 @@
|
|
|
2337
2337
|
// Offset needed to place Ascendant (house 1 cusp) at 0 degrees (top side)
|
|
2338
2338
|
ascendantAlignmentOffset = (360 - ascendantLon) % 360;
|
|
2339
2339
|
}
|
|
2340
|
-
|
|
2341
|
-
//
|
|
2340
|
+
|
|
2341
|
+
// Render house numbers at the CENTER of each house sector.
|
|
2342
|
+
// If house cusp data is available, compute the midpoint between cusp[i] and cusp[i+1] (with proper 0/360 wrap).
|
|
2343
|
+
// Otherwise, fall back to equal 30° houses.
|
|
2342
2344
|
for (let i = 0; i < 12; i++) {
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
+
const houseNumber = i + 1;
|
|
2346
|
+
|
|
2347
|
+
let midAngle;
|
|
2345
2348
|
if (this.houseData && this.houseData.length >= 12) {
|
|
2346
|
-
|
|
2349
|
+
const startLon = this.getHouseLongitude(this.houseData[i]);
|
|
2350
|
+
const endLon = this.getHouseLongitude(this.houseData[(i + 1) % 12]);
|
|
2351
|
+
const arc = (endLon - startLon + 360) % 360; // always move forward through the zodiac
|
|
2352
|
+
const midLon = (startLon + arc / 2) % 360;
|
|
2353
|
+
midAngle = (midLon + ascendantAlignmentOffset + rotationAngle) % 360;
|
|
2347
2354
|
} else {
|
|
2348
|
-
|
|
2355
|
+
// Equal houses: center of each 30° segment
|
|
2356
|
+
midAngle = (i * 30 + 15 + rotationAngle) % 360;
|
|
2349
2357
|
}
|
|
2350
|
-
// Apply alignment offset and user rotation
|
|
2351
|
-
const houseAngle = (baseHouseAngle + ascendantAlignmentOffset + rotationAngle) % 360;
|
|
2352
2358
|
|
|
2353
|
-
|
|
2354
|
-
const angle = (houseAngle + 15) % 360; // Place in middle of house segment, apply modulo
|
|
2359
|
+
const angle = midAngle;
|
|
2355
2360
|
|
|
2356
2361
|
// Calculate position for house number
|
|
2357
2362
|
const point = this.svgUtils.pointOnCircle(this.centerX, this.centerY, this.numberRadius, angle);
|
|
@@ -2384,11 +2389,11 @@
|
|
|
2384
2389
|
text.setAttribute("dominant-baseline", "middle");
|
|
2385
2390
|
}
|
|
2386
2391
|
|
|
2387
|
-
// Set house number as text (Roman numeral)
|
|
2388
|
-
text.textContent = AstrologyUtils.houseToRoman(
|
|
2392
|
+
// Set house number as text (Roman numeral) - now based on visual position
|
|
2393
|
+
text.textContent = AstrologyUtils.houseToRoman(houseNumber);
|
|
2389
2394
|
|
|
2390
2395
|
// Add tooltip with house information
|
|
2391
|
-
this.svgUtils.addTooltip(text, `House ${
|
|
2396
|
+
this.svgUtils.addTooltip(text, `House ${houseNumber}`);
|
|
2392
2397
|
|
|
2393
2398
|
parentGroup.appendChild(text);
|
|
2394
2399
|
elements.push(text);
|
|
@@ -2847,8 +2852,8 @@
|
|
|
2847
2852
|
const adjustedPositions = [...positions];
|
|
2848
2853
|
|
|
2849
2854
|
// The minimum angular distance needed to prevent overlap at base radius
|
|
2850
|
-
//
|
|
2851
|
-
const minAngularDistance = (minDistance / baseRadius) * (180 / Math.PI)
|
|
2855
|
+
// minDistance already includes the desired spacing (iconSize * 1.5)
|
|
2856
|
+
const minAngularDistance = (minDistance / baseRadius) * (180 / Math.PI);
|
|
2852
2857
|
console.log(`PlanetPositionCalculator: Minimum angular distance: ${minAngularDistance.toFixed(2)}°`);
|
|
2853
2858
|
|
|
2854
2859
|
// Sort positions by longitude for overlap detection
|
|
@@ -3025,8 +3030,8 @@
|
|
|
3025
3030
|
let centerAngle = (sumAngles / n) % 360;
|
|
3026
3031
|
|
|
3027
3032
|
// Determine minimum arc needed for n planets with minimum spacing
|
|
3028
|
-
//
|
|
3029
|
-
const minRequiredArc = (n - 1) * minAngularDistance
|
|
3033
|
+
// minAngularDistance already includes the desired spacing
|
|
3034
|
+
const minRequiredArc = (n - 1) * minAngularDistance;
|
|
3030
3035
|
|
|
3031
3036
|
// Always use at least the minimum required arc
|
|
3032
3037
|
const spanToUse = Math.max(minRequiredArc, totalArc);
|
|
@@ -3114,7 +3119,8 @@
|
|
|
3114
3119
|
// Define parameters for collision detection and distribution
|
|
3115
3120
|
const iconSize = 24;
|
|
3116
3121
|
const baseRadius = planets[0].iconRadius; // Use the iconRadius from the first planet
|
|
3117
|
-
|
|
3122
|
+
// Minimum distance = icon diameter + half diameter (0.5 * iconSize spacing between icons)
|
|
3123
|
+
const minDistance = iconSize * 1.5;
|
|
3118
3124
|
|
|
3119
3125
|
// Prepare planets array in format expected by PlanetPositionCalculator
|
|
3120
3126
|
const positions = planets.map((planet, index) => ({
|
|
@@ -3296,7 +3302,8 @@
|
|
|
3296
3302
|
// Define parameters for collision detection and distribution
|
|
3297
3303
|
const iconSize = 18; // Smaller size for secondary planets
|
|
3298
3304
|
const baseRadius = planets[0].iconRadius; // Use the iconRadius from the first planet
|
|
3299
|
-
|
|
3305
|
+
// Minimum distance = icon diameter + half diameter (0.5 * iconSize spacing between icons)
|
|
3306
|
+
const minDistance = iconSize * 1.5;
|
|
3300
3307
|
|
|
3301
3308
|
// Prepare planets array in format expected by PlanetPositionCalculator
|
|
3302
3309
|
const positions = planets.map((planet, index) => ({
|