diff --git a/js/cam/Cam.js b/js/cam/Cam.js index 76650eacae31549e02a2a4b37d19e545ff24f320..a874d08c2094f800b2136ccb90849b7fda77c031 100644 --- a/js/cam/Cam.js +++ b/js/cam/Cam.js @@ -40,7 +40,7 @@ define(['underscore', 'three', 'backbone', 'appState', 'latticeCAM', 'threeModel feedRate:{xy: 0.1, z: 0.1},//speed when heading towards assembly 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 }, diff --git a/js/cam/assemblers/Assembler.js b/js/cam/assemblers/Assembler.js index d65fc62aed2f524cd01a82358a1491a4b66f0311..4bc3e4d1535208b7e05580895c8baf1060037eca 100644 --- a/js/cam/assemblers/Assembler.js +++ b/js/cam/assemblers/Assembler.js @@ -237,7 +237,6 @@ define(['underscore', 'appState', 'lattice', 'stlLoader', 'threeModel', 'cam', ' 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 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', ' stock: stockJSON, tree: this.tree || this.buildComponentTree() }); + json.customPost = { + + }; return json; }; diff --git a/js/menus/AnimationMenuView.js b/js/menus/AnimationMenuView.js index ff3f958966a6d375eb2e492a23e065e818b5a307..aeba19e663d14df4c532e5b1f4f9f3d2a11ec098 100644 --- a/js/menus/AnimationMenuView.js +++ b/js/menus/AnimationMenuView.js @@ -68,7 +68,9 @@ define(['jquery', 'underscore', 'menuParent', 'cam', 'text!animationMenuTemplate _changeSpeedSlider: function(e){ 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(){