└── docs ├── clock.js └── index.html /docs/clock.js: -------------------------------------------------------------------------------- 1 | const midnight = new Date("2022-04-02T15:58:05") 2 | 3 | function veloren_minutes(now) { 4 | var diff_sec = (now - midnight)/1000 5 | var one_ingame_day_in_minutes = 30 6 | var one_ingame_day_in_seconds = one_ingame_day_in_minutes * 60 7 | var one_ingame_hour_in_seconds = one_ingame_day_in_seconds / 24 8 | var one_ingame_minute_in_seconds = one_ingame_hour_in_seconds / 60 9 | return Math.floor(diff_sec / one_ingame_minute_in_seconds) % (24*60) 10 | } 11 | 12 | function format_minutes(time) { 13 | var minutes = time % 60 14 | if (minutes < 10) { 15 | minutes = "0" + minutes 16 | } 17 | return minutes 18 | } 19 | function format_hours(time) { 20 | var hours = Math.floor(time / 60) % 24 21 | return hours 22 | } 23 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 18 | 19 | 20 |
21 | Veloren Clock 22 |
23 |
24 | : 25 |
26 | 27 | 28 |
29 |
30 |
31 | sunrise 5:30▲ 32 | ▲sunset 18:30 33 |
34 | 35 | 56 | 57 | --------------------------------------------------------------------------------