diff --git a/js/cam/assemblers/Assembler.js b/js/cam/assemblers/Assembler.js index 385d8a20d87029ae09ad97024ed56461ba9cea35..4edf6fd89761036448cde0b694c13a06f0f64e0b 100644 --- a/js/cam/assemblers/Assembler.js +++ b/js/cam/assemblers/Assembler.js @@ -339,10 +339,10 @@ define(['underscore', 'appState', 'lattice', 'stlLoader', 'threeModel', 'cam', ' if (totalThreads > 0) return; callback(); } - var startingPos = {x:this.components.xAxis.getPosition().x, y:this.components.yAxis.getPosition().y, z:this.components.zAxis.getPosition().z}; + var startingPos = {x:this.components.yAxis.getPosition().x, y:this.components.xAxis.getPosition().y, z:this.components.zAxis.getPosition().z}; speed = this._normalizeSpeed(startingPos, position, new THREE.Vector3(speed, speed, speed)); - this.components.xAxis.moveTo(this._makeAxisVector(position, "x"), speed.x, sketchyCallback); - this.components.yAxis.moveTo(this._makeAxisVector(position, "y"), speed.y, sketchyCallback); + this.components.yAxis.moveTo(this._makeAxisVector(position, "x"), speed.x, sketchyCallback); + this.components.xAxis.moveTo(this._makeAxisVector(position, "y"), speed.y, sketchyCallback); this.components.zAxis.moveTo(this._makeAxisVector(position, "z"), speed.z, sketchyCallback); }; diff --git a/js/highlighter/SuperCellHighlighter.js b/js/highlighter/SuperCellHighlighter.js index 14d6bec7a8c61dae364053221cc49b67f9b7772a..f08f59d5020e397f4f1ac89b6a62910b183d9f9f 100644 --- a/js/highlighter/SuperCellHighlighter.js +++ b/js/highlighter/SuperCellHighlighter.js @@ -43,7 +43,6 @@ define(['underscore', 'backbone', 'threeModel', 'appState', 'lattice', 'cell', ' if (!this.highlightedObject) return; var index = this.highlightedObject.getAbsoluteIndex(); if (Math.abs(direction.z) > 0.9) index.z+=1; - else if (Math.abs(direction.z) < 0.1) index.z -=1; if (appState._drawingWithCompositeMaterialType()) this.mesh.rotation.set(0,0, lattice._zIndexRotationSuperCell(index)); else this.mesh.rotation.set(0,0, lattice._zIndexRotation(index)); } @@ -69,7 +68,6 @@ define(['underscore', 'backbone', 'threeModel', 'appState', 'lattice', 'cell', ' var offset = appState.get("superCellIndex").clone(); offset.applyQuaternion(this.mesh.quaternion).round(); newIndex.sub(offset); - console.log(newIndex.clone()); return newIndex; } }); diff --git a/js/lattice/Lattice.js b/js/lattice/Lattice.js index a01b559e2a99786c8c485f2a0bfd27f0674bee8b..b8f540500b58fabae3070405ff66ceb0890a148f 100644 --- a/js/lattice/Lattice.js +++ b/js/lattice/Lattice.js @@ -143,7 +143,6 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'three', 'thre var min = this.get("cellsMin").sub(bounds.min); var overlap = false; var forCAM = appState.get("currentNav") == "navAssemble"; - console.log(forCAM); this._loopCells(this.sparseCells, function(cell){ if (!cell) return; overlap |= cell.addToDenseArray(cells, min, forCAM); diff --git a/js/lattice/LatticeBase.js b/js/lattice/LatticeBase.js index c54c27b99b355cf832461c52dc9b0ad4dc832f17..c50e25750614ee7560bfc46ba335010674993246 100644 --- a/js/lattice/LatticeBase.js +++ b/js/lattice/LatticeBase.js @@ -205,7 +205,7 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'three', 'thre if (cell){ var material = cell.getMaterial(); var dimensions = material.dimensions; - if (dimensions) dimensions.clone(); + if (dimensions) dimensions = dimensions.clone(); else dimensions = new THREE.Vector3(cell.length, 1, 1); dimensions.sub(new THREE.Vector3(1,1,1)); var subCellRange = (new THREE.Vector3(x, y, z)).add(cell.applyRotation(dimensions).round().add(new THREE.Vector3(1,1,1))); diff --git a/js/lattice/latticeSubclasses/GIKLattice.js b/js/lattice/latticeSubclasses/GIKLattice.js index 4ad1b24d8b4337a0a4ae6d7e2bf9763d72d7b3fd..1c0150a2de91a3ebd2671683adc649ef483e075f 100644 --- a/js/lattice/latticeSubclasses/GIKLattice.js +++ b/js/lattice/latticeSubclasses/GIKLattice.js @@ -49,7 +49,7 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'three', 'thre }, _zIndexRotationSuperCell: function(index){ - if (index.z%2 != 0) return Math.PI/2;//this never changes + if (index.z%2 != 0) return -Math.PI/2;//this never changes return 0; },