@eaprelsky/nocturna-wheel 4.0.1 → 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 +25 -38
- package/dist/nocturna-wheel.bundle.js.map +1 -1
- package/dist/nocturna-wheel.es.js +25 -38
- 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 +25 -38
- 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-
|
|
290
|
+
* Generated at: 2025-12-21T14:49:27.435Z
|
|
291
291
|
*
|
|
292
292
|
* This file is automatically generated by the build process.
|
|
293
293
|
* Do not edit manually - changes will be overwritten.
|
|
@@ -2331,41 +2331,26 @@ class HouseRenderer extends BaseRenderer {
|
|
|
2331
2331
|
// Offset needed to place Ascendant (house 1 cusp) at 0 degrees (top side)
|
|
2332
2332
|
ascendantAlignmentOffset = (360 - ascendantLon) % 360;
|
|
2333
2333
|
}
|
|
2334
|
-
|
|
2335
|
-
//
|
|
2336
|
-
|
|
2334
|
+
|
|
2335
|
+
// Render house numbers at the CENTER of each house sector.
|
|
2336
|
+
// If house cusp data is available, compute the midpoint between cusp[i] and cusp[i+1] (with proper 0/360 wrap).
|
|
2337
|
+
// Otherwise, fall back to equal 30° houses.
|
|
2337
2338
|
for (let i = 0; i < 12; i++) {
|
|
2338
|
-
|
|
2339
|
+
const houseNumber = i + 1;
|
|
2340
|
+
|
|
2341
|
+
let midAngle;
|
|
2339
2342
|
if (this.houseData && this.houseData.length >= 12) {
|
|
2340
|
-
|
|
2343
|
+
const startLon = this.getHouseLongitude(this.houseData[i]);
|
|
2344
|
+
const endLon = this.getHouseLongitude(this.houseData[(i + 1) % 12]);
|
|
2345
|
+
const arc = (endLon - startLon + 360) % 360; // always move forward through the zodiac
|
|
2346
|
+
const midLon = (startLon + arc / 2) % 360;
|
|
2347
|
+
midAngle = (midLon + ascendantAlignmentOffset + rotationAngle) % 360;
|
|
2341
2348
|
} else {
|
|
2342
|
-
|
|
2349
|
+
// Equal houses: center of each 30° segment
|
|
2350
|
+
midAngle = (i * 30 + 15 + rotationAngle) % 360;
|
|
2343
2351
|
}
|
|
2344
|
-
const rotatedAngle = (baseAngle + ascendantAlignmentOffset + rotationAngle) % 360;
|
|
2345
2352
|
|
|
2346
|
-
|
|
2347
|
-
originalIndex: i,
|
|
2348
|
-
baseAngle: baseAngle,
|
|
2349
|
-
rotatedAngle: rotatedAngle
|
|
2350
|
-
});
|
|
2351
|
-
}
|
|
2352
|
-
|
|
2353
|
-
// Sort by rotated angle to determine visual order
|
|
2354
|
-
housesWithAngles.sort((a, b) => a.rotatedAngle - b.rotatedAngle);
|
|
2355
|
-
|
|
2356
|
-
// Find which house is Ascendant (originally index 0) after rotation
|
|
2357
|
-
const ascendantVisualIndex = housesWithAngles.findIndex(h => h.originalIndex === 0);
|
|
2358
|
-
|
|
2359
|
-
// Render houses with correct numbering based on visual position
|
|
2360
|
-
housesWithAngles.forEach((house, visualIndex) => {
|
|
2361
|
-
const houseAngle = house.rotatedAngle;
|
|
2362
|
-
|
|
2363
|
-
// Calculate house number based on position relative to Ascendant
|
|
2364
|
-
// Counter-clockwise from Ascendant
|
|
2365
|
-
const houseNumber = ((visualIndex - ascendantVisualIndex + 12) % 12) + 1;
|
|
2366
|
-
|
|
2367
|
-
// Offset text from house line clockwise
|
|
2368
|
-
const angle = (houseAngle + 15) % 360; // Place in middle of house segment, apply modulo
|
|
2353
|
+
const angle = midAngle;
|
|
2369
2354
|
|
|
2370
2355
|
// Calculate position for house number
|
|
2371
2356
|
const point = this.svgUtils.pointOnCircle(this.centerX, this.centerY, this.numberRadius, angle);
|
|
@@ -2406,7 +2391,7 @@ class HouseRenderer extends BaseRenderer {
|
|
|
2406
2391
|
|
|
2407
2392
|
parentGroup.appendChild(text);
|
|
2408
2393
|
elements.push(text);
|
|
2409
|
-
}
|
|
2394
|
+
}
|
|
2410
2395
|
|
|
2411
2396
|
return elements;
|
|
2412
2397
|
}
|
|
@@ -2861,8 +2846,8 @@ class PlanetPositionCalculator {
|
|
|
2861
2846
|
const adjustedPositions = [...positions];
|
|
2862
2847
|
|
|
2863
2848
|
// The minimum angular distance needed to prevent overlap at base radius
|
|
2864
|
-
//
|
|
2865
|
-
const minAngularDistance = (minDistance / baseRadius) * (180 / Math.PI)
|
|
2849
|
+
// minDistance already includes the desired spacing (iconSize * 1.5)
|
|
2850
|
+
const minAngularDistance = (minDistance / baseRadius) * (180 / Math.PI);
|
|
2866
2851
|
console.log(`PlanetPositionCalculator: Minimum angular distance: ${minAngularDistance.toFixed(2)}°`);
|
|
2867
2852
|
|
|
2868
2853
|
// Sort positions by longitude for overlap detection
|
|
@@ -3039,8 +3024,8 @@ class PlanetPositionCalculator {
|
|
|
3039
3024
|
let centerAngle = (sumAngles / n) % 360;
|
|
3040
3025
|
|
|
3041
3026
|
// Determine minimum arc needed for n planets with minimum spacing
|
|
3042
|
-
//
|
|
3043
|
-
const minRequiredArc = (n - 1) * minAngularDistance
|
|
3027
|
+
// minAngularDistance already includes the desired spacing
|
|
3028
|
+
const minRequiredArc = (n - 1) * minAngularDistance;
|
|
3044
3029
|
|
|
3045
3030
|
// Always use at least the minimum required arc
|
|
3046
3031
|
const spanToUse = Math.max(minRequiredArc, totalArc);
|
|
@@ -3128,7 +3113,8 @@ class PrimaryPlanetRenderer extends BasePlanetRenderer {
|
|
|
3128
3113
|
// Define parameters for collision detection and distribution
|
|
3129
3114
|
const iconSize = 24;
|
|
3130
3115
|
const baseRadius = planets[0].iconRadius; // Use the iconRadius from the first planet
|
|
3131
|
-
|
|
3116
|
+
// Minimum distance = icon diameter + half diameter (0.5 * iconSize spacing between icons)
|
|
3117
|
+
const minDistance = iconSize * 1.5;
|
|
3132
3118
|
|
|
3133
3119
|
// Prepare planets array in format expected by PlanetPositionCalculator
|
|
3134
3120
|
const positions = planets.map((planet, index) => ({
|
|
@@ -3310,7 +3296,8 @@ class SecondaryPlanetRenderer extends BasePlanetRenderer {
|
|
|
3310
3296
|
// Define parameters for collision detection and distribution
|
|
3311
3297
|
const iconSize = 18; // Smaller size for secondary planets
|
|
3312
3298
|
const baseRadius = planets[0].iconRadius; // Use the iconRadius from the first planet
|
|
3313
|
-
|
|
3299
|
+
// Minimum distance = icon diameter + half diameter (0.5 * iconSize spacing between icons)
|
|
3300
|
+
const minDistance = iconSize * 1.5;
|
|
3314
3301
|
|
|
3315
3302
|
// Prepare planets array in format expected by PlanetPositionCalculator
|
|
3316
3303
|
const positions = planets.map((planet, index) => ({
|