From 770e178513c8f374763a6b3057fb09bb3ed13889 Mon Sep 17 00:00:00 2001 From: nrhck Date: Mon, 11 Feb 2019 00:31:24 +0100 Subject: [PATCH] Nozoid WebUI --- clients/planetarium/Readme.txt | 9 +- webui/LJ.js | 48 +++--- webui/LJgrid.css | 2 +- webui/index.html | 267 +++++++++++++++++++++++---------- 4 files changed, 218 insertions(+), 108 deletions(-) diff --git a/clients/planetarium/Readme.txt b/clients/planetarium/Readme.txt index c626757..1e337d7 100644 --- a/clients/planetarium/Readme.txt +++ b/clients/planetarium/Readme.txt @@ -2,14 +2,16 @@ Multi Laser planetarium in python3 for LJ. v0.01 Sam Neurohack +Make sure to understand altitude/azimuth coordinate system. + Display all solar planets and hipparcos catalog objects below a given magnitude. Accuracy tested against apparent data and starchart at https://www.calsky.com/cs.cgi?cha=7&sec=3&sub=2 It's an alpha release so a little hardcoded : - set observer position (find SkyCity, SkyCountryCode) in main.py like 'Paris' and 'FR' -- set observer date.time in InitObserver() arguments (default is now in UTC) -- set what sky part you want to display for each laser in 'LaserSkies' variable : Define alitude and azimuth for top left and bottom right +- set observer date/time in InitObserver() arguments (default is now in UTC) +- set what sky part you want to display for each laser in 'LaserSkies' variable : Define alitude and azimuth for top left and bottom right of each laser. It needs more libraries than plan. Currently it relies on the awesome astropy, skyfield,... @@ -25,7 +27,8 @@ For debug options and more type : python3 --help To install : -go3.sh +Install LJ first. +go3.sh install required python3 modules NB : - if you get an year error out of range : install the last skyfield "python-skyfield" in github. diff --git a/webui/LJ.js b/webui/LJ.js index 9492431..a86b44a 100644 --- a/webui/LJ.js +++ b/webui/LJ.js @@ -6,18 +6,18 @@ function noMenu() { // Set all menu button with normal button style - var x = document.getElementById("showalign"); + var x = document.getElementById("showalign"); x.className = "button"; var x = document.getElementById("showrun"); - x.className = "button"; + x.className = "button"; var x = document.getElementById("showcanvas"); - x.className = "button"; + x.className = "button"; var x = document.getElementById("showlive"); - x.className = "button"; + x.className = "button"; var x = document.getElementById("shownozoid"); - x.className = "button"; + x.className = "button"; var x = document.getElementById("showplanet"); - x.className = "button"; + x.className = "button"; // Hide all possible main central grids. var x = document.getElementById("mgalign"); @@ -39,52 +39,56 @@ function showAlign() { noMenu(); var x = document.getElementById("mgalign"); - x.style.display = "grid"; + x.style.display = "grid"; var x = document.getElementById("showalign"); - x.className = "button:checked"; + x.className = "button:checked"; } function showRun() { noMenu(); var x = document.getElementById("mgrun"); - x.style.display = "grid"; + x.style.display = "grid"; var x = document.getElementById("showrun"); - x.className = "button:checked"; + x.className = "button:checked"; } - function showCanvas() { + function showCanvas() { noMenu(); var x = document.getElementById("mgsimu"); x.style.display = "grid"; var x = document.getElementById("cnvbuttons"); x.style.display = "grid"; var x = document.getElementById("showcanvas"); - x.className = "button:checked"; + x.className = "button:checked"; } - function showLive() { + function showLive() { noMenu(); var x = document.getElementById("mglive"); - x.style.display = "grid"; + x.style.display = "grid"; var x = document.getElementById("showlive"); - x.className = "button:checked"; + x.className = "button:checked"; } - function showNozoid() { + + function showNozoid() { noMenu(); var x = document.getElementById("mgnozoid"); - x.style.display = "grid"; + x.style.display = "grid"; var x = document.getElementById("shownozoid"); x.className = "button:checked"; } - function showPlanet() { + + function showPlanet() { noMenu(); var x = document.getElementById("mgplanet"); - x.style.display = "grid"; + x.style.display = "grid"; + var x = document.getElementById("cnvbuttons"); + x.style.display = "grid"; var x = document.getElementById("showplanet"); - x.className = "button:checked"; + x.className = "button:checked"; } -u - function buttonClicked(clicked_id) { + + function buttonClicked(clicked_id) { _WS.send("/" + clicked_id); } diff --git a/webui/LJgrid.css b/webui/LJgrid.css index f905783..c8550f2 100644 --- a/webui/LJgrid.css +++ b/webui/LJgrid.css @@ -39,7 +39,7 @@ .mgalign { display: grid; height: 400px; - grid-template-columns: 144px 144px 138px 138px 10px; + grid-template-columns: 144px 144px 138px 138px 10px 326px; grid-template-rows: 1Fr; background-color: #151515; border-color: #445; diff --git a/webui/index.html b/webui/index.html index 2978eaf..075ee21 100644 --- a/webui/index.html +++ b/webui/index.html @@ -131,10 +131,10 @@
-
- -
-
+
+ +
+
@@ -181,11 +181,11 @@
-
- -
-
-
+
+ +
+
+
@@ -234,10 +234,10 @@
-
- -
-
+
+ +
+
@@ -254,34 +254,35 @@
-
+
kPPS
-
Points
-
-
+
Points
+ +
+
Offset X
-
Offset Y
+
Offset Y
-
-
+
+
Scale X
-
Scale Y
+
Scale Y
-
-
-
+
+
+
Angle
-
Intens.
+
Intens.
@@ -289,10 +290,10 @@
-
- -
-
+
+ +
+
@@ -309,36 +310,42 @@
-
+
kPPS
-
Points
-
-
+
Points
+ +
+
Offset X
-
Offset Y
+
Offset Y
-
-
+
+
-
Scale X
-
Scale Y
+
Scale X
+
Scale Y
-
-
-
+
+
+
Angle
-
Intens.
+
Intens.
+
+ +
+ +
@@ -358,17 +365,19 @@
Velocity
-
Express.
-
-
+
Express.
+ +
+
-
Sens.
-
Beauty
-
-
+
Sens.
+
Beauty
+ +
+
@@ -442,10 +451,10 @@
-
-
-
-
+
+
+
+
@@ -458,7 +467,7 @@
-
+
@@ -544,25 +553,103 @@
- X - - Y - + + + + + +
+
+ XCURVE LineIN + + + + XCURVE + +
+ +
+ Automodulation X ? + + Automodulation Y ? + +
+
@@ -673,50 +760,66 @@