Commit a98232ec authored by Amanda Ghassaei's avatar Amanda Ghassaei
Browse files

slider bug

parent b5521767
...@@ -40,7 +40,7 @@ define(['underscore', 'three', 'backbone', 'appState', 'latticeCAM', 'threeModel ...@@ -40,7 +40,7 @@ define(['underscore', 'three', 'backbone', 'appState', 'latticeCAM', 'threeModel
feedRate:{xy: 0.1, z: 0.1},//speed when heading towards assembly feedRate:{xy: 0.1, z: 0.1},//speed when heading towards assembly
simLineNumber: 0,//used for stock simulation, reading through gcode simLineNumber: 0,//used for stock simulation, reading through gcode
simSpeed: 4,//#X times real speed simSpeed: 16,//#X times real speed
allCAMMaterialTypes: []//all types of stock needed allCAMMaterialTypes: []//all types of stock needed
}, },
......
...@@ -237,7 +237,6 @@ define(['underscore', 'appState', 'lattice', 'stlLoader', 'threeModel', 'cam', ' ...@@ -237,7 +237,6 @@ define(['underscore', 'appState', 'lattice', 'stlLoader', 'threeModel', 'cam', '
callback(); callback();
} }
console.log(position);
var startingPos = this.components.xAxis.getPosition().add(this.components.yAxis.getPosition().add(this.components.zAxis.getPosition()));//this.components.zAxis.getAbsolutePosition();//get position of end effector var startingPos = this.components.xAxis.getPosition().add(this.components.yAxis.getPosition().add(this.components.zAxis.getPosition()));//this.components.zAxis.getAbsolutePosition();//get position of end effector
speed = this._normalizeSpeed(startingPos, position, new THREE.Vector3(speed, speed, speed));//todo fix this speed = this._normalizeSpeed(startingPos, position, new THREE.Vector3(speed, speed, speed));//todo fix this
...@@ -329,6 +328,9 @@ define(['underscore', 'appState', 'lattice', 'stlLoader', 'threeModel', 'cam', ' ...@@ -329,6 +328,9 @@ define(['underscore', 'appState', 'lattice', 'stlLoader', 'threeModel', 'cam', '
stock: stockJSON, stock: stockJSON,
tree: this.tree || this.buildComponentTree() tree: this.tree || this.buildComponentTree()
}); });
json.customPost = {
};
return json; return json;
}; };
......
...@@ -68,7 +68,9 @@ define(['jquery', 'underscore', 'menuParent', 'cam', 'text!animationMenuTemplate ...@@ -68,7 +68,9 @@ define(['jquery', 'underscore', 'menuParent', 'cam', 'text!animationMenuTemplate
_changeSpeedSlider: function(e){ _changeSpeedSlider: function(e){
e.preventDefault(); e.preventDefault();
cam.set("simSpeed", Math.pow(2,$(e.target)[0].value)); var val = $(e.target)[0].value;
if (val === undefined || val === null) return;
cam.set("simSpeed", Math.pow(2,val));
}, },
_drawGcodeHighlighter: function(){ _drawGcodeHighlighter: function(){
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment