blob: 0f37bbaa968f3f72d22df7e7c98215d2b45a1213 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#include "web_opts.h"
#include "comp.h"
#include <math.h>
#include <emscripten/emscripten.h>
int delay_ms = 1000;
void opts_init()
{
EM_ASM(readOpts());
EM_ASM({updateDelay($0)}, delay_ms);
EM_ASM({updateStdev($0)}, horizontal_stdev);
}
EMSCRIPTEN_KEEPALIVE
void set_delay(int delay)
{
delay_ms = delay;
}
EMSCRIPTEN_KEEPALIVE
void set_stdev(float stdev)
{
if (!isnan(stdev))
horizontal_stdev = vertical_stdev = stdev;
}
|