From 2027e8b20ab05946e357f7357c91a19d3a50e483 Mon Sep 17 00:00:00 2001 From: geremy Date: Sun, 4 Jan 2015 17:34:29 -0800 Subject: adding ability to tweak dynamically --- python/examples/futureHouse/waveViz.html | 13 ++++++++----- python/examples/futureHouse/waveViz.js | 12 +++++++++++- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/python/examples/futureHouse/waveViz.html b/python/examples/futureHouse/waveViz.html index d85a47d..273f3b8 100644 --- a/python/examples/futureHouse/waveViz.html +++ b/python/examples/futureHouse/waveViz.html @@ -9,16 +9,19 @@ + + - - - + +
+ - + + - + diff --git a/python/examples/futureHouse/waveViz.js b/python/examples/futureHouse/waveViz.js index 5e59a18..a0cb53f 100644 --- a/python/examples/futureHouse/waveViz.js +++ b/python/examples/futureHouse/waveViz.js @@ -34,6 +34,16 @@ $(function () { ctx.strokeStyle = '#ffffff'; ctx.fillStyle = 'rgb(50, 50, 80)'; + $("#minPulseLength").on('keydown', function (e) { + + if (e.keyCode == 13) { + var v = $("#minPulseLength").val(); + osc1.min = v; + console.log("minP: " + v); + } + + }); + function loop() { var i; @@ -99,7 +109,7 @@ $(function () { //return max * Math.sin(a * Math.PI); var waveVal = a < 1 ? this.min : this.max; - console.log(waveVal); + // console.log(waveVal); return waveVal; } -- cgit v1.2.3