webdial

Incomplete JS port of moondial.
git clone https://code.literati.org/webdial.git
Log | Files | Refs

commit 3c8c8a380c1abd2b7f79c8e3c67bca1c50a7e633
parent 57d2f9cb28869d7b8301a118c4cf38ac065f78b1
Author: Sean Lynch <seanl@literati.org>
Date:   Wed,  7 Sep 2011 23:55:23 -0700

Debug drawNight

Diffstat:
Mwebdial.js | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/webdial.js b/webdial.js @@ -30,14 +30,23 @@ function WebDial(canvas) { } function drawNight(ctx, w, h) { + console.debug(1); ctx.fillStyle = "rgba(0, 0, 0, 128)"; + console.debug(2); var jd = Sun.cal_to_jd(new Date()); + console.debug(3); var epsilon = Sun.obliquity(jd); + console.debug(4); var geometric_lon = Sun.longitude_radius_low(jd).longitude; + console.debug(5); var lon = Sun.apparent_longitude_low(jd, geometric_lon); + console.debug(6); var equ = Sun.ecl_to_equ(lon, 0.0, epsilon); + console.debug(7); var st = Sun.sidereal_time_greenwich(jd); + console.debug(8); var geo = Sun.equ_to_geo(ra, dec, st); + console.debug(9); var points = Sun.terminator(geo.latitude, geo.longitude, Sun.sun_rst_altitude, w, h); console.debug(points);