-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathindex.js
16 lines (15 loc) · 851 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { Moon } from "./src";
import { Julian } from "./src";
const update = () => {
document.querySelector("#julianDay").innerHTML = Julian.fromDate().toFixed(10);
document.querySelector("#lunarAge").innerHTML = Moon.lunarAge().toFixed(10);
document.querySelector("#lunarAgePercent").innerHTML = Moon.lunarAgePercent().toFixed(10);
document.querySelector("#lunationNumber").innerHTML = Moon.lunationNumber().toFixed(0);
document.querySelector("#lunarDistance").innerHTML = Moon.lunarDistance().toFixed(10);
document.querySelector("#lunarPhase").innerHTML = Moon.lunarPhase();
document.querySelector("#lunarPhaseEmoji").innerHTML = Moon.lunarPhaseEmoji();
document.querySelector("#isWaxing").innerHTML = Moon.isWaxing();
document.querySelector("#isWaning").innerHTML = Moon.isWaning();
requestAnimationFrame(update);
};
update();