split widgets reference, fix typos, try to be accurate...
This commit is contained in:
parent
c8a4d64d52
commit
83c8de3ac3
10 changed files with 198 additions and 160 deletions
|
|
@ -25,162 +25,11 @@ Every widget has the following properties:
|
|||
|
||||
## Widget specifics
|
||||
|
||||
Each widget type comes with a set of specific properties which are described below.
|
||||
Each widget type comes with an additional set of specific properties which are described in the page listed below.
|
||||
|
||||
### strip : *simple widget container*
|
||||
```js
|
||||
type:'strip',
|
||||
horizontal:false, // [bool] set to true to display widgets horizontally
|
||||
widgets: [] // [array] of widget objects
|
||||
```
|
||||
|
||||
### panel : *widget/tabs containers*
|
||||
```js
|
||||
type:'panel',
|
||||
stretch:false, // [bool] set to true to stretch widgets width (don't put horizontal strips in it)
|
||||
widgets: [], // [array] of widget objects
|
||||
tabs: [] // [array] of tab objects
|
||||
```
|
||||
|
||||
### fader
|
||||
```js
|
||||
type:'fader',
|
||||
horizontal:false, // [bool] set to true to display fader horizontally
|
||||
range: {"min":0,"max":1}, // [object] defining the breakpoints of the fader
|
||||
// keys can be percentages or 'min' / 'max'
|
||||
logScale: false, // [bool] use logarithmic scale (log10)
|
||||
unit: false, // [string] value suffix
|
||||
absolute:false // [bool] set to true for absolute value on touch/click instead of relative dragging
|
||||
```
|
||||
|
||||
### multifader
|
||||
```js
|
||||
type:'multifader',
|
||||
strips:2, // [integer] number of faders
|
||||
range: {"min":0,"max":1}, // [object] defining the breakpoints of the fader
|
||||
// keys can be percentages or 'min' / 'max'
|
||||
logScale: false, // [bool] use logarithmic scale (log10)
|
||||
unit: false, // [string] value suffix
|
||||
absolute:false // [bool] set to true for absolute value on touch/click instead of relative dragging
|
||||
```
|
||||
*This creates a row of vertical faders that respond to the same gesture. Each of these faders will receive its parent's properties and the following (where X is the fader's index in the row) :*
|
||||
```js
|
||||
id:PARENT_ID_X,
|
||||
label: X,
|
||||
path: PARENT_PATH/X
|
||||
```
|
||||
|
||||
|
||||
### knob
|
||||
```js
|
||||
type:'knob',
|
||||
range: {"min":0,"max":1}, // [object] minimum and maximum values
|
||||
logScale: false, // [bool] use logarithmic scale (log10)
|
||||
unit: false, // [string] value suffix
|
||||
absolute:false, // [bool] set to true for absolute value on touch/click instead of relative dragging
|
||||
pan:false // [bool] true for panning knob
|
||||
```
|
||||
|
||||
### xy
|
||||
```js
|
||||
type:'xy',
|
||||
range:{ // [object] minimum and maximum values for x and y axis
|
||||
x:{"min":0,"max":1},
|
||||
y:{"min":0,"max":1}
|
||||
},
|
||||
logScaleX: false, // [bool] use logarithmic scale for X axis (log10)
|
||||
logScaleY: false, // [bool] use logarithmic scale for y axis (log10)
|
||||
absolute:false, // [bool] set to true for absolute value on touch/click instead of relative dragging
|
||||
split:false // [bool|object] sends separate osc messages for x and y axes
|
||||
// if true : '/x' & '/y' will be appended to the widget's path
|
||||
// or object : {x:'/osc_path_x', y:'/osc_path_y'}
|
||||
|
||||
```
|
||||
|
||||
### rgb
|
||||
```js
|
||||
type:'rgb',
|
||||
absolute:false, // [bool] set to true for absolute value on touch/click instead of relative dragging
|
||||
split:false // [bool|object] sends separate osc messages for x and y axes
|
||||
// if true : '/r', '/g' & '/b' will be appended to the widget's path
|
||||
// or object : {r:'/osc_path_r', g:'/osc_path_g',b:'/osc_path_b'}
|
||||
```
|
||||
Variant of xy pad, it outputs rgb values between 0 and 255.
|
||||
|
||||
|
||||
### toggle
|
||||
```js
|
||||
type:'toggle',
|
||||
on: 1, // [string|number|false] value sent when toggle is on (false to prevent sending )
|
||||
off:0, // [string|number|false] value sent when toggle is off (false to prevent sending )
|
||||
```
|
||||
|
||||
### multitoggle
|
||||
```js
|
||||
type:'multitoggle',
|
||||
matrix:[2,2], // [array] [number of columns, number of rows]
|
||||
on: 1, // [string|number|false] value sent when toggle is on (false to prevent sending )
|
||||
off:0, // [string|number|false] value sent when toggle is off (false to prevent sending )
|
||||
```
|
||||
*This creates a matrix of toggles that respond to the same gesture. Each of these toggles will receive its parent's properties and the following (where X is the toggle's index in the row) :*
|
||||
```js
|
||||
id:PARENT_ID_X,
|
||||
label: X,
|
||||
path: PARENT_PATH/X
|
||||
```
|
||||
|
||||
### push
|
||||
```js
|
||||
type:'push',
|
||||
on: 1, // [string|number|false] value sent when toggle is on (false to prevent sending )
|
||||
off:0, // [string|number|false] value sent when toggle is off (false to prevent sending )
|
||||
```
|
||||
|
||||
### multipush
|
||||
```js
|
||||
type:'multipush',
|
||||
matrix:[2,2], // [array] [number of columns, number of rows]
|
||||
on: 1, // [string|number|false] value sent when toggle is on (false to prevent sending )
|
||||
off:0, // [string|number|false] value sent when toggle is off (false to prevent sending )
|
||||
```
|
||||
*This creates a matrix of push buttons that respond to the same gesture. Each of these buttons will receive its parent's properties and the following (where X is the button's index in the row) :*
|
||||
```js
|
||||
id:PARENT_ID_X,
|
||||
label: X,
|
||||
path: PARENT_PATH/X
|
||||
```
|
||||
|
||||
### switch
|
||||
```js
|
||||
type:'switch',
|
||||
values: { // [object] of ("label":value) pairs
|
||||
"Value 1":1,
|
||||
"Value 2":2
|
||||
}
|
||||
```
|
||||
|
||||
### plot
|
||||
```js
|
||||
type:'plot',
|
||||
points:[], // [string|array]
|
||||
// string : a single widget id, whose multiple values will be displayed,
|
||||
// evenly spaced on the x-axis
|
||||
// array : an array of [x,y] coordinates, which can be numbers
|
||||
// or widget id strings, for example :
|
||||
// [[0,0],[0.5,"some_widget_id"],["some_other_id","another_id"]]
|
||||
range:{ // [object] minimum and maximum values for X and Y axis
|
||||
x:{"min":0,"max":1},
|
||||
y:{"min":0,"max":1}
|
||||
},
|
||||
logScaleX: false, // [bool] use logarithmic scale for X axis (log10)
|
||||
logScaleY: false // [bool] use logarithmic scale for y axis (log10)
|
||||
```
|
||||
|
||||
### plot
|
||||
```js
|
||||
type:'visualizer',
|
||||
curve:'', // [string] widget id (its value will be displayed)
|
||||
duration:1, // [number] window size in seconds
|
||||
range:{"min":0,"max":1}, // [object] minimum and maximum values the Y axis
|
||||
logScale: false, // [bool] use logarithmic scale for Y axis (log10)
|
||||
```
|
||||
- [Sliders](widgets/sliders.md)
|
||||
- [Buttons](widgets/buttons.md)
|
||||
- [Pads](widgets/pads.md)
|
||||
- [Matrices](widgets/matrices.md)
|
||||
- [Plots](widgets/plots.md)
|
||||
- [Containers](widgets/containers.md)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue