Skip to content
Snippets Groups Projects
Commit a32bac44 authored by Neil Gershenfeld's avatar Neil Gershenfeld
Browse files

return to slice

parent 0b01c1e3
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// mesh slice // mesh slice
// //
// Neil Gershenfeld // Neil Gershenfeld
// (c) Massachusetts Institute of Technology 2017 // (c) Massachusetts Institute of Technology 2018
// //
// This work may be reproduced, modified, distributed, performed, and // This work may be reproduced, modified, distributed, performed, and
// displayed for any purpose, but must acknowledge the mods // displayed for any purpose, but must acknowledge the mods
...@@ -38,7 +38,8 @@ var inputs = { ...@@ -38,7 +38,8 @@ var inputs = {
mesh:{type:'', mesh:{type:'',
event:function(evt){ event:function(evt){
mod.mesh = new DataView(evt.detail) mod.mesh = new DataView(evt.detail)
draw_mesh()}}} draw_mesh()
slice_mesh()}}}
// //
// outputs // outputs
// //
...@@ -90,6 +91,7 @@ var interface = function(div){ ...@@ -90,6 +91,7 @@ var interface = function(div){
input.size = 6 input.size = 6
input.addEventListener('change',function(){ input.addEventListener('change',function(){
draw_mesh() draw_mesh()
slice_mesh()
}) })
div.appendChild(input) div.appendChild(input)
mod.rx = input mod.rx = input
...@@ -99,6 +101,7 @@ var interface = function(div){ ...@@ -99,6 +101,7 @@ var interface = function(div){
input.size = 6 input.size = 6
input.addEventListener('change',function(){ input.addEventListener('change',function(){
draw_mesh() draw_mesh()
slice_mesh()
}) })
div.appendChild(input) div.appendChild(input)
mod.ry = input mod.ry = input
...@@ -108,9 +111,11 @@ var interface = function(div){ ...@@ -108,9 +111,11 @@ var interface = function(div){
input.size = 6 input.size = 6
input.addEventListener('change',function(){ input.addEventListener('change',function(){
draw_mesh() draw_mesh()
slice_mesh()
}) })
div.appendChild(input) div.appendChild(input)
mod.rz = input mod.rz = input
div.appendChild(document.createTextNode(' (enter)'))
// //
// mesh size // mesh size
// //
...@@ -122,7 +127,7 @@ var interface = function(div){ ...@@ -122,7 +127,7 @@ var interface = function(div){
// slide depth // slide depth
// //
div.appendChild(document.createElement('br')) div.appendChild(document.createElement('br'))
div.appendChild(document.createTextNode('slice depth: ')) div.appendChild(document.createTextNode('slice z: '))
var input = document.createElement('input') var input = document.createElement('input')
input.type = 'text' input.type = 'text'
input.size = 6 input.size = 6
...@@ -245,7 +250,7 @@ function draw_mesh() { ...@@ -245,7 +250,7 @@ function draw_mesh() {
mod.meshsize.nodeValue = 'mesh size: '+ mod.meshsize.nodeValue = 'mesh size: '+
mod.dx.toFixed(3)+' x '+ mod.dx.toFixed(3)+' x '+
mod.dy.toFixed(3)+' x '+ mod.dy.toFixed(3)+' x '+
mod.dz.toFixed(3) mod.dz.toFixed(3)+' (XYZ)'
// //
// draw projection // draw projection
// //
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment