astroceleste-engine 0.0.6 → 0.0.8
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.
|
@@ -45,6 +45,20 @@ export class Engine {
|
|
|
45
45
|
readonly coverage: Float64Array | undefined;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
/**
|
|
49
|
+
* The Four Pillars of a birth (ISO 8601 UTC) at `longitude` (degrees east) where civil
|
|
50
|
+
* time was `utcOffsetMinutes` ahead of UTC, from its Chinese `calendar` (the chart's
|
|
51
|
+
* `chinese_calendar`). `options`: `{ solar_time?, zi_hour?, sex?, luck_pillars? }`, or
|
|
52
|
+
* `undefined` for the defaults. No kernel is needed.
|
|
53
|
+
*/
|
|
54
|
+
export function bazi(calendar: any, birth: string, longitude: number, utcOffsetMinutes: number, options: any): any;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* A computed chart's dignities (condition, sect, receptions) judged again under `scheme`
|
|
58
|
+
* ("lilly" or "dorothean"). No kernel is needed.
|
|
59
|
+
*/
|
|
60
|
+
export function chartDignities(chart: any, scheme: string): any;
|
|
61
|
+
|
|
48
62
|
/**
|
|
49
63
|
* Lilly's qualities of the degree an ecliptic longitude falls in.
|
|
50
64
|
*/
|
|
@@ -76,11 +90,19 @@ export function julianDay(utc: string): number;
|
|
|
76
90
|
*/
|
|
77
91
|
export function synastry(chart_a_planets: any, chart_b_planets: any, orb_settings: any): any;
|
|
78
92
|
|
|
93
|
+
/**
|
|
94
|
+
* Annual profections and firdaria of a nativity (ISO 8601 UTC birth, natal Sun and
|
|
95
|
+
* Ascendant longitudes) for the years that overlap `start`..`end` (ISO 8601 UTC).
|
|
96
|
+
*/
|
|
97
|
+
export function timeLords(birth: string, sun_longitude: number, ascendant_longitude: number, start: string, end: string): any;
|
|
98
|
+
|
|
79
99
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
80
100
|
|
|
81
101
|
export interface InitOutput {
|
|
82
102
|
readonly memory: WebAssembly.Memory;
|
|
83
103
|
readonly __wbg_engine_free: (a: number, b: number) => void;
|
|
104
|
+
readonly bazi: (a: any, b: number, c: number, d: number, e: number, f: any) => [number, number, number];
|
|
105
|
+
readonly chartDignities: (a: any, b: number, c: number) => [number, number, number];
|
|
84
106
|
readonly degreeQualities: (a: number) => [number, number, number];
|
|
85
107
|
readonly degreeQualityTable: () => [number, number, number];
|
|
86
108
|
readonly derivedChart: (a: any, b: number, c: number, d: number) => [number, number, number];
|
|
@@ -96,6 +118,7 @@ export interface InitOutput {
|
|
|
96
118
|
readonly excerptKernel: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
97
119
|
readonly julianDay: (a: number, b: number) => [number, number, number];
|
|
98
120
|
readonly synastry: (a: any, b: any, c: any) => [number, number, number];
|
|
121
|
+
readonly timeLords: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number, number];
|
|
99
122
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
100
123
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
101
124
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
@@ -129,6 +129,45 @@ export class Engine {
|
|
|
129
129
|
}
|
|
130
130
|
if (Symbol.dispose) Engine.prototype[Symbol.dispose] = Engine.prototype.free;
|
|
131
131
|
|
|
132
|
+
/**
|
|
133
|
+
* The Four Pillars of a birth (ISO 8601 UTC) at `longitude` (degrees east) where civil
|
|
134
|
+
* time was `utcOffsetMinutes` ahead of UTC, from its Chinese `calendar` (the chart's
|
|
135
|
+
* `chinese_calendar`). `options`: `{ solar_time?, zi_hour?, sex?, luck_pillars? }`, or
|
|
136
|
+
* `undefined` for the defaults. No kernel is needed.
|
|
137
|
+
* @param {any} calendar
|
|
138
|
+
* @param {string} birth
|
|
139
|
+
* @param {number} longitude
|
|
140
|
+
* @param {number} utcOffsetMinutes
|
|
141
|
+
* @param {any} options
|
|
142
|
+
* @returns {any}
|
|
143
|
+
*/
|
|
144
|
+
export function bazi(calendar, birth, longitude, utcOffsetMinutes, options) {
|
|
145
|
+
const ptr0 = passStringToWasm0(birth, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
146
|
+
const len0 = WASM_VECTOR_LEN;
|
|
147
|
+
const ret = wasm.bazi(calendar, ptr0, len0, longitude, utcOffsetMinutes, options);
|
|
148
|
+
if (ret[2]) {
|
|
149
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
150
|
+
}
|
|
151
|
+
return takeFromExternrefTable0(ret[0]);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* A computed chart's dignities (condition, sect, receptions) judged again under `scheme`
|
|
156
|
+
* ("lilly" or "dorothean"). No kernel is needed.
|
|
157
|
+
* @param {any} chart
|
|
158
|
+
* @param {string} scheme
|
|
159
|
+
* @returns {any}
|
|
160
|
+
*/
|
|
161
|
+
export function chartDignities(chart, scheme) {
|
|
162
|
+
const ptr0 = passStringToWasm0(scheme, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
163
|
+
const len0 = WASM_VECTOR_LEN;
|
|
164
|
+
const ret = wasm.chartDignities(chart, ptr0, len0);
|
|
165
|
+
if (ret[2]) {
|
|
166
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
167
|
+
}
|
|
168
|
+
return takeFromExternrefTable0(ret[0]);
|
|
169
|
+
}
|
|
170
|
+
|
|
132
171
|
/**
|
|
133
172
|
* Lilly's qualities of the degree an ecliptic longitude falls in.
|
|
134
173
|
* @param {number} longitude
|
|
@@ -220,6 +259,30 @@ export function synastry(chart_a_planets, chart_b_planets, orb_settings) {
|
|
|
220
259
|
}
|
|
221
260
|
return takeFromExternrefTable0(ret[0]);
|
|
222
261
|
}
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Annual profections and firdaria of a nativity (ISO 8601 UTC birth, natal Sun and
|
|
265
|
+
* Ascendant longitudes) for the years that overlap `start`..`end` (ISO 8601 UTC).
|
|
266
|
+
* @param {string} birth
|
|
267
|
+
* @param {number} sun_longitude
|
|
268
|
+
* @param {number} ascendant_longitude
|
|
269
|
+
* @param {string} start
|
|
270
|
+
* @param {string} end
|
|
271
|
+
* @returns {any}
|
|
272
|
+
*/
|
|
273
|
+
export function timeLords(birth, sun_longitude, ascendant_longitude, start, end) {
|
|
274
|
+
const ptr0 = passStringToWasm0(birth, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
275
|
+
const len0 = WASM_VECTOR_LEN;
|
|
276
|
+
const ptr1 = passStringToWasm0(start, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
277
|
+
const len1 = WASM_VECTOR_LEN;
|
|
278
|
+
const ptr2 = passStringToWasm0(end, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
279
|
+
const len2 = WASM_VECTOR_LEN;
|
|
280
|
+
const ret = wasm.timeLords(ptr0, len0, sun_longitude, ascendant_longitude, ptr1, len1, ptr2, len2);
|
|
281
|
+
if (ret[2]) {
|
|
282
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
283
|
+
}
|
|
284
|
+
return takeFromExternrefTable0(ret[0]);
|
|
285
|
+
}
|
|
223
286
|
function __wbg_get_imports() {
|
|
224
287
|
const import0 = {
|
|
225
288
|
__proto__: null,
|
|
Binary file
|