Skip to content
Snippets Groups Projects
Commit 2214c145 authored by Amanda Ghassaei's avatar Amanda Ghassaei
Browse files

pass gik length through

parent 90569c25
No related branches found
No related tags found
No related merge requests found
......@@ -40,17 +40,19 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'cell'],
cells[x][y].push(null);
var json = {index: new THREE.Vector3(x,y,z)};
var callback = function(cell){
var cellIndex = cell.getIndex();//x,y,z have changed by now
cells[cellIndex.x][cellIndex.y][cellIndex.z] = cell;
};
if (material.sparseCells){
if (material.sparseCells[x][y][z]){
this._makeSubCellForIndex({index: new THREE.Vector3(x,y,z), materialName:material.sparseCells[x][y][z].materialName}, function(cell){
var cellIndex = cell.getIndex();//x,y,z have changed by now
cells[cellIndex.x][cellIndex.y][cellIndex.z] = cell;
});
json = _.extend(json, material.sparseCells[x][y][z]);
this._makeSubCellForIndex(json, callback);
}//else no cell in this spot
} else {//if not from composite definition, add subcell at all possible indices in supercell range
this._makeSubCellForIndex({index: new THREE.Vector3(x,y,z), materialName:this.materialName}, function(cell){
cells[x][y][z] = cell;
});
this._makeSubCellForIndex(json, callback);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment