From: will Date: Tue, 27 Aug 2024 00:02:30 +0000 (+0100) Subject: Added lighting and clock movement controls X-Git-Url: https://git.ozva.co.uk/?a=commitdiff_plain;h=90c811749a119af9c1ac7c656e1aa84ee2c13b9d;p=shopping-channel Added lighting and clock movement controls + refactored sigil.json + Added notes to the control pannel --- diff --git a/auth/index.php b/auth/index.php index 86b6fbc..eb22640 100644 --- a/auth/index.php +++ b/auth/index.php @@ -22,8 +22,20 @@ $data = fread($file, filesize("../data.json")); fclose($file); $data = json_decode($data, true); +$clockIncrement = 10; + if (!empty($_POST['update'])) { - $data['itemId'] = (int)$_POST['item']; + + for ($i = 0; $i < 5; $i ++) { + if ($i == (int)$_POST['sceneCue']) { + $clock['lightingCues'][$i] = "true"; + } else { + $clock['lightingCues'][$i] = "false"; + } + } + for ($i = 0; $i < 5; $i ++) { + $clock['lightingCues'][$i + 5] = var_export(!empty($_POST["triggerCue$i"]), true); + } $data['showingMain'] = var_export(!empty($_POST['main']), true); $data['showingAll'] = var_export(!empty($_POST['all']), true); @@ -38,9 +50,12 @@ if (!empty($_POST['update'])) { ]; $data['round'] = var_export(!empty($_POST['round']), true); + $clock['movementSpeed'] = (int)$_POST['movementSpeed']; + $clock['currentPosition'] = (int)$_POST["doomsday"]; $data['timerOffset'] = (int)$_POST['timerOffset']; $data['priceChange'] = (int)$_POST['priceChange']; $data['discount'] = (int)$_POST['discount']; + $data['itemId'] = (int)$_POST['item']; $data['prefix'] = $_POST['prefix']; $data['currency']['prefix'] = $_POST['prefixString']; @@ -74,8 +89,6 @@ if (!empty($_POST['update'])) { fwrite($file, $json); fclose($file); - $clock['currentPosition'] = (int)$_POST["doomsday"]; - $json = json_encode($clock); $file = fopen("../clock.json", "w"); fwrite($file, $json); @@ -105,6 +118,16 @@ fieldtext > .split { width: 50%; margin: 0; } +.floating { + position: fixed; + bottom: 25px; + right: 25px; + max-width: min(900px, calc(100% - 74px)); + padding: 10px; + color: red; + border: 2px solid red; + background-color: rgba(255, 255, 255, 0.7); +} .clock { position: relative; width: 100%; @@ -123,10 +146,10 @@ fieldtext > .split { margin: 0; } @@ -331,10 +354,10 @@ echo ""; ?>
Doomsday clock"; +echo "
Doomsday clock (Incr. $clockIncrement deg)"; echo "
"; echo ""; -for ($i = 0; $i < 360; $i += 10) { +for ($i = 0; $i < 360; $i += $clockIncrement) { $checked = ""; if ($clock['currentPosition'] == $i) { $checked = " checked='checked' "; @@ -345,23 +368,41 @@ for ($i = 0; $i < 360; $i += 10) {
Movement - -
- -
- -
- - + '> +
+
+ + +
+ + +
Lighting - -
- -
- - +
+"; + echo "
"; +} +?> +
+"; + echo "
"; +} +?> +
@@ -375,5 +416,25 @@ for ($i = 0; $i < 360; $i += 10) {
+
+ Notes +

+ Still need to do plenty to both the GFX overlay and this page (and the actual clock): +

+ +

+ and then still to do in the admin department: Talk to Joe about the GFX system, ask Ash about the lighting desk sAcn input and to setup things, makerspace the clock, text people about things, arrange screentest with Jack. +

+
diff --git a/clock.json b/clock.json index c595aa4..3c56d26 100755 --- a/clock.json +++ b/clock.json @@ -1 +1 @@ -{"currentPosition":270,"movementSpeed":10,"function":"ease","lightingCues":["true", "false", "true", "true"]} +{"currentPosition":230,"movementSpeed":30,"function":"ease","lightingCues":["false","false","true","false","false","true","false","true","false","true"]} \ No newline at end of file diff --git a/sigil.json b/sigil.json index d9a05af..4eb374c 100755 --- a/sigil.json +++ b/sigil.json @@ -2,40 +2,40 @@ "square":[ "110,10", "90,110", - "50,10", - "70,110", - "30,110", - "10,10", - "10,30", - "90,30", - "70,90", - "50,90", - "30,30", - "110,90", - "110,70", - "30,50", - "70,50", - "50,50", - "90,70", - "10,70", - "10,50", - "30,70", - "70,70", - "50,70", - "90,50", - "110,50", - "10,90", - "90,90", - "50,30", - "70,30", - "30,90", - "110,30", - "110,110", - "30,10", - "50,110", - "70,10", - "90,10", - "10,110" + "50,10", + "70,110", + "30,110", + "10,10", + "10,30", + "90,30", + "70,90", + "50,90", + "30,30", + "110,90", + "110,70", + "30,50", + "70,50", + "50,50", + "90,70", + "10,70", + "10,50", + "30,70", + "70,70", + "50,70", + "90,50", + "110,50", + "10,90", + "90,90", + "50,30", + "70,30", + "30,90", + "110,30", + "110,110", + "30,10", + "50,110", + "70,10", + "90,10", + "10,110" ], "phrases":[ "anchor",