diff options
Diffstat (limited to 'Build')
-rw-r--r-- | Build/index.html | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/Build/index.html b/Build/index.html index 24e84d6..4c371ec 100644 --- a/Build/index.html +++ b/Build/index.html @@ -5,7 +5,7 @@ </head> <body> <pre> - Koh fractal. Version: 0.3 + Wasm audio FIR. Version: 0.1 </pre> <script type='text/javascript'> var Module = {}; @@ -26,6 +26,41 @@ <div align="center"> <canvas id="canvas" ></canvas> </div> + + <button class="setCutoffFrequency" type="button">Set Cutoff(Hz)</button> + <textarea class="outSetCutoffFrequency"></textarea> + + <button class="setNumberTaps" type="button">Set Taps</button> + <textarea class="outSetNumberTaps"></textarea> + + <button class="recalculateFir" type="button">Calc</button> + <textarea class="outCoeficients">1</textarea> + + + <script> + get_cutoff_freq = Module.cwrap("get_cutoff_freq","number",[]); + get_tap_number = Module.cwrap("get_tap_number","number",[]); + recalculate_fir = Module.cwrap("recalculate_fir",'number',[]); + + var setCutoffFrequency = document.querySelector('.setCutoffFrequency') + var outSetCutoffFrequency = document.querySelector('.outSetCutoffFrequency') + var setNumberTaps = document.querySelector('.setNumberTaps') + var outSetNumberTaps = document.querySelector('.outSetNumberTaps') + var recalculateFir = document.querySelector('.recalculateFir') + var outCoeficients = document.querySelector('.outCoeficients') + + //outSetCutoffFrequency.value = get_cutoff_freq(); + //outSetCutoffFrequency.value = "Hello"; + //outSetNumberTaps.value = get_tap_number(); + + recalculateFir.addEventListener('click', function(){ + recalculate_fir(); + console.log("Oh noe"); + outCoeficients.value = 2; + }) + + </script> + <pre> If no recording, check developer console(Ctrl+Shift+I) or add domain (http://wasm.main.lv) to chrome://flags/#unsafely-treat-insecure-origin-as-secure @@ -40,6 +75,8 @@ Changelog: v0.1 - initial release </pre> + + <!--<script src="index.js"></script>--> </body> </html> |