Browse Source

added logos

Signed-off-by: Nicholas Jerome <nicholas.jerome@kit.edu>
Nicholas Jerome 7 years ago
parent
commit
204929a690
2 changed files with 47 additions and 16 deletions
  1. 23 10
      index.html
  2. 24 6
      static/style.css

+ 23 - 10
index.html

@@ -13,6 +13,8 @@
 </head>
 
 <body>
+    <div id="kit-logo"><img src="http://katrin.kit.edu/static/kit_logo.svg" height=100></div>
+    <div id="competence-logo"><img src="http://katrin.kit.edu/static/CompetenceE-Logo.png" height=100></div>
     <div id="container"></div>
     <!--<div id="slider"></div>-->
     <div id="slider-tooltip"></div>
@@ -193,7 +195,7 @@
         var mycontrol;
         var enableControls = true;
         var enableRotate = false;
-        var data;
+        var data = [];
 	var labelFlag;
         var raycaster = new THREE.Raycaster();
         var mouse = new THREE.Vector2();
@@ -3653,8 +3655,6 @@ jQuery(window).load(function () {
                     //if (pNorm < 0.0) {
                     //    pNorm = 0.0;
                     //}
-
-                    colour = mycm["jet"][parseInt(Math.floor( (pNorm / 1.0) * 71.0 ))];     
                     colour = "0x" + colour.substring(1);
                 }
                 object = scene.getObjectByName( prop, true );
@@ -3667,18 +3667,23 @@ jQuery(window).load(function () {
 
 
     $('input[type=radio][name=moduleMode]').change(function() {
+        //var myVar = setInterval(myTimer, 10000);
+        //clearInterval(myVar);
         modeValue = this.value;
+        //console.log(modeValue);
         for (var prop in data) {
             value = data[prop];
 
             if (prop != "time") {
                 if (modeValue == "0") {
+                    //console.log("setting mode 0")
                     if (value <= 0) {
                         colour = "0xff0000";
                     } else {
                         //colour = "0x242b72";
                         colour = "0x00ff00";
                     }
+                    //console.log("setting mode 0", colour);
                 } else if (modeValue == "1") {
                     
                     //console.log("inside mode 1");
@@ -3709,7 +3714,9 @@ jQuery(window).load(function () {
                     }
                 }
                 object = scene.getObjectByName( prop, true );
+                //object.material.color.setHex( colour );
                 if (object) {
+                    //console.log("SETTING COLOUR");
                     object.material.color.setHex( colour );
                 }
                 //animate();
@@ -3771,20 +3778,25 @@ jQuery(window).load(function () {
                 }
                 for (var prop in data) {
                     value = data[prop];
-                    current_array = parseInt(prop.split("_")[3]) - 1;
 
                     if (prop != "time") {
-     
-                        pNorm = value / ( 0.5 * parseFloat(powerPeak[current_array]));
+                        current_type = prop.split("_")[0][1];
+                        current_array = parseInt(prop.split("_")[3]) - 1;
+
+                        if (current_type == "D") {
+                            pNorm = value / ( parseFloat(powerPeak[current_array]));
+                        } else {
+                            pNorm = value / ( 0.5 * parseFloat(powerPeak[current_array]));
+                        }
                         //pNorm = value / parseFloat(powerPeak[current_array]);
-                        if (pNorm > 0.5) {
-                            pNorm = 0.5;
+                        if (pNorm > 1.0) {
+                            pNorm = 1.0;
                         }
                         if (pNorm < 0.0) {
                             pNorm = 0.0;
                         }
 
-                        colour = mycm["jet"][parseInt(Math.floor( (pNorm / 1.0) * 71.0 ))];
+                        colour = mycm["jet"][parseInt(Math.floor( (pNorm / 1.0) * 71.0 ))];     
                         colour = "0x" + colour.substring(1);
                         object = scene.getObjectByName( prop, true );
                         if (object) {
@@ -3797,7 +3809,8 @@ jQuery(window).load(function () {
 
 
 myTimer();
-var myVar = setInterval(myTimer, 10000);
+var myVar = setInterval(myTimer, 1000);
+//clearInterval(refreshIntervalId);
 
 var powerPeak = [
 10.00,

+ 24 - 6
static/style.css

@@ -91,7 +91,7 @@ table {
 
 #obj-tooltip {
     position: absolute;
-    top: 40px;
+    top: 140px;
     right: 0px;
     width: 20%;
     font-family: 'Source Code Pro';
@@ -100,7 +100,7 @@ table {
 
 #val-tooltip {
     position: absolute;
-    top: 80px;
+    top: 180px;
     right: 0px;
     width: 20%;
     font-family: 'Source Code Pro';
@@ -118,7 +118,7 @@ table {
 
 #message {
     position: absolute;
-    top: 10px;
+    top: 150px;
     left: 10px;
     width: 20%;
 }
@@ -132,9 +132,9 @@ table {
 
 #settings {
     position: absolute;
-    top: 150px;
-    right: 10px;
-    width: 200px;
+    top: 420px;
+    left: 10px;
+    width: 20%;
 }
 
 .bar-header {
@@ -305,3 +305,21 @@ table {
 .number {
   font-size: 100px;
 }
+
+#kit-logo {
+    position: absolute;
+    left: 10px;
+    top: 10px;
+}
+
+#competence-logo {
+    position: absolute;
+    right: 60px;
+    top: 10px;
+}
+
+#ipe-logo {
+    position: absolute;
+    right: 10px;
+    top: 10px;
+}