From 94f50742aac95d3003771d1037b8b63dab8f4d95 Mon Sep 17 00:00:00 2001 From: Amanda Ghassaei <amandaghassaei@gmail.com> Date: Tue, 3 Mar 2015 11:24:22 -0500 Subject: [PATCH] clean up --- js/menus/OptimizationMenuView.js | 2 +- js/models/ThreeModel.js | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/js/menus/OptimizationMenuView.js b/js/menus/OptimizationMenuView.js index 6e566afa..a9405039 100644 --- a/js/menus/OptimizationMenuView.js +++ b/js/menus/OptimizationMenuView.js @@ -26,7 +26,7 @@ OptimizationMenuView = Backbone.View.extend({ <br/><br/>\ optimization parameters representation may depend on application: <a href="http://en.wikipedia.org/wiki/Evolved_antenna">antenna</a>, <a href="http://2.bp.blogspot.com/-4o29mAWZjag/UURyXoraMKI/AAAAAAAAHyM/HnevUeJ68Sw/s400/yyy.bmp">nike</a>, airbus, assembler/declarative design\ <br/><br/>\ - active components/structures: <a href="https://www.youtube.com/watch?v=z9ptOeByLA4">voxcad</a>, <a href="http://arxiv.org/pdf/cs/0004003v2.pdf">conway</a>\ + active components/structures: <a href="https://www.youtube.com/watch?v=z9ptOeByLA4">voxcad</a>, <a href="http://arxiv.org/pdf/cs/0004003v2.pdf">conway</a> (<a href="http://www.instructables.com/id/OTCA-Metapixel-Conways-Game-of-Life/">instructable</a>)\ <br/><br/>\ ') diff --git a/js/models/ThreeModel.js b/js/models/ThreeModel.js index 5a239c71..ee30034f 100644 --- a/js/models/ThreeModel.js +++ b/js/models/ThreeModel.js @@ -11,7 +11,6 @@ function ThreeModel(){ //store all meshes to highlight var cells = []; - var highlightableCells = [];//may be able to get rid of this eventually var invCells = []; var parts = []; var basePlane = []; @@ -55,8 +54,7 @@ function ThreeModel(){ scene.add(object); if (type == "cell"){ - cells.push(object); - highlightableCells.push(object.children[0]); + cells.push(object.children[0]); } else if (type == "inverseCell"){ invCells.push(object); } else if (type == "part"){ @@ -74,8 +72,7 @@ function ThreeModel(){ } if (type == "cell"){ - cells.splice(cells.indexOf(objectToRemove), 1); - highlightableCells.splice(highlightableCells.indexOf(objectToRemove.children[0]), 1); + cells.splice(cells.indexOf(objectToRemove.children[0]), 1); } else if (type == "inverseCell"){ invCells.splice(invCells.indexOf(objectToRemove), 1); } else if (type == "part"){ @@ -96,7 +93,7 @@ function ThreeModel(){ _.each(invCells, function(cell){ sceneRemove(cell, "inverseCell"); }); - cells.splice(0, cells.length);; + cells.splice(0, cells.length); parts.splice(0, parts.length); } @@ -111,7 +108,7 @@ function ThreeModel(){ // scene: scene, domElement: renderer.domElement, camera: camera, - cells: highlightableCells, + cells: cells, invCells: invCells, parts: parts, basePlane: basePlane, -- GitLab