一个用于进行众多星相图计算的 ES6 库。
By horoscope, we're talking about the astrological birth charts. Not horoscope readings or interpretations.
I'm hoping to avoid commonly used labels like "Western" or "Hellenistic", but these are very much the circular charts you see in eur-asian based astrology traditions and not the charts in Chinese or Vedic traditions.
Example Chart:
The goal is to provide a library which will allow someone to:
Enter a calendar date + time and latitude/longitude coordinates for a position on the planet Earth.
And receive Javascript results which can be used to interface with a separate frontend library (maybe this one https://github.com/Kibo/AstroChart or a custom one) for creating the actual charts.
This package now works with typescript projects!
Given a date/time/point of origin...
ascendant and Midheaven (MC)) in relation to the point of originSun, Moon, Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto) in relation to the point of origin=> Positions of the lots (Fortune, Spirit, Eros, etc)
=> I'm open to requests for house systems. I'm currently stopped at 6 - we have 2 "modern" systems (Topocentric, Koch), 3 "medieval" systems (Placidus, Regiomontanus, Campanus), and 2 "ancient" systems (Whole Sign, Equal House). My formula resource "An Astrological House Formulary" by Michael P. Munkasey has many more house formulas I can implement if wanted. Hopefully I covered the most popular ones.
……2b. (optional) Set custom orb degrees for aspects. Default orbs are found in ./src/constants.js
……You'll frequently see a ChartPosition class in your results for house cusps, zodiac cusps, bodies, etc. This class should give you everything you need to orient and place the cusp / body onto your circular natal chart. It provides a set of points for the object to place it along the horizon or the ecliptic.
The horizon is typically understood to be the inner circle on the natal chart. The Ascendant is commonly located at 0 degrees along the horizon circle.
The ecliptic is understood to be the outer circle on the natal chart. The start of Aries is always at 0 degrees along this circle.
…If installing from source, clone this repo load the main file found at dist/index.js.
This package is also hosted on NPM
Install it with:
npm i circular-natal-horoscope-js --save
// or yarn
yarn add circular-natal-horoscope-jsInstall node modules
npm install
// or
yarn installThen run
yarn start:devand any changes you make should be reflected in dist/demo.html if you open the file in a browser.
Run tests with
npm test
// or
yarn testThis package uses webpack to produce a javascript bundle. If modifying this code, a new bundle can be built with the following command:
npm run build
// or
yarn run buildA small HTML implementation demo is provided.
To view, build the demo files locally with:
npm run build:demo
and then open demo/dist/demo.html in a browser.
Please Note: The demo chart is just used as an visual example of what the library can do and isnt part of the core library. The chart uses code from this repo: https://github.com/Kibo/AstroChart.
You can see how English and Spanish tokens are implemented in src/utilities/language.js. Copy the tokens for 1 language and add it to a key matching the ISO language code you want. Then, when you generate the horoscope, pass this code into the constructor:
new Horoscope({ language: "es" });and your language will appear in the results under the .label keys supplied within Sign, Aspect, Planet, House objects.
I recommend doing a github release first and then testing this package locally before publishing to npm! You can test a package from a github release by adding the following to any project dependencies:
"git+https://github.com/0xStarcat/CircularNatalHoroscopeJS.git#"package.jsonnpm run build and commit to branchnpm publish暂无开放 Issues,或尚未同步最近议题。