From e8f2d7c434a2a0a3d30fd76d72112fd4dbe70e9a Mon Sep 17 00:00:00 2001
From: Amanda Ghassaei <amandaghassaei@gmail.com>
Date: Fri, 5 Jun 2015 13:20:55 -0700
Subject: [PATCH] vector3 instead of json

---
 js/lattice/Lattice.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/js/lattice/Lattice.js b/js/lattice/Lattice.js
index b3065fc9..e7e01f56 100644
--- a/js/lattice/Lattice.js
+++ b/js/lattice/Lattice.js
@@ -138,8 +138,8 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'three', 'thre
             three.removeAllCells();//todo add flag in cell destroy to avoid redundancy here
             this.cells = [[[null]]];
             this.sparseCells = [[[null]]];
-            this.set("cellsMax", {x:0, y:0, z:0});
-            this.set("cellsMin", {x:0, y:0, z:0});
+            this.set("cellsMax", new THREE.Vector3(0,0,0));
+            this.set("cellsMin", new THREE.Vector3(0,0,0));
             this.set("nodes", []);
             this.set("numCells", 0);
             if (globals.basePlane) globals.basePlane.set("zIndex", 0);
@@ -282,7 +282,7 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'three', 'thre
         },
 
         _updateCellsMin: function(newPosition, currentMin){
-            var newMin = {};
+            var newMin = new THREE.Vector3();
             var hasChanged = false;
             _.each(_.keys(newPosition), function(key){
                 if (newPosition[key]<currentMin[key]){
@@ -297,7 +297,7 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'three', 'thre
         },
 
         _updateCellsMax: function(newPosition, currentMax){
-            var newMax = {};
+            var newMax = new THREE.Vector3();
             var hasChanged = false;
             _.each(_.keys(newPosition), function(key){
                 if (newPosition[key]>currentMax[key]){
-- 
GitLab