From 2050ae26c438cef4a6b7f4ed8f0050e2f9999c96 Mon Sep 17 00:00:00 2001
From: Amanda Ghassaei <amandaghassaei@gmail.com>
Date: Wed, 28 Jan 2015 21:26:47 -0500
Subject: [PATCH] part color

---
 js/fea/dmaPart.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/js/fea/dmaPart.js b/js/fea/dmaPart.js
index eda72728..e0424c11 100644
--- a/js/fea/dmaPart.js
+++ b/js/fea/dmaPart.js
@@ -23,6 +23,9 @@
         unitPartGeo.dynamic = true;
     });
 
+    var partMaterial = new THREE.MeshLambertMaterial({ color:0xffffff, shading: THREE.FlatShading });
+    partMaterial.color.setRGB( 0.9619657144369509, 0.6625466032079207, 0.20799727886007258 );
+
     function DMAPart(type, oddZFlag, parent) {
         this.parentCell = parent;//use this reference to get position and scale
         this.oddZFlag = oddZFlag;//this tells me if cell is at an odd z height in lattice, everything needs to rotate 180
@@ -36,7 +39,7 @@
 
     DMAPart.prototype._makeMeshForType = function(type){
 
-        var mesh = new THREE.Mesh(unitPartGeo);
+        var mesh = new THREE.Mesh(unitPartGeo, partMaterial);
         mesh = this._setMeshPosition(mesh);
         mesh = this._setMeshScale(mesh);
 
-- 
GitLab