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

gik hierarchy working

parent 4834e663
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,14 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'superCell',
return geo;
};
CompositeCell.prototype._rotateCell = function(object3D){
if (lattice.get("connectionType") == "gik") {
if (this.index.z %2 != 0) return object3D.rotateZ(Math.PI/2);
return object3D;
}
return DMASuperCell.prototype._rotateCell.call(this, object3D);
};
CompositeCell.prototype._buildWireframe = function(mesh){
var wireframe = new THREE.BoxHelper(mesh);
wireframe.material.color.set(0x000000);
......
......@@ -35,7 +35,7 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'superCell',
GIKSuperCell.prototype._rotateCell = function(object3D){
if (!this.index) return object3D;
if (this.getAbsoluteIndex().z%2 != 0) object3D.rotateZ(Math.PI/2);
if (this.index.z%2 != 0) object3D.rotateZ(Math.PI/2);
return object3D;
};
......
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