From 098c9f289669000182807de7e20a63b5abf5514f Mon Sep 17 00:00:00 2001 From: Amanda Ghassaei <amandaghassaei@gmail.com> Date: Mon, 1 Jun 2015 09:05:21 -0700 Subject: [PATCH] eod --- js/cells/DMACell.js | 13 ++++++++++++- js/threeViews/Highlighter.js | 8 +++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/js/cells/DMACell.js b/js/cells/DMACell.js index d375a309..9ef16d08 100644 --- a/js/cells/DMACell.js +++ b/js/cells/DMACell.js @@ -32,6 +32,12 @@ DMACell.prototype.getObject3D = function(){//careful, used for stock sim only fo return this.object3D; }; + + + + + + DMACell.prototype._rotateCell = function(object3D){ return object3D;//by default, no mesh transformations }; @@ -95,11 +101,16 @@ DMACell.prototype.getMaterial = function(){ DMACell.prototype.setOpacity = function(opacity){ }; + + + + + DMACell.prototype._initParts = function(){ return [];//override in subclasses }; -DMACell.prototype.setSuperCell = function(superCell, index){ +DMACell.prototype.setSuperCell = function(superCell, index){//todo get rid of this this.superCell = superCell; this.superCellIndex = index; diff --git a/js/threeViews/Highlighter.js b/js/threeViews/Highlighter.js index 19c7ec33..b137c913 100644 --- a/js/threeViews/Highlighter.js +++ b/js/threeViews/Highlighter.js @@ -14,11 +14,11 @@ Highlighter = Backbone.View.extend({ var geometry = this._makeGeometry(); this.mesh = new THREE.Mesh(geometry, new THREE.MeshBasicMaterial({ - side:THREE.DoubleSide, +// side:THREE.DoubleSide, transparent:true, opacity:0.4, - color:0xffffff, - vertexColors:THREE.FaceColors + color:0xffffff +// vertexColors:THREE.FaceColors })); globals.three.sceneAdd(this.mesh, null); @@ -120,7 +120,6 @@ Highlighter = Backbone.View.extend({ }, addRemoveVoxel: function(shouldAdd){ - if (shouldAdd){ if (!this.isVisible() || !this.highlightedObject) return; if (globals.lattice.get("connectionType") == "freeformFace"){ @@ -233,7 +232,6 @@ GIKHighlighter = Highlighter.extend({ }, addRemoveVoxel: function(shouldAdd){ - if (shouldAdd){ if (!this.isVisible() || !this.highlightedObject) return; var position = this._getNextCellPosition(); -- GitLab