{"modules":{"0.010818389477208257":{"definition":"//\n// variable module\n//\n// Neil Gershenfeld \n// (c) Massachusetts Institute of Technology 2015\n// \n// This work may be reproduced, modified, distributed, performed, and \n// displayed for any purpose, but must acknowledge the fab modules \n// project. Copyright is retained and must be preserved. The work is \n// provided as is; no warranty is provided, and users accept all \n// liability.\n//\n// closure\n//\n(function(){\n//\n// module globals\n//\nvar mod = {}\n//\n// name\n//\nvar name = 'text variables'\n//\n// initialization\n//\nvar init = function() {\n mod.text1.value = 'value 1'\n mod.text2.value = 'value 2'\n }\n//\n// inputs\n//\nvar inputs = {\n var1:{type:'text',\n event:function(evt){\n mod.text1.value = evt.detail\n outputs.var1.event()}},\n var2:{type:'text',\n event:function(evt){\n mod.text2.value = evt.detail\n outputs.var2.event()}}}\n//\n// outputs\n//\nvar outputs = {\n var1:{type:'text',\n event:function(){\n mods.output(mod,'var1',mod.text1.value)}},\n var2:{type:'text',\n event:function(){\n mods.output(mod,'var2',mod.text2.value)}}}\n//\n// interface\n//\nvar interface = function(div){\n mod.div = div\n div.appendChild(document.createTextNode('var1: '))\n input = document.createElement('input')\n input.type = 'text'\n input.size = 6\n input.addEventListener('input',function(evt){\n outputs.var1.event()\n })\n div.appendChild(input)\n mod.text1 = input\n div.appendChild(document.createElement('br'))\n div.appendChild(document.createTextNode('var2: '))\n input = document.createElement('input')\n input.type = 'text'\n input.size = 6\n input.addEventListener('input',function(evt){\n outputs.var2.event()\n })\n div.appendChild(input)\n mod.text2 = input\n }\n//\n// local functions\n//\n;\n//\n// return values\n//\nreturn ({\n mod:mod,\n name:name,\n init:init,\n inputs:inputs,\n outputs:outputs,\n interface:interface\n })\n}())\n","top":"192","left":"621","inputs":{},"outputs":{}},"0.6290685737039894":{"definition":"//\n// variable module\n//\n// Neil Gershenfeld \n// (c) Massachusetts Institute of Technology 2015\n// \n// This work may be reproduced, modified, distributed, performed, and \n// displayed for any purpose, but must acknowledge the fab modules \n// project. Copyright is retained and must be preserved. The work is \n// provided as is; no warranty is provided, and users accept all \n// liability.\n//\n// closure\n//\n(function(){\n//\n// module globals\n//\nvar mod = {}\n//\n// name\n//\nvar name = 'text variables'\n//\n// initialization\n//\nvar init = function() {\n mod.text1.value = 'value 1'\n mod.text2.value = 'hello'\n }\n//\n// inputs\n//\nvar inputs = {\n var1:{type:'text',\n event:function(evt){\n mod.text1.value = evt.detail\n outputs.var1.event()}},\n var2:{type:'text',\n event:function(evt){\n mod.text2.value = evt.detail\n outputs.var2.event()}}}\n//\n// outputs\n//\nvar outputs = {\n var1:{type:'text',\n event:function(){\n mods.output(mod,'var1',mod.text1.value)}},\n var2:{type:'text',\n event:function(){\n mods.output(mod,'var2',mod.text2.value)}}}\n//\n// interface\n//\nvar interface = function(div){\n mod.div = div\n div.appendChild(document.createTextNode('var1: '))\n input = document.createElement('input')\n input.type = 'text'\n input.size = 6\n input.addEventListener('input',function(evt){\n outputs.var1.event()\n })\n div.appendChild(input)\n mod.text1 = input\n div.appendChild(document.createElement('br'))\n div.appendChild(document.createTextNode('var2: '))\n input = document.createElement('input')\n input.type = 'text'\n input.size = 6\n input.addEventListener('input',function(evt){\n outputs.var2.event()\n })\n div.appendChild(input)\n mod.text2 = input\n }\n//\n// local functions\n//\n;\n//\n// return values\n//\nreturn ({\n mod:mod,\n name:name,\n init:init,\n inputs:inputs,\n outputs:outputs,\n interface:interface\n })\n}())\n","top":"300","left":"185","inputs":{},"outputs":{}},"0.7833817126229405":{"definition":"//\n// variable module\n//\n// Neil Gershenfeld \n// (c) Massachusetts Institute of Technology 2015\n// \n// This work may be reproduced, modified, distributed, performed, and \n// displayed for any purpose, but must acknowledge the fab modules \n// project. Copyright is retained and must be preserved. The work is \n// provided as is; no warranty is provided, and users accept all \n// liability.\n//\n// closure\n//\n(function(){\n//\n// module globals\n//\nvar mod = {}\n//\n// name\n//\nvar name = 'text variables'\n//\n// initialization\n//\nvar init = function() {\n mod.text1.value = 'world'\n mod.text2.value = 'value 2'\n }\n//\n// inputs\n//\nvar inputs = {\n var1:{type:'text',\n event:function(evt){\n mod.text1.value = evt.detail\n outputs.var1.event()}},\n var2:{type:'text',\n event:function(evt){\n mod.text2.value = evt.detail\n outputs.var2.event()}}}\n//\n// outputs\n//\nvar outputs = {\n var1:{type:'text',\n event:function(){\n mods.output(mod,'var1',mod.text1.value)}},\n var2:{type:'text',\n event:function(){\n mods.output(mod,'var2',mod.text2.value)}}}\n//\n// interface\n//\nvar interface = function(div){\n mod.div = div\n div.appendChild(document.createTextNode('var1: '))\n input = document.createElement('input')\n input.type = 'text'\n input.size = 6\n input.addEventListener('input',function(evt){\n outputs.var1.event()\n })\n div.appendChild(input)\n mod.text1 = input\n div.appendChild(document.createElement('br'))\n div.appendChild(document.createTextNode('var2: '))\n input = document.createElement('input')\n input.type = 'text'\n input.size = 6\n input.addEventListener('input',function(evt){\n outputs.var2.event()\n })\n div.appendChild(input)\n mod.text2 = input\n }\n//\n// local functions\n//\n;\n//\n// return values\n//\nreturn ({\n mod:mod,\n name:name,\n init:init,\n inputs:inputs,\n outputs:outputs,\n interface:interface\n })\n}())\n","top":"93","left":"186","inputs":{},"outputs":{}}},"links":["{\"source\":\"{\\\"id\\\":\\\"0.6290685737039894\\\",\\\"type\\\":\\\"outputs\\\",\\\"name\\\":\\\"var2\\\"}\",\"dest\":\"{\\\"id\\\":\\\"0.010818389477208257\\\",\\\"type\\\":\\\"inputs\\\",\\\"name\\\":\\\"var1\\\"}\"}","{\"source\":\"{\\\"id\\\":\\\"0.7833817126229405\\\",\\\"type\\\":\\\"outputs\\\",\\\"name\\\":\\\"var1\\\"}\",\"dest\":\"{\\\"id\\\":\\\"0.010818389477208257\\\",\\\"type\\\":\\\"inputs\\\",\\\"name\\\":\\\"var2\\\"}\"}"]}