diff --git a/js/cells/supercells/CompositeCell.js b/js/cells/supercells/CompositeCell.js index 70976006c1700ed75d690969cf06dfd0aaf2cc92..f449d77eb880ca43816f8e6086b474d3af875c8b 100644 --- a/js/cells/supercells/CompositeCell.js +++ b/js/cells/supercells/CompositeCell.js @@ -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); diff --git a/js/cells/supercells/GIKSuperCell.js b/js/cells/supercells/GIKSuperCell.js index 27832141d87a0aceea02ac45d89a9faf73a087dc..8191c3ed3cd664cef0b46634610163919c7b125d 100644 --- a/js/cells/supercells/GIKSuperCell.js +++ b/js/cells/supercells/GIKSuperCell.js @@ -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; };