diff --git a/js/cam/Assembler.js b/js/cam/Assembler.js index 2e402e9a159277430eda2a1734fe0f07122f0436..2203de1adf1ffeb39608ef534e6a053132d7bf9c 100644 --- a/js/cam/Assembler.js +++ b/js/cam/Assembler.js @@ -183,6 +183,7 @@ Assembler = Backbone.Model.extend({ _stockSimulation: function(){ if (dmaGlobals.appState.get("stockSimulationPlaying")){ + dmaGlobals.three.startAnimationLoop(); var currentLine = this.get("simLineNumber"); if (currentLine == 0) dmaGlobals.lattice.hideCells(); var allLines = this.get("dataOut").split("\n"); @@ -199,6 +200,7 @@ Assembler = Backbone.Model.extend({ this.resetSimulation(); } } else { + dmaGlobals.three.stopAnimationLoop(); this.get("machine").pause(); } diff --git a/js/cam/Machine.js b/js/cam/Machine.js index 9a8ad92506f0fb3c4ed5dc1010450af1d96aa83d..90e9fdec8a05f6608ba7abf82db774db05332610 100644 --- a/js/cam/Machine.js +++ b/js/cam/Machine.js @@ -92,7 +92,6 @@ Machine.prototype._animateMesh = function(mesh, axis, speed, target, callback){ var direction = 1; if (target-mesh.position[axis] < 0) direction = -1; increment = Math.max(Math.abs(increment), 0.00001)*direction;//need to put a min on the increment - other wise this stall out with floating pt tol - dmaGlobals.three.startAnimationLoop(); var simSpeed = 100/dmaGlobals.assembler.get("simSpeed");//1/10th of sec this._incrementalMove(mesh, axis, increment, target, direction, callback, simSpeed); };