From 16a1b04be3b768325ef3cd8786dbe17693e5dba6 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Thu, 31 Mar 2016 14:35:29 +0200 Subject: [PATCH] change docs theme and continue the writing --- resources/docs/getting-started.md | 4 +- resources/docs/index.md | 2 +- resources/docs/user-guide/interface.md | 2 +- resources/docs/user-guide/session-file.md | 2 +- resources/docs/user-guide/widgets-generics.md | 14 +- .../user-guide/widgets-specifics/buttons.md | 2 +- .../widgets-specifics/containers.md | 2 +- .../user-guide/widgets-specifics/matrices.md | 2 +- .../docs/user-guide/widgets-specifics/pads.md | 4 +- .../user-guide/widgets-specifics/plots.md | 138 ++++++++++++++---- .../user-guide/widgets-specifics/sliders.md | 10 +- resources/mkdocs.yml | 4 +- 12 files changed, 136 insertions(+), 50 deletions(-) diff --git a/resources/docs/getting-started.md b/resources/docs/getting-started.md index a437c9dd..1b74c552 100644 --- a/resources/docs/getting-started.md +++ b/resources/docs/getting-started.md @@ -1,6 +1,6 @@ # Getting started - +---- ## Run from binaries @@ -36,6 +36,7 @@ Available themes: - noinput ``` +---- ## Run from sources Running the app from the sources slightly differs from using built binaries : instead of running a binary, we'll launch the app with npm. @@ -67,6 +68,7 @@ $ npm start [ -- options] # A double hyphen ("--") is used here to tell npm that the following options are to be given to the app. ``` +---- ## Build from sources **Requirements** diff --git a/resources/docs/index.md b/resources/docs/index.md index 88b5d2d3..36385765 100644 --- a/resources/docs/index.md +++ b/resources/docs/index.md @@ -24,7 +24,7 @@ Please note that : - themes ! -### License & credits +## License & credits Copyleft © Jean-Emmanuel @ [AMMD](http://ammd.net). This program is released under the GNU/GPL3 license. diff --git a/resources/docs/user-guide/interface.md b/resources/docs/user-guide/interface.md index 35983cd5..addeb772 100644 --- a/resources/docs/user-guide/interface.md +++ b/resources/docs/user-guide/interface.md @@ -1,4 +1,4 @@ -## User interface +# User interface ---- diff --git a/resources/docs/user-guide/session-file.md b/resources/docs/user-guide/session-file.md index 72d3af2c..526c1930 100644 --- a/resources/docs/user-guide/session-file.md +++ b/resources/docs/user-guide/session-file.md @@ -1,4 +1,4 @@ -## Session file +# Session file A valid session file is a javascript file that returns, when eval'd, an array of tab objects. It can be written as a javascript object : diff --git a/resources/docs/user-guide/widgets-generics.md b/resources/docs/user-guide/widgets-generics.md index e66a0494..c6cae848 100644 --- a/resources/docs/user-guide/widgets-generics.md +++ b/resources/docs/user-guide/widgets-generics.md @@ -10,7 +10,7 @@ Widget objects share a set of generic properties described below. Each widget ty - [Containers](widgets-specifics/containers.md) ---- -## Basics +### Basics #### `type` - type: `string` @@ -24,7 +24,7 @@ Widget objects share a set of generic properties described below. Each widget ty ---- -## Style +### Style #### `label` - type: `string|false` @@ -55,16 +55,16 @@ Widget objects share a set of generic properties described below. Each widget ty - usage: the `css` property can be used to override inherited [theming](theming.md) variables. Also, some widgets expose specific theming variables that allow a finer customization. Standard `css` properties can be applied to the widget's root element though this property. ---- -## OSC +### OSC -#### `precision` +##### `precision` - type: `integer` - default: `2` - usage: the `precision` property defines the number of decimals to display and to send. Set to `0` to send `integers` only. -#### `target` +##### `target` - type: `array` - default: `[]` - usage: @@ -72,12 +72,12 @@ Widget objects share a set of generic properties described below. Each widget ty - each element of the `array` must be a string formatted as follows : `"ip:port"` - multiple targets can be specified : `["ip1:port1","ip2:port2"]` -#### `path` +##### `path` - type: `string` - default: `/widgets_id` - usage: this is the `path` of the osc messages sent by the widget -#### `preArgs` +##### `preArgs` - type: `array` - default: `[]` - usage: diff --git a/resources/docs/user-guide/widgets-specifics/buttons.md b/resources/docs/user-guide/widgets-specifics/buttons.md index 071b56bf..97ac066b 100644 --- a/resources/docs/user-guide/widgets-specifics/buttons.md +++ b/resources/docs/user-guide/widgets-specifics/buttons.md @@ -1,4 +1,4 @@ -## Buttons +# Buttons Buttons are exactly what you think they are. diff --git a/resources/docs/user-guide/widgets-specifics/containers.md b/resources/docs/user-guide/widgets-specifics/containers.md index 131f183d..8d6a6d73 100644 --- a/resources/docs/user-guide/widgets-specifics/containers.md +++ b/resources/docs/user-guide/widgets-specifics/containers.md @@ -1,4 +1,4 @@ -## Containers +# Containers Containers can contain any widgets diff --git a/resources/docs/user-guide/widgets-specifics/matrices.md b/resources/docs/user-guide/widgets-specifics/matrices.md index f3f002e3..174815ca 100644 --- a/resources/docs/user-guide/widgets-specifics/matrices.md +++ b/resources/docs/user-guide/widgets-specifics/matrices.md @@ -1,4 +1,4 @@ -## Matrices +# Matrices Matrices are special containers that only contain one type of widget. All contained widgets will be traversed by single dragging gestures. diff --git a/resources/docs/user-guide/widgets-specifics/pads.md b/resources/docs/user-guide/widgets-specifics/pads.md index b1fcdcb1..ce3baa79 100644 --- a/resources/docs/user-guide/widgets-specifics/pads.md +++ b/resources/docs/user-guide/widgets-specifics/pads.md @@ -1,4 +1,4 @@ -## Pads +# Pads Pads are multidimensional widgets that output multiple values. @@ -21,7 +21,7 @@ Pads are multidimensional widgets that output multiple values. x:{"min":0,"max":1}, y:{"min":0,"max":1} }` -- usage: defines the `x` and `y` axis (no breakpoints, only `min` and `max`) +- usage: defines the `min` and `max` values for `x` and `y` axis #### `logScaleX` - type: `boolean` diff --git a/resources/docs/user-guide/widgets-specifics/plots.md b/resources/docs/user-guide/widgets-specifics/plots.md index 4f940cfa..551535bd 100644 --- a/resources/docs/user-guide/widgets-specifics/plots.md +++ b/resources/docs/user-guide/widgets-specifics/plots.md @@ -2,48 +2,132 @@ Plots are tools that display other widgets' state or incomming osc messages. They are not sensitive to mouse and touch interactions. -## led +## Led ```js -type:'led', -range:x:{"min":0,"max":1} // [object] minimum and maximum values for X and Y axis -logScale: false, // [bool] use logarithmic scale +{ + type:'led', + // etc +} ``` +#### `range` +- type: `object` +- default: `{"min":0,"max":1}` +- usage: defines the `min` and `max` value the led's intensity will be mapped to -## plot +#### `logScale` +- type: `boolean` +- default: `false` +- usage: set to true use logarithmic scaling + + + +## Plot The plot receives an array of [x,y] coordinates and draws them on a chart with linear or logarithmic interpolation. ```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) +{ + type:'plot', + // etc +} ``` -## visualizer +#### `points` +- type: `array|string` +- default: `[]` +- usage: + - as a `string`: a widget's `id` whose multiple values will be displayed on the `y` axis, evenly spaced on the `x` axis (only *[matrices](matrices.md)* and *[pads](pads.md)* will work) + - as an `array`: each element must be an `array` of `[x,y]` coordinates, where `x` and `y` can either be a: + - `number`: constant values + - `string`: a widget's `id` whose value will be used + +#### `range` +- type: `object` +- default: + `{ + x:{"min":0,"max":1}, + y:{"min":0,"max":1} + }` +- usage: defines the `min` and `max` values for `x` and `y` axis + +#### `logScaleX` +- type: `boolean` +- default: `false` +- usage: set to `true` to use logarithmic scale for the `x` axis (log10) + +#### `logScaleY` +- type: `boolean` +- default: `false` +- usage: set to `true` to use logarithmic scale for the `y` axis (log10) + +## Visualizer The visualizer displays the evolution in time of a received value (through osc) *or* another widget's value. ```js -type:'visualizer', -widgetId:'', // [string] widget id (its value will be displayed instead of the incoming osc) -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) +{ + type:'visualizer', + // etc +} ``` -## text +#### `widgetId` +- type: `object` +- default: `empty` +- usage: a widget's `id` whose value will be displayed (thus bypassing the incoming osc) + +#### `duration` +- type: `number` +- default: `1` +- usage: window size in seconds + +#### `range` +- type: `object` +- default: `{"min":0,"max":1}` +- usage: defines the `min` and `max` values for the `y` axis + +#### `logScale` +- type: `boolean` +- default: `false` +- usage: set to true use logarithmic scaling + + +## Text + +Text displays incoming values (via osc) as text + ```js -type:'text', -vertical:false, // [bool] +{ + type:'text', + // etc +} ``` + +#### `vertical` +- type: `boolean` +- default: `false` +- usage: set to true display vertically + + +## Meter + +Meter displays incoming numerical values (via osc) as a gauge level + +```js +{ + type:'meter', + // etc +} +``` + +#### `horizontal` +- type: `boolean` +- default: `false` +- usage: set to true to display the meter horizontally + +#### `range` +- see fader's [`range`](sliders/#fader) + +#### `logScale` +- see fader's [`logScale`](sliders/#fader) diff --git a/resources/docs/user-guide/widgets-specifics/sliders.md b/resources/docs/user-guide/widgets-specifics/sliders.md index 6cdfd44e..4e7c9365 100644 --- a/resources/docs/user-guide/widgets-specifics/sliders.md +++ b/resources/docs/user-guide/widgets-specifics/sliders.md @@ -1,4 +1,4 @@ -## Sliders +# Sliders Sliders are unidimensional widgets that output one value at a time. @@ -29,8 +29,8 @@ Sliders are unidimensional widgets that output one value at a time. - usage: set to true to hide the scale #### `range` -- type: `boolean` -- default: `object` +- type: `object` +- default: `{"min":0,"max":1}` - usage: `range` defines the breakpoints of the fader's scale - keys can be percentages and/or `min` / `max` - values can be numbers or object if a custom label is needed @@ -98,8 +98,8 @@ range: { - usage: set to true to hide the scale #### `range` -- type: `boolean` -- default: `object` +- type: `object` +- default: `{"min":0,"max":1}` - usage: `range` defines the breakpoints of the fader's scale - keys can be percentages and/or `min` / `max` - values can be numbers or object if a custom label is needed diff --git a/resources/mkdocs.yml b/resources/mkdocs.yml index 4144a7f0..7800af41 100644 --- a/resources/mkdocs.yml +++ b/resources/mkdocs.yml @@ -1,3 +1,3 @@ -site_name: OSC +site_name: Open Stage Control repo_url: https://github.com/jean-emmanuel/open-stage-control -theme: yeti +theme: cinder