diff --git a/01_Code/physical_computing_interface/app.js b/01_Code/physical_computing_interface/app.js index cb6d7b7a7890b19c46981e528ade8a399edf0e5c..3b34e3d93e8587dade83433aaa2beb2fcb6707d8 100644 --- a/01_Code/physical_computing_interface/app.js +++ b/01_Code/physical_computing_interface/app.js @@ -14,7 +14,7 @@ three.init(); initGraph();// todo enclose into class initEditor();// todo enclose into class -var assembler= new Assembler(three,GLOBALS,1,50,[new THREE.Vector3(0,0,0)],[new THREE.Vector3(GLOBALS.gridSize/2.0*GLOBALS.voxelSpacing,0,0)]); +var assembler= new Assembler(three,GLOBALS,1,50,[new THREE.Vector3(GLOBALS.gridSize*GLOBALS.voxelSpacing,0,0)],[new THREE.Vector3(GLOBALS.gridSize*GLOBALS.voxelSpacing,0,GLOBALS.gridSize/2.0*GLOBALS.voxelSpacing)]); assembler.run(); // old simulation stuff diff --git a/01_Code/physical_computing_interface/assembly/assemblerControl/setup.js b/01_Code/physical_computing_interface/assembly/assemblerControl/setup.js index 910b97d38f6f77cd6ecbe0d7c6f90ddb6f46ab2f..e0e75c824f7aad9edf209006340640d98acfa2a1 100644 --- a/01_Code/physical_computing_interface/assembly/assemblerControl/setup.js +++ b/01_Code/physical_computing_interface/assembly/assemblerControl/setup.js @@ -69,7 +69,7 @@ document.addEventListener('addNode', function (e) { var visionDisplay = "Color"; var feeders = []; - let utils = new Utils('errorMessage'); // Class instantiation + let utils1 = new Utils('errorMessage'); // Class instantiation let streaming = false, connected_to_tinyg = false, printing=false; var socket_connected = false; @@ -315,11 +315,11 @@ document.addEventListener('addNode', function (e) { start_stop_btn.addEventListener('click', () => { if (!streaming) { - utils.clearError(); - utils.startCamera('vga', onVideoStarted, 'videoInput'); + utils1.clearError(); + utils1.startCamera('vga', onVideoStarted, 'videoInput'); } else { - utils.stopCamera(); + utils1.stopCamera(); onVideoStopped(); } }); @@ -475,7 +475,7 @@ document.addEventListener('addNode', function (e) { $('#canvas_col').append('<canvas id="mycanvas" width=320 height=240><canvas>'); }; - utils.loadOpenCv(() => { + utils1.loadOpenCv(() => { start_stop_btn.removeAttribute('disabled'); cvHasLoaded(); // populateFeederOptions(); diff --git a/01_Code/physical_computing_interface/assembly/assemblerControl/utils.js b/01_Code/physical_computing_interface/assembly/assemblerControl/utils.js index d38d366acf1a0624dd5fa623b87f99f85f2ff817..2c5309660fe69ebe12601c846cf447449152da44 100644 --- a/01_Code/physical_computing_interface/assembly/assemblerControl/utils.js +++ b/01_Code/physical_computing_interface/assembly/assemblerControl/utils.js @@ -8,7 +8,7 @@ function Utils(errorOutputId) { // eslint-disable-line no-unused-vars script.setAttribute('async', ''); script.setAttribute('type', 'text/javascript'); script.addEventListener('load', () => { - console.log(cv.getBuildInformation()); + // console.log(cv.getBuildInformation()); onloadCallback(); }); script.addEventListener('error', () => { diff --git a/01_Code/physical_computing_interface/threejs/grid.js b/01_Code/physical_computing_interface/threejs/grid.js index 919a23211bf6027bccb612850ceec4737b2ce979..055fd44dfad3e0b07b3e9a01fc9a0b95bfaffbb0 100644 --- a/01_Code/physical_computing_interface/threejs/grid.js +++ b/01_Code/physical_computing_interface/threejs/grid.js @@ -118,7 +118,7 @@ function threejs(GLOBALS,utils,containerName,container1Name){ threejs.prototype.init=function() { this.camera = new THREE.PerspectiveCamera( 45, this.getWidth()/ this.getHeight() , 1, 10000*this.voxelSpacing); - this.camera.position.set( this.gridSize/2*this.voxelSpacing, this.gridSize*this.voxelSpacing*1.0, this.gridSize*this.voxelSpacing*2.5 ); + this.camera.position.set( -this.gridSize*this.voxelSpacing*1.0, this.gridSize*this.voxelSpacing, this.gridSize*this.voxelSpacing/2.0 ); this.camera.lookAt( this.gridSize/2, 0, this.gridSize/2 ); this.scene = new THREE.Scene(); this.scene.background = new THREE.Color( 0xffffff );