diff --git a/01_Code/physical_computing_interface/css/style.css b/01_Code/physical_computing_interface/css/style.css index e58aec1009f01f133a1b89b4d872d34513390fa1..d0aef402baf14bc14f88ef002ab529add5152453 100644 --- a/01_Code/physical_computing_interface/css/style.css +++ b/01_Code/physical_computing_interface/css/style.css @@ -90,9 +90,10 @@ body,html{width:100%;height:100%;padding:0;margin:0;} float: left; position: absolute; top:50%; + height: 49%; bottom: var(--bottom); /* overflow-y: hidden; */ - overflow: scroll; + /* overflow: scroll; */ font-family: var(--font); color: var(--color2); /* z-index: -1; */ @@ -102,6 +103,7 @@ body,html{width:100%;height:100%;padding:0;margin:0;} top:var(--top); bottom: var(--bottom); overflow-y: hidden; + overflow-x: hidden; font-family: var(--font); color: var(--color2); } @@ -110,6 +112,7 @@ body,html{width:100%;height:100%;padding:0;margin:0;} top:var(--top); bottom: var(--bottom); overflow-y: hidden; + overflow-x: hidden; font-family: var(--font); color: var(--color1); } diff --git a/01_Code/physical_computing_interface/simulation/visualization/main.js b/01_Code/physical_computing_interface/simulation/visualization/main.js index 89e467b1060fdabbfb4f07b98e0ea3010800b13e..7c95d1dea900df7e7de9641a7885674d301f705a 100644 --- a/01_Code/physical_computing_interface/simulation/visualization/main.js +++ b/01_Code/physical_computing_interface/simulation/visualization/main.js @@ -101,16 +101,17 @@ threejs1.prototype.init=function() { this.scene = new THREE.Scene(); camera = new THREE.PerspectiveCamera( 60, this.getWidth() / this.getHeight(), 1, 10000 ); - camera = new THREE.PerspectiveCamera( 45, this.getWidth()/ this.getHeight() , 1, 10000); + camera = new THREE.PerspectiveCamera( 45, this.getWidth()/ this.getHeight() , 1, 10000*GLOBALS.voxelSpacing); // camera.position.set( -gridSize*voxelSize*1.0, 0, 60 ); // camera.position.set( 40, 0, 60 ); // camera = new THREE.PerspectiveCamera( 45, this.getWidth()/ this.getHeight() , 1, 10000); - camera.position.set( -this.setup.gridSize*voxelSize/2, this.setup.gridSize*voxelSize, this.setup.gridSize*voxelSize/2 ); - // camera.lookAt(this.setup. gridSize/2*voxelSize, 0, this.setup.gridSize/2*voxelSize ); + + camera.position.set( -this.setup.gridSize*voxelSize/2, this.setup.gridSize*voxelSize, this.setup.gridSize*voxelSize/2 ); + // camera.lookAt(this.setup.gridSize/2*voxelSize, 0, this.setup.gridSize/2*voxelSize ); this.controls = new THREE.OrbitControls( camera, this.renderer.domElement ); - this.controls.minDistance = 10; - this.controls.maxDistance = 500; + // this.controls.minDistance = 10; + // this.controls.maxDistance = 500; this.controls.target= new THREE.Vector3(this.setup.gridSize/2*voxelSize, 0, this.setup.gridSize/2*voxelSize); this.controls.autoRotate=true; this.controls.update(); @@ -183,7 +184,7 @@ threejs1.prototype.init=function() { // guiCreate(this); // this.container.addEventListener( 'mousemove', onDocumentMouseMoveThree, false ); - this.container.addEventListener( 'mousedown', onDocumentMouseDown1, false ); + // this.container.addEventListener( 'mousedown', onDocumentMouseDown1, false ); window.addEventListener( 'mouseup', onWindowResize1, false ); @@ -585,8 +586,8 @@ threejs1.prototype.getWidth=function(){ threejs1.prototype.getHeight=function(){ // return container.style.height; - this.windowHeight=window.innerHeight-$('#'+three.container1Name).height() - return window.innerHeight-$('#'+three.container1Name).height() + this.windowHeight=window.innerHeight-$('#'+three.container1Name).height()-20 + return window.innerHeight-$('#'+three.container1Name).height()-20 if(this.container1Name===""){ console.log() return window.innerHeight ;