summaryrefslogtreecommitdiff
path: root/app/client/live/index.js
blob: 8d16785c0fc895e95784daf862332869bc9585c4 (plain)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
import { h, Component } from 'preact'
import { bindActionCreators } from 'redux'
import { connect } from 'react-redux'

import Player from './components/player.component'
import ParamGroup from '../common/paramGroup.component'
import Slider from '../common/slider.component'

import * as liveActions from './actions'

class App extends Component {
  constructor(props){
    super()
    props.actions.get_params()
  }
  render(){
    const props = this.props
    return (
      <div className='app'>
        <Player />
        <div className='params'>

          <ParamGroup
            title='Transition'
          >
            <Slider
              name='transition_period'
              min={10} max={5000} type='int'
            />
            <Slider
              name='transition_min'
              min={0.001} max={0.2} type='float'
            />
            <Slider
              name='transition_max'
              min={0.1} max={1.0} type='float'
            />
          </ParamGroup>

          <ParamGroup
            title='Recursion'
            toggle='recursive'
          >
            <Slider
              name='recursive_frac'
              min={0.01} max={0.3} type='float'
            />
            <Slider
              name='recurse_roll'
              min={-5} max={5} type='int'
            />
            <Slider
              name='recurse_roll_axis'
              min={0} max={1} type='int'
            />
          </ParamGroup>

          <ParamGroup
            title='Sequence'
            toggle='sequence'
          >
            <Slider
              name='sequence_frac'
              min={0.01} max={0.3} type='float'
            />
            <Slider
              name='process_frac'
              min={0} max={1} type='float'
            />
          </ParamGroup>

          <ParamGroup
            title='Clahe'
            toggle='clahe'
          >
            <Slider
              name='clip_limit'
              min={1.0} max={4.0} type='float'
            />
          </ParamGroup>

          <ParamGroup
            title='Posterize'
            toggle='posterize'
          >
            <Slider
              name='spatial_window'
              min={2} max={128} type='int'
            />
            <Slider
              name='color_window'
              min={2} max={128} type='int'
            />
          </ParamGroup>

          <ParamGroup
            title='Blur'
            toggle='blur'
          >
            <Slider
              name='blur_radius'
              min={3} max={7} type='int'
            />
            <Slider
              name='blur_sigma'
              min={0} max={2} type='float'
            />
          </ParamGroup>

          <ParamGroup
            title='Canny Edge Detection'
            toggle='canny'
          >
            <Slider
              name='canny_lo'
              min={10} max={200} type='int'
            />
            <Slider
              name='canny_hi'
              min={10} max={200} type='int'
            />
          </ParamGroup>

        </div>
      </div>
    )
  }
}

const mapStateToProps = state => ({
})

const mapDispatchToProps = (dispatch, ownProps) => ({
  actions: bindActionCreators(liveActions, dispatch)
})

export default connect(mapStateToProps, mapDispatchToProps)(App)