From 9932ffba477ce14276ce874e95a545fa1e6efa1f Mon Sep 17 00:00:00 2001
From: Amanda Ghassaei <amandaghassaei@gmail.com>
Date: Wed, 27 May 2015 23:15:49 -0700
Subject: [PATCH] messing around with colors

---
 index.html                          |  6 +++---
 js/cells/supercells/GIKSuperCell.js | 21 +++++++++++++++++--
 js/menus/Navbar.js                  | 12 -----------
 js/models/AllAppPLists.js           | 31 +++++++++++++++++++++++------
 4 files changed, 47 insertions(+), 23 deletions(-)

diff --git a/index.html b/index.html
index 2a48be00..4b00a34b 100644
--- a/index.html
+++ b/index.html
@@ -164,9 +164,9 @@
         </li>
         <li><a data-menu-id="about" class="menuHoverControls" target="_blank" href="http://dma.cba.mit.edu/">About</a></li>
        </ul>
-        <ul class="nav navbar-nav pull-right">
-            <li><a id="showHideMenu" href="#">Hide Menu >></a></li>
-        </ul>
+        <!--<ul class="nav navbar-nav pull-right">-->
+            <!--<li><a id="showHideMenu" href="#">Hide Menu >></a></li>-->
+        <!--</ul>-->
 
     </div><!-- /.navbar-collapse -->
     <input id="jsonInput" type="file">
diff --git a/js/cells/supercells/GIKSuperCell.js b/js/cells/supercells/GIKSuperCell.js
index 9dd68f01..62b47675 100644
--- a/js/cells/supercells/GIKSuperCell.js
+++ b/js/cells/supercells/GIKSuperCell.js
@@ -6,12 +6,29 @@ var allGIKMaterials = {};
 var gikMaterialList = AppPList().allMaterialTypes.cube.gik;
 _.each(_.keys(gikMaterialList), function(material){
     allGIKMaterials[material] = new THREE.MeshLambertMaterial({color:gikMaterialList[material].color});
+    if (gikMaterialList[material].opacity){
+        allGIKMaterials[material].transparent = true;
+        allGIKMaterials[material].opacity = gikMaterialList[material].opacity;
+    } else {
+        allGIKMaterials[material].transparent = false;
+    }
 });
 
 function changeGikMaterials(){
     _.each(_.keys(allGIKMaterials), function(material){
-        if (globals.appState.get("realisticColorScheme")) allGIKMaterials[material].color = new THREE.Color(gikMaterialList[material].color);
-        else allGIKMaterials[material].color = new THREE.Color(gikMaterialList[material].altColor);
+        if (globals.appState.get("realisticColorScheme")) {
+            allGIKMaterials[material].color = new THREE.Color(gikMaterialList[material].color);
+            if (gikMaterialList[material].opacity){
+                allGIKMaterials[material].transparent = true;
+                allGIKMaterials[material].opacity = gikMaterialList[material].opacity;
+            } else {
+                allGIKMaterials[material].transparent = false;
+            }
+        }
+        else {
+            allGIKMaterials[material].color = new THREE.Color(gikMaterialList[material].altColor);
+            allGIKMaterials[material].transparent = false;
+        }
     });
 }
 
diff --git a/js/menus/Navbar.js b/js/menus/Navbar.js
index 95f62eb8..06b66528 100644
--- a/js/menus/Navbar.js
+++ b/js/menus/Navbar.js
@@ -36,11 +36,9 @@ NavBar = Backbone.View.extend({
 
         _.bindAll(this, "_setMenuVisibility", "_setNavSelection");
 
-        this.listenTo(this.model, "change:menuIsVisible", this._updateShowHideButton);
         this.listenTo(this.model, "change:currentNav", this._updateNavSelectionUI);
 
         this._logo();
-        this._updateShowHideButton();
         this._updateNavSelectionUI();
     },
 
@@ -51,16 +49,6 @@ NavBar = Backbone.View.extend({
         $(e.target).blur();
     },
 
-    _updateShowHideButton: function(){
-        var $button = $("#showHideMenu");
-        var state = this.model.get("menuIsVisible");
-        if(state){
-            $button.html("Hide Menu >>");
-        } else {
-            $button.html("<< Show Menu");
-        }
-    },
-
     _setNavSelection: function(e){
         var navSelection = $(e.target).data("menuId");
         if (navSelection == "about") {
diff --git a/js/models/AllAppPLists.js b/js/models/AllAppPLists.js
index cdf797ce..7eaedfa7 100644
--- a/js/models/AllAppPLists.js
+++ b/js/models/AllAppPLists.js
@@ -88,23 +88,42 @@ function AppPList(){
                 brass:{
                     name: "Brass",
                     color: "#b5a642",
-                    altColor: "#e67e22"
+                    altColor: "#857B64"
                 },
                 fiberGlass: {
                     name: "Fiberglass",
                     color: "#fef1b5",
+//                    opacity: "0.9",
                     altColor: "#ecf0f1"
                 },
-                carbonFiber: {
-                    name: "Carbon Fiber",
+                carbon: {
+                    name: "Carbon Composite",
                     color: "#222",
                     altColor: "#000"
                 },
-                silicon: {
-                    name: "Silicon",
+                nType: {
+                    name: "Silicon N-Type",
                     color: "#bcc6cc",
-                    altColor: "#3498db"
+                    altColor: "#9CC9CB"
+                },
+                nTypePlus: {
+                    name: "Silicon Heavily Doped N-Type (N+)",
+                    color: "#c6ccbc",
+                    altColor: "#8391AC"
+                },
+                pType: {
+                    name: "Silicon P-Type",
+                    color: "#ccbcc6",
+                    altColor: "#F5447B"
+                },
+                pTypePlus: {
+                    name: "Silicon Heavily Doped P-Type (P+)",
+                    color: "#ccc2bc",
+                    altColor: "#F99987"
                 }
+                //857B64
+                //FDE2D9
+                //D77948
             }
         },
         truncatedCube: {face: null},
-- 
GitLab