docs: new site
This commit is contained in:
parent
43ccd7389d
commit
719a563feb
43 changed files with 1185 additions and 1899 deletions
|
|
@ -86,7 +86,7 @@
|
|||
"watch-client": "npm run build-client-js -- --watch",
|
||||
"watch-browser": "npm run build-client-js -- --watch",
|
||||
"watch-css": "nodemon --watch src/scss -e scss -x \"npm run build-css -- --reload\"",
|
||||
"deploy-docs": "node scripts/build-widgets-reference.js > resources/docs/widgets-reference.md && cd resources && mkdocs gh-deploy --clean && rm -rf site",
|
||||
"build-docs": "node scripts/build-widgets-reference.js > resources/docs/docs/widgets-reference.md && cd resources && mkdocs build --clean",
|
||||
"test": "eslint src && npm run build && node tests/test.js"
|
||||
},
|
||||
"engines": {
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
```bash
|
||||
$ sudo apt-get install python python-pip # python package manager
|
||||
$ sudo pip install mkdocs # docs site builder
|
||||
$ sudo pip install mkdocs-material # theme
|
||||
$ sudo pip install mkdocs-material # theme
|
||||
|
||||
$ mkdocs serve # make docs available on http://127.0.0.1:8000
|
||||
$ mkdocs build # build docs static site
|
||||
$ mkdocs gh-deploy --clean # deploy static site on gh-pages branch
|
||||
# or
|
||||
$ mkdocs build # build docs in site/
|
||||
```
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
osc.ammd.net
|
||||
|
|
@ -1,85 +0,0 @@
|
|||
|
||||
.md-header, .md-tabs {
|
||||
background:rgb(49, 63, 85)!important;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 76.1875em) {
|
||||
.md-header, .md-nav__title--site {
|
||||
background:rgb(49, 63, 85)!important;
|
||||
}
|
||||
}
|
||||
|
||||
.md-header-nav__button.md-logo {
|
||||
margin-right:-1rem!important;
|
||||
}
|
||||
|
||||
.md-nav__title--site, .md-header-nav__title {
|
||||
padding-top: 1px;
|
||||
text-transform: uppercase;
|
||||
font-size: 1.4rem!important;
|
||||
/* font-weight:500!important; */
|
||||
letter-spacing:1px;
|
||||
}
|
||||
|
||||
a.button {
|
||||
background:rgb(82, 168, 255);
|
||||
color:white!important;
|
||||
display: inline-block;
|
||||
padding: 5px 10px;
|
||||
border-radius: 3px;
|
||||
transition: opacity .2s;
|
||||
}
|
||||
|
||||
a.button:hover {
|
||||
opacity: 0.90;
|
||||
}
|
||||
|
||||
.align-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
article img {
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.dynamic-prop-icon {
|
||||
vertical-align:super;
|
||||
font-size: 75%;
|
||||
/* margin-left: -5px; */
|
||||
opacity: 0.65!important;
|
||||
}
|
||||
|
||||
.dynamic-prop-icon:after {
|
||||
content:"flash_on";
|
||||
font-family: Material Icons;
|
||||
font-style: normal;
|
||||
font-variant: normal;
|
||||
font-weight: 400;
|
||||
line-height: 1;
|
||||
text-transform: none;
|
||||
white-space: nowrap;
|
||||
speak: none;
|
||||
word-wrap: normal;
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
table code {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
table .thead2 {
|
||||
background: rgba(0,0,0,0.05);
|
||||
color: #555;
|
||||
text-transform: capitalize;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
table thead {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
table h4 {
|
||||
margin:0!important;
|
||||
font-size: 1.28rem!important;
|
||||
font-weight: normal!important;
|
||||
}
|
||||
1
resources/docs/docs.md
Symbolic link
1
resources/docs/docs.md
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
docs/getting-started.md
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
# License
|
||||
## License
|
||||
|
||||
Copyleft © Jean-Emmanuel Doucet @ [AMMD](http://ammd.net) 2018.
|
||||
This program is a free software released under the [GNU/GPL3](ttps://github.com/jean-emmanuel/open-stage-control/blob/master/LICENSE) license.
|
||||
This program is a free software released under the [GNU/GPL3](https://github.com/jean-emmanuel/open-stage-control/blob/master/LICENSE) license.
|
||||
|
||||
## Dependencies
|
||||
|
||||
Open Stage Control relies on several other free softwares, including [Node.js](https://nodejs.org/), [Electron](http://electron.atom.io/), [osc.js](https://github.com/colinbdclark/osc.js), [babel](http://babeljs.io/), [browserify](http://browserify.org), [exorcist](https://github.com/thlorenz/exorcist), [express](http://expressjs.com), [node-sass](https://github.com/sass/node-sass), [jQuery](http://jquery.com/), [jQuery-UI](http://jqueryui.com/), [Font Awesome](http://fontawesome.io/), [stacktracejs](stacktracejs.com), [mathjs](http://mathjs.org/). A comprehensive and up-to-date list can be found [here](https://github.com/jean-emmanuel/open-stage-control/network/dependencies).
|
||||
Open Stage Control relies on several other free softwares, including [Node.js](https://nodejs.org/), [Electron](http://electron.atom.io/), [osc.js](https://github.com/colinbdclark/osc.js), [babel](http://babeljs.io/), [browserify](http://browserify.org), [exorcist](https://github.com/thlorenz/exorcist), [express](http://expressjs.com), [node-sass](https://github.com/sass/node-sass), [jQuery](http://jquery.com/), [jQuery-UI](http://jqueryui.com/), [Font Awesome](http://fontawesome.io/), [stacktracejs](http://stacktracejs.com), [mathjs](http://mathjs.org/). A comprehensive and up-to-date list can be found [here](https://github.com/jean-emmanuel/open-stage-control/network/dependencies).
|
||||
|
||||
## Contributors
|
||||
|
||||
|
|
@ -14,7 +14,7 @@ https://github.com/jean-emmanuel/open-stage-control/graphs/contributors
|
|||
----
|
||||
|
||||
<div style="width:240px">
|
||||
[](http://browserstack.com/)
|
||||
[](http://browserstack.com/)
|
||||
</div>
|
||||
|
||||
BrowserStack supports Open Stage Control by providing a complete suite of browser emulators for Android, iOS and Windows.
|
||||
|
|
@ -45,7 +45,7 @@ By default, widget resizing / dragging snaps to a 10 pixel wide grid. Its width
|
|||
|
||||
## Properties
|
||||
|
||||
Selected widget's properties are displayed and can be modified in the sidepanel. The [widgets reference](widgets/widgets) section lists the available properties for each widget type. Property fields are all multiline (press `shift + enter` for new line).
|
||||
Selected widget's properties are displayed and can be modified in the sidepanel. The [widgets reference](/docs/widgets-reference) section lists the available properties for each widget type. Property fields are all multiline (press `shift + enter` for new line).
|
||||
|
||||
Properties are written in JSON, with some flexibility brought by the [JSON5](https://github.com/json5/json5) format. For example, doubles quotes around object keys are not mandatory. All input will be converted to standard JSON.
|
||||
|
||||
|
|
@ -3,6 +3,16 @@
|
|||
!!! tip ""
|
||||
Prebuilt binaries for Linux, Windows and OS X can be found on the [release](https://github.com/jean-emmanuel/open-stage-control/releases) page.
|
||||
|
||||
## Supported platforms
|
||||
|
||||
Open Stage Control is a *desktop* server application. It runs on all [platforms supported by Electron](https://electron.atom.io/docs/tutorial/supported-platforms/) or [Node](https://nodejs.org/en/) (in headless mode only, see [Running without Electron](#running-without-electron)). Any device running a compatible browser can connect to the server :
|
||||
|
||||
- Chrome/Chromium version `50` or later (Linux, MacOS, Windows, Android, etc)
|
||||
- iOS version `9.3` or later
|
||||
|
||||
!!! tip "Android / iOS native app ?"
|
||||
There is no native mobile application. The server's url can be added to the home screen to launch the interface in fullscreen.
|
||||
|
||||
|
||||
## Options
|
||||
|
||||
|
|
@ -26,9 +36,9 @@ Below are the available command-line options. Note that when running without any
|
|||
| `-d` | `--debug` | log received osc messages in the console |
|
||||
| `-n` | `--no-gui` | disable default gui |
|
||||
| `-g` | `--gui-only` | app server's url. If true, local port (--port) is used |
|
||||
| `-t` | `--theme` | theme name or path (mutliple values allowed) see [theming](extras/theming/) |
|
||||
| `-t` | `--theme` | theme name or path (mutliple values allowed) see [theming](/docs/theming/) |
|
||||
| `-e` | `--examples` | list examples instead of recent sessions |
|
||||
| | `--url-options` | [url options](extras/url-options) (opt=value pairs) |
|
||||
| | `--url-options` | [url options](/docs/url-options) (opt=value pairs) |
|
||||
| |`--disable-vsync` | disable gui's vertical synchronization |
|
||||
| |`--disable-gpu` | disable hardware acceleration |
|
||||
| |`--read-only` | disable session editing and session history changes |
|
||||
|
|
@ -23,7 +23,7 @@ When traversing gestures are set to "Smart", these will only affect widgets that
|
|||
|
||||
### Editor
|
||||
|
||||
See [Editing sessions](editing-sessions.md).
|
||||
See [Editing sessions](/docs/editing-sessions.md).
|
||||
|
||||
## Interactions
|
||||
|
||||
|
|
@ -1,7 +1,3 @@
|
|||
# Sending / Receiving MIDI
|
||||
|
||||
Open Stage Control can send and receive MIDI messages.
|
||||
|
||||
## Requirements
|
||||
|
||||
MIDI support requires additional software to be installed on the server's system:
|
||||
|
|
@ -33,7 +29,7 @@ In order to send MIDI messages, a widget must have at least one `target` formatt
|
|||
## Supported MIDI messages
|
||||
|
||||
!!! warning ""
|
||||
Define static argument values using the [`preArgs`](/widgets/widgets/#preargs) option in order to complete the respective MIDI message.
|
||||
Define static argument values using the [`preArgs`](/docs/widgets-reference/#preArgs) option in order to complete the respective MIDI message.
|
||||
|
||||
|
||||
|
||||
|
|
@ -91,6 +87,6 @@ PitchWheel event.
|
|||
System exclusive message.
|
||||
|
||||
- `msg`: hexadecimal sysex data string of the form `f0 ... f7`. You may include placeholders of the form `nn` which will be replaced by `v1, .., vN` respectively.
|
||||
- `v1, .., vN`: values encoded as hexadecimal data strings to include in `msg`. Most probably, you will need to sepcify a [custom module](/extras/custom-module/) in order to convert numeric widget values into the required hexadecimal format. In general, this conversion will be different for each manufacturer / device.
|
||||
- `v1, .., vN`: values encoded as hexadecimal data strings to include in `msg`. Most probably, you will need to sepcify a [custom module](/docs/custom-module/) in order to convert numeric widget values into the required hexadecimal format. In general, this conversion will be different for each manufacturer / device.
|
||||
|
||||
For a very simple example, refer to session 'sysex.json' found in the application's sub folder 'resources/app/examples/'. Please remember to adjust the button's `target` to the `device_name` used in your MIDI setup.
|
||||
|
|
@ -1,5 +1,3 @@
|
|||
# Theming
|
||||
|
||||
## Built-in themes
|
||||
|
||||
Themes can be loaded with the `--theme` option. Multiple themes can be combined. Built-in themes can be loaded using their name, custom theme files can be loaded using their path.
|
||||
|
|
@ -38,7 +36,7 @@ This will change the default text color to blue for all elements in panel widget
|
|||
|
||||
## Scss / autoreload
|
||||
|
||||
When running the app [from sources](../getting-started), custom themes can be written in scss:
|
||||
When running the app [from sources](/docs/getting-started), custom themes can be written in scss:
|
||||
|
||||
- the scss file must be located in `src/browser/scss/themes/`
|
||||
- run `npm run watch-css`
|
||||
|
|
@ -140,6 +140,7 @@
|
|||
| <h4 id="switch_horizontal">horizontal<a class="headerlink" href="#switch_horizontal" title="Permanent link">¶</a></h4> | `boolean` | <code>false</code> | Set to `true` to display values horizontally |
|
||||
| <h4 id="switch_showValues">showValues<a class="headerlink" href="#switch_showValues" title="Permanent link">¶</a></h4> | `boolean` | <code>false</code> | If values is an object, set to `true` to display both values and labels instead of labels only |
|
||||
| <h4 id="switch_values">values<a class="headerlink" href="#switch_values" title="Permanent link">¶</a></h4> | `array`\|<br/>`object` | <code>{<br/> "Value 1": 1,<br/> "Value 2": 2<br/>}</code> | `Array` of possible values to switch between : `[1,2,3]`<br/><br/>`Object` of `"label":value` pairs. Numeric labels must be prepended or appended with a white space (or any other non-numeric character) otherwise the order of the values won't be kept |
|
||||
| <h4 id="switch_traversing">traversing<a class="headerlink" href="#switch_traversing" title="Permanent link">¶</a></h4> | `boolean` | <code>true</code> | Set to `false` to disable traversing gestures |
|
||||
|
||||
### dropdown
|
||||
|
||||
|
|
@ -453,7 +454,7 @@
|
|||
| --- | --- | --- | --- |
|
||||
| <h4 class="thead2" id="keys_keys">keys<a class="headerlink" href="#keys_keys" title="Permanent link">¶</a></h4> ||||
|
||||
| <h4 id="keys_binding">binding<a class="headerlink" href="#keys_binding" title="Permanent link">¶</a></h4> | `string`\|<br/>`array` | <code>""</code> | Key combo `string` or `array` of strings (see <a href="https://github.com/RobertWHurst/KeyboardJS">KeyboardJS</a> documentation) |
|
||||
| <h4 id="keys_keydown">keydown<i class="dynamic-prop-icon" title="dynamic"></i><a class="headerlink" href="#keys_keydown" title="Permanent link">¶</a></h4> | `string` | <code>""</code> | This property is evaluated each time the key combo is pressed and defines the widget's own value. Formulas are given extras variables in this context:<br/>- `key`: pressed key name (usefull for handling multiple keys with a single keys widget)<br/>- `ctrl`: control key state<br/>- `alt`: alt key state<br/>- `shift`: shift key state<br/>- `super`: command/windows key state |
|
||||
| <h4 id="keys_keydown">keydown<i class="dynamic-prop-icon" title="dynamic"></i><a class="headerlink" href="#keys_keydown" title="Permanent link">¶</a></h4> | `string` | <code>""</code> | This property is evaluated each time the key combo is pressed and defines the widget's own value. Formulas are given extras variables in this context:<br/>- `key`: pressed key name (usefull for handling multiple keys with a single keys widget, lowercased when referencing a character key)<br/>- `code`: pressed key code name (<a href="https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code#Code_values" target="_blank">full list</a>)<br/>- `ctrl`: control key state<br/>- `alt`: alt key state<br/>- `shift`: shift key state<br/>- `super`: command/windows key state |
|
||||
| <h4 id="keys_keyup">keyup<i class="dynamic-prop-icon" title="dynamic"></i><a class="headerlink" href="#keys_keyup" title="Permanent link">¶</a></h4> | `string` | <code>""</code> | Same as `keydown`, but evaluated when releasing the key combo |
|
||||
| <h4 id="keys_repeat">repeat<i class="dynamic-prop-icon" title="dynamic"></i><a class="headerlink" href="#keys_repeat" title="Permanent link">¶</a></h4> | `boolean` | <code>true</code> | Set to `false` to prevent keydown repeats when holding the key combo pressed |
|
||||
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
# Property maths
|
||||
|
||||
The following syntax allow writing mathematical formulas in widgets' properties:
|
||||
|
||||
```
|
||||
#{ FORMULA }
|
||||
```
|
||||
|
||||
Where FORMULA is a valid [MathJS](http://mathjs.org/docs/expressions/syntax.html) expression:
|
||||
|
||||
- [syntax documentation](http://mathjs.org/docs/expressions/syntax.html)
|
||||
- [available functions](http://mathjs.org/docs/reference/functions.html)
|
||||
- [available constants](http://mathjs.org/docs/reference/constants.html)
|
||||
- formulas can be [multiline](http://mathjs.org/docs/expressions/syntax.html#multiline-expressions)
|
||||
- property inheritance calls (`@{...}`) are always resolved before formulas
|
||||
- arrays / matrices indexes are **zero-based** (ie `["a","b"][0]` returns `"a"`)
|
||||
- strings can be multiline when enclosed in backticks (``` ` ` ```)
|
||||
- inner closing brackets (`}`) must be escaped with a backslash (`\}`)
|
||||
|
||||
Additionnal functions:
|
||||
|
||||
- `unpack(x)`: remove an array's brackets (`unpack([1,2])` returns `"1, 2"`)
|
||||
- `pad(x, padding)`: add leading zeros if the length the integer part of `x` is smaller than `padding` (`pad(1,2)` returns `"01"`)
|
||||
- `length(x)`: returns the length of an array or string
|
||||
- `values(x)`: returns an array of a given object's own property values
|
||||
- `keys(x)`: returns an array of a given object's own property names
|
||||
- `timestamp()`: returns the number of milliseconds elapsed since January 1, 1970
|
||||
|
||||
!!! tip ""
|
||||
A single widget property can contain multiple formulas. Variables and functions declared in a formula are available to subsequent formulas in the same property definition.
|
||||
1
resources/docs/img/logo_discourse.png
Symbolic link
1
resources/docs/img/logo_discourse.png
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../images/logo_discourse.png
|
||||
|
|
@ -1,61 +1 @@
|
|||
|
||||
|
||||
# <img style="margin:0 auto;display:inline-block;width:60px;float:left;margin-right:20px;margin-top:-7px;" src="img/logo.svg"/> Open Stage Control
|
||||
|
||||
*Libre and modular OSC / MIDI controller*
|
||||
|
||||
Open Stage Control is a desktop OSC bi-directional control surface application. It's built on web technologies and run as an [Electron](http://electron.atom.io/) web server that accepts any number of clients.
|
||||
|
||||
<a class="button" href="http://demo.osc.ammd.net">Try the online demo (Chrome 50+ required)</a>
|
||||
|
||||
<a class="button" href="https://github.com/jean-emmanuel/open-stage-control/releases">Download the latest release</a>
|
||||
|
||||
|
||||

|
||||
|
||||
## Supported platforms
|
||||
|
||||
The server can run on all [platforms supported by Electron](https://electron.atom.io/docs/tutorial/supported-platforms/) or [Node](https://nodejs.org/en/) (in headless mode only, see [Running without Electron](getting-started/#running-without-electron)). Clients just need to connect to the server with a compatible browser :
|
||||
|
||||
- any system running Chrome/Chromium version `50` or later (Linux, MacOS, Windows, Android, etc)
|
||||
- iOS version `9.3` or later
|
||||
|
||||
Firefox is *not* supported.
|
||||
|
||||
## Is there an Android / iOS app ?
|
||||
|
||||
No, Open Stage Control is a *desktop* server app. Mobile devices can open the app by connecting to the server using Chrome.
|
||||
|
||||
!!! tip "Add to home screen"
|
||||
Once connected, mobile devices can add the server's url to the home screen and launch it from there directly.
|
||||
|
||||
|
||||
## Need help ? Found a bug ?
|
||||
|
||||
Head over the [issue tracker](https://github.com/jean-emmanuel/open-stage-control/issues) :)
|
||||
|
||||
## Free what ?
|
||||
|
||||
Open Stage Control is a [free software](https://www.fsf.org/), as in *gratis* and — most importantly — **libre**. It always will be. If you want to support the project financially, consider using liberapay or [flattr](https://flattr.com/@jean-emmanuel) :
|
||||
|
||||
<script src="https://liberapay.com/jean-emmanuel/widgets/button.js"></script>
|
||||
<noscript><a href="https://liberapay.com/jean-emmanuel/donate"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></noscript>
|
||||
|
||||
----
|
||||
|
||||
## Table of contents
|
||||
|
||||
- [Getting started](getting-started)
|
||||
- [User interface](interface)
|
||||
- [Editing sessions](editing-sessions)
|
||||
- [Widgets reference](widgets-reference)
|
||||
- Extras:
|
||||
- [Advanced property syntax](extras/advanced-property-syntax)
|
||||
- [CSS Tips](extras/css-tips)
|
||||
- [Theming](extras/theming)
|
||||
- [URL options](extras/url-options)
|
||||
- [Remote control](extras/remote-control)
|
||||
- [Custom module](extras/custom-module)
|
||||
- [Midi](extras/midi)
|
||||
- [Examples](examples)
|
||||
- [Credits](credits)
|
||||

|
||||
|
|
|
|||
|
|
@ -1,109 +0,0 @@
|
|||
# Buttons
|
||||
|
||||
Buttons are exactly what you think they are.
|
||||
|
||||
|
||||
|
||||
## Toggle
|
||||
```js
|
||||
{
|
||||
type:'toggle',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `doubleTap`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to make the button require a double tap to be toggled instead of a single tap
|
||||
|
||||
### `led`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to display the toggle's state with a led
|
||||
|
||||
### `on`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `string|number|object`
|
||||
- default: `1`
|
||||
- usage: defines which value is sent on `on` position
|
||||
- set to `null` to send send no argument in the osc message
|
||||
- can be an `object` if the type needs to be specified (see [preArgs](./widgets.md#preargs))
|
||||
|
||||
### `off`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `string|number|object`
|
||||
- default: `0`
|
||||
- usage: defines which value is sent on `off` position
|
||||
- set to `null` to send send no argument in the osc message
|
||||
- can be an `object` if the type needs to be specified (see [preArgs](./widgets.md#preargs))
|
||||
|
||||
|
||||
|
||||
|
||||
## Push
|
||||
```js
|
||||
{
|
||||
type:'push',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `on`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `string|number|object`
|
||||
- default: `1`
|
||||
- usage: defines which value is sent when pushing the button
|
||||
- set to `null` to send send no argument in the osc message
|
||||
- can be an `object` if the type needs to be specified (see [preArgs](./widgets.md#preargs))
|
||||
|
||||
### `off`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `string|number|object`
|
||||
- default: `0`
|
||||
- usage: defines which value is sent when releasing the button
|
||||
- set to `null` to send send no argument in the osc message
|
||||
- can be an `object` if the type needs to be specified (see [preArgs](./widgets.md#preargs))
|
||||
|
||||
### `norelease`
|
||||
- type: `bool`
|
||||
- default: `false`
|
||||
- usage: set to true to prevent sending any osc message when releasing the button
|
||||
|
||||
Setting the `push`'s value externally (via osc) will toggle it's inner light.
|
||||
|
||||
|
||||
|
||||
|
||||
## Switch
|
||||
|
||||
```js
|
||||
{
|
||||
type:'switch',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
### `values`
|
||||
- type: `array|object`
|
||||
- default: `{"Value 1":1,"Value 2":2}`
|
||||
- usage:
|
||||
- `array` of possible values to switch between : `[1,2,3]`
|
||||
- `object` of `"label":value` pairs. Numeric labels must be prepended or appended with a white space (or any other non-numeric character) otherwise the order of the values won't be kept.
|
||||
|
||||
### `showValues`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: if `values` is an `object`, set to `true` to display both values and labels instead of labels only
|
||||
|
||||
|
||||
## Dropdown
|
||||
```js
|
||||
{
|
||||
type:'dropdown',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `values`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `array|object`
|
||||
- default: `{"Value 1":1,"Value 2":2}`
|
||||
- usage:
|
||||
- `array` of possible values to switch between : `[1,2,3]`
|
||||
- `object` of `"label":value` pairs. Numeric labels must be prepended or appended with a white space (or any other non-numeric character) otherwise the order of the values won't be kept.
|
||||
- an empty option will always be prepended to `values` (sends an osc message without any value); it can be hidden by adding `option:first-child{display:none}` to the widget's `css`
|
||||
|
|
@ -1,166 +0,0 @@
|
|||
# Containers
|
||||
|
||||
Containers can contain any widgets.
|
||||
|
||||
|
||||
## Panel
|
||||
|
||||
Panels can contains tabs or widgets. These can be absolutely positioned and can overflow their parent's size (which will then display scrollbars). When a panel contains tabs, it can send and receive its active tab's index through osc.
|
||||
|
||||
|
||||
```js
|
||||
{
|
||||
type:'panel',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `scroll`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to `false` to disable scrollbars
|
||||
|
||||
### `border`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: by default, widgets in panels/strip have their border disabled, except for panels and strips. Set to `false` to apply this rule to the panel too.
|
||||
|
||||
### `widgets`
|
||||
- type: `array`
|
||||
- default: `[]`
|
||||
- usage: each element of the `array` must be a widget `object`. A panel cannot contain widgets and tabs simultaneously.
|
||||
|
||||
### `tabs`
|
||||
- type: `array`
|
||||
- default: `[]`
|
||||
- usage: each element of the `array` must be a tab `object`. A panel cannot contain widgets and tabs simultaneously.
|
||||
|
||||
|
||||
### `variables`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `*`
|
||||
- default: `@{parent.variables}`
|
||||
- usage: defines one or more arbitrary variables that can be inherited by children widgets.
|
||||
- examples:
|
||||
- `1` (`@{parent.variables}` will return `1`)
|
||||
- `{a: [1, 2], b: 2}` (`@{parent.variables.a}` will return `[1, 2]`)
|
||||
- `[1, 2]` (`@{parent.variables.0}` will return `1`)
|
||||
- `@{parent.variables}` useful when nesting containers
|
||||
|
||||
|
||||
### `layout`
|
||||
- type: `string`
|
||||
- default: `''`
|
||||
- usage: `layout` must be a valid [Visual Format Language](https://developer.apple.com/library/content/documentation/UserExperience/Conceptual/AutolayoutPG/VisualFormatLanguage.html) expression. It accepts the [Extended Visual Format Language](https://github.com/IjzerenHein/autolayout.js#extended-visual-format-language-evfl) as well. Widgets are targeted using their `id` or their index prefixed with a `$` (`$0, $1, etc`), the latter method being incompatible with the [range spread operator](https://github.com/IjzerenHein/autolayout.js#view-ranges-spread-operator). Expressions can be tested and debugged with the online [Visual Format Editor](https://rawgit.com/IjzerenHein/visualformat-editor/master/dist/index.html).
|
||||
- note: this only applies when the panel contains widgets, not tabs
|
||||
|
||||
### `spacing`
|
||||
- type: `integer|array`
|
||||
- default: `0`
|
||||
- usage: spacing size used in `layout` expression, can be set as a `[vertical,horizontal]` array.
|
||||
- note: this only applies when the panel contains widgets, not tabs
|
||||
|
||||
### `css`
|
||||
```css
|
||||
--nav-height: number[rem|%];
|
||||
```
|
||||
|
||||
## Strip
|
||||
|
||||
Unidirectional panel with stretching capability. By default, children widgets that don't have an explicit `width`/`height` set will be shrinked to respect the sizes specified by others. Adding `flex:1;` to a children's `css` will give it the ability the fill the remaining space. Multiple children can have a `flex:x;` css property (`x` will ponderate their expansion).
|
||||
|
||||
```js
|
||||
{
|
||||
type:'strip',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `horizontal`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to display widgets horizontally
|
||||
|
||||
### `stretch`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to stretch widgets evenly
|
||||
|
||||
### `spacing`
|
||||
- type: `integer|percentage`
|
||||
- default: `0`
|
||||
- usage: adds space between widgets. Percents are always relative to the strips width.
|
||||
|
||||
### `border`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: by default, widgets in panels/strip have their border disabled, except for panels and strips. Set to `false` to apply this rule to the strip too.
|
||||
|
||||
### `widgets`
|
||||
- type: `array`
|
||||
- default: `[]`
|
||||
- usage: each element of the `array` must be a widget `object`
|
||||
|
||||
|
||||
|
||||
|
||||
## Modal
|
||||
|
||||
Modals are buttons that turn into a centered popup panels when enabled. They can only contain widgets. They can send and receive their state via osc (1 to enable, 0 to disable).
|
||||
|
||||
```js
|
||||
{
|
||||
type:'modal',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `doubleTap`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to make the modal require a double tap to open instead of a single tap
|
||||
|
||||
### `popupWidth` / `popupHeight`
|
||||
- type: `number|percentage`
|
||||
- default: `100%`
|
||||
- usage: sets the modal's size once opened
|
||||
|
||||
### `popupLeft` / `popupTop`
|
||||
- type: `number|percentage`
|
||||
- default: `auto`
|
||||
- usage: sets the modal's position once opened (centered by default)
|
||||
|
||||
|
||||
### `popupLabel`
|
||||
- type: `string`
|
||||
- default: `empty`
|
||||
- usage: alternative label for the popup
|
||||
|
||||
### `options`
|
||||
- see panel's [`options`](#panel)
|
||||
|
||||
|
||||
## Clone
|
||||
|
||||
```js
|
||||
{
|
||||
type:'clone',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `widgetId`
|
||||
- type: `string`
|
||||
- default: `empty`
|
||||
- usage: `id` of the widget to clone
|
||||
|
||||
### `props`
|
||||
- type: `object`
|
||||
- default: `{}`
|
||||
- usage: cloned widget's properties to override
|
||||
- example:
|
||||
```json
|
||||
{
|
||||
"variables": { "n": 2 },
|
||||
"color": "orange"
|
||||
}
|
||||
```
|
||||
|
|
@ -1,156 +0,0 @@
|
|||
# inputs
|
||||
|
||||
## Input
|
||||
|
||||
|
||||
```js
|
||||
{
|
||||
type:'input',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `editable`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to `false` to make the input non-editable
|
||||
|
||||
### `horizontal`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to display the input horizontally
|
||||
|
||||
### `align`
|
||||
- type: `string`
|
||||
- default: `''`
|
||||
- usage: set to `left` or `right` to change text alignment (otherwise `center`)
|
||||
|
||||
### `unit`
|
||||
- type: `string`
|
||||
- default: `empty`
|
||||
- usage: `unit` will be appended to the displayed widget's value (it doesn't affect osc messages)
|
||||
|
||||
|
||||
## Keys
|
||||
|
||||
|
||||
```js
|
||||
{
|
||||
type:'keys',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `binding`
|
||||
- type: `string|array`
|
||||
- default: `''`
|
||||
- usage: [keyboardjs](https://github.com/RobertWHurst/KeyboardJS) key combo string or array of strings.
|
||||
|
||||
### `keydown`
|
||||
- type: `string`
|
||||
- default: `''`
|
||||
- usage: this property is evaluated each time the key combo is pressed. [Formulas](../extras/advanced-property-syntax/#formulas) are given extras variables in this context:
|
||||
- `key`: pressed key name (usefull for handling multiple keys with a single `keys` widget)
|
||||
- `ctrl`: control key state
|
||||
- `alt`: alt key state
|
||||
- `shift`: shift key state
|
||||
- `super`: command/windows key state
|
||||
|
||||
### `keyup`
|
||||
- type: `string`
|
||||
- default: `''`
|
||||
- usage: same as `keydown`, but evaluated when releasing the key combo.
|
||||
|
||||
### `repeat`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to `false` to prevent `keydown` repeats when holding the key combo pressed.
|
||||
|
||||
|
||||
## Script
|
||||
|
||||
|
||||
```js
|
||||
{
|
||||
type:'script',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `condition`
|
||||
- type: `string`
|
||||
- default: `''`
|
||||
- usage: when the widget receives a value, if this property return a falsy value, the `script` property won't be evaluated. If it's non-falsy, it will be evaluated normally. [Formulas](../extras/advanced-property-syntax/#formulas) are given 1 extra variable in this context:
|
||||
- `value`: the value received by the widget
|
||||
|
||||
### `script`
|
||||
- type: `string`
|
||||
- default: `''`
|
||||
- usage: this property is evaluated each time the widget receives a value if `condition` is non-falsy. [Formulas](../extras/advanced-property-syntax/#formulas) are given extras variables in this context:
|
||||
- `value`: the value received by the widget
|
||||
- `send`: `function` for sending osc messages
|
||||
- `set`: `function` for setting a widget's value
|
||||
|
||||
#### `send(target, address, arg1, arg2, ...)`
|
||||
- `target` (`string` or `array` or `false`): one or several osc targets. Default targets (`--send` and the script's `target` property) are ignored unless `target` is `false`
|
||||
- `address` (`string`): a valid osc address
|
||||
- `arg`: one or several osc arguments to be sent. The script's `preArgs` property is ignored
|
||||
|
||||
|
||||
#### `set(id, value)`
|
||||
- `id` (`string`): a widget's id
|
||||
- `value`: the widget's new value
|
||||
|
||||
|
||||
## Gyroscope
|
||||
|
||||
|
||||
```js
|
||||
{
|
||||
type:'gyroscope',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
The gyroscope's value is an object containing multiple values, which can be used by other widgets via the [property maths syntax](../extras/advanced-property-syntax.md) :
|
||||
|
||||
```
|
||||
// value.do.alpha ( deviceorientation event alpha value )
|
||||
// value.do.beta ( deviceorientation event beta value )
|
||||
// value.do.gamma ( deviceorientation event gamma value )
|
||||
// value.do.absolute ( deviceorientation event absolute value )
|
||||
|
||||
// value.dm.x ( devicemotion event acceleration x value )
|
||||
// value.dm.y ( devicemotion event acceleration y value )
|
||||
// value.dm.z ( devicemotion event acceleration z value )
|
||||
|
||||
// value.dm.gx ( devicemotion event accelerationIncludingGravity x value )
|
||||
// value.dm.gy ( devicemotion event accelerationIncludingGravity y value )
|
||||
// value.dm.gz ( devicemotion event accelerationIncludingGravity z value )
|
||||
|
||||
// value.dm.alpha ( devicemotion event rotationRate alpha value )
|
||||
// value.dm.beta ( devicemotion event rotationRate beta value )
|
||||
// value.dm.gamma ( devicemotion event rotationRate gamma value )
|
||||
|
||||
```
|
||||
|
||||
|
||||
### `frequency`
|
||||
- type: `number`
|
||||
- default: `30`
|
||||
- usage: update frequency in Hz (value updates per seconds)
|
||||
|
||||
### `normalize`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: normalize gravity related values
|
||||
|
||||
### `compass`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to return the orientation values with respect to the actual north direction of the world instead of the head direction of the device
|
||||
|
||||
### `screenAdjusted`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to return screen adjusted values
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
# Maths
|
||||
|
||||
Maths do the maths !
|
||||
|
||||
## Formula
|
||||
|
||||
!!! warning "Deprecated"
|
||||
Since `v0.24.0`, any widget property can be defined using math expressions. Formula widget is deprecated and will be removed in a future release.
|
||||
|
||||
Formula evaluates mathematical expressions over other widgets' values each one of these widgets changes.
|
||||
|
||||
```js
|
||||
{
|
||||
type:'formula',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### `formula`
|
||||
- type: `string`
|
||||
- default: `''`
|
||||
- usage: a [mathjs](http://mathjs.org/docs/expressions/syntax.html) expression in which
|
||||
- `${id}` will be replaced the `id`'s value
|
||||
- example: `${fader_1} * 2 + ${fader_2}`
|
||||
- **important note**: contrary to what is stated in *mathjs*' documentation, **matrix indexes are zero-based** here
|
||||
|
||||
### `condition`
|
||||
- type: `string`
|
||||
- default: `''`
|
||||
- usage:
|
||||
- a [mathjs](http://mathjs.org/docs/expressions/syntax.html) comparison expression that bypasses widget's osc sending when returning`false`
|
||||
- example: `${fader_1} > 0.5`
|
||||
|
||||
### `unit`
|
||||
- type: `string`
|
||||
- default: `empty`
|
||||
- usage: `unit` will be appended to the displayed widget's value (it doesn't affect osc messages)
|
||||
|
||||
### `split`
|
||||
- type: `object`
|
||||
- default: `[]`
|
||||
- usage: specify a different `address` for each item of the widget's value : `['/a', '/b']`
|
||||
- note: only use this is the formula return an `array`
|
||||
|
|
@ -1,236 +0,0 @@
|
|||
# Matrices
|
||||
|
||||
Matrices are special containers that only contain one type of widget. All contained widgets will be traversed by single dragging gestures.
|
||||
|
||||
!!! note ""
|
||||
When using the [property inheritance syntax](../extras/advanced-property-syntax) to retreive a matrix' value, the returned value is an array containing all it's children's values.
|
||||
|
||||
## Matrix
|
||||
|
||||
Creates grid of widgets of a given type
|
||||
|
||||
```js
|
||||
{
|
||||
type:'matrix',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `widgetType`
|
||||
- type: `string`
|
||||
- default: `toggle`
|
||||
- usage: set the type of the widgets in the matrix
|
||||
|
||||
|
||||
### `matrix`
|
||||
- type: `array`
|
||||
- default: `[2,2]`
|
||||
- usage: defines the number of columns and and rows in the matrix
|
||||
|
||||
### `start`
|
||||
- type: `integer`
|
||||
- default: `0`
|
||||
- usage: first widget's index
|
||||
|
||||
### `traversing`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to false to disable traversing gestures
|
||||
|
||||
### `props`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `object`
|
||||
- default: `{}`
|
||||
- usage: define a set of property to override the widgets' defaults. [Formulas](../extras/advanced-property-syntax/#formulas) in this field are resolved with an extra variable `$` representing each widget's index
|
||||
|
||||
|
||||
|
||||
|
||||
## Multifader
|
||||
|
||||
Multifader creates a row of vertical faders that respond to the same gestures.
|
||||
|
||||
```js
|
||||
{
|
||||
type:'multifader',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `strips`
|
||||
- type: `integer`
|
||||
- default: `2`
|
||||
- usage: number of faders in the row, each fader will inherit its parent's properties and the following ones (where `i` is the fader's index in the row)
|
||||
- `id`: same as the widget's with `/i` appended to it
|
||||
- `label`: `i`
|
||||
- `address`: see `split`
|
||||
|
||||
### `start`
|
||||
- type: `integer`
|
||||
- default: `0`
|
||||
- usage: first faders's index
|
||||
|
||||
### `traversing`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to false to disable traversing gestures
|
||||
|
||||
### `borders`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to false to disable widgets borders
|
||||
|
||||
|
||||
### `split`
|
||||
- type: `boolean|string`
|
||||
- default: `false`
|
||||
- usage:
|
||||
- `true`: the widget's index will be appended to the matrice's osc `address`
|
||||
- `false`: it will be prepended to the widget's `preArgs`
|
||||
- `string`: will be used to define the widgets' addresses, replacing dollar signs (`$`) with their respective index (to insert the actual dollar sign, it must be escaped with a backslash (`\$`)).
|
||||
|
||||
### `options`
|
||||
- see fader's [`options`](sliders/#fader)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Multitoggle
|
||||
```js
|
||||
{
|
||||
type:'multitoggle',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `matrix`
|
||||
- type: `array`
|
||||
- default: `[2,2]`
|
||||
- usage: defines the number of columns and and rows. Each cell will contain a toggle button that will inherit its parent's properties and the following ones (where `i` is the fader's index in the row)
|
||||
- `id`: same as the widget's with `/i` appended to it
|
||||
- `label`: `i`
|
||||
- `address`: see `split`
|
||||
|
||||
### `start`
|
||||
- type: `integer`
|
||||
- default: `0`
|
||||
- usage: first toggle's index
|
||||
|
||||
### `spacing`
|
||||
- type: `integer`
|
||||
- default: `0`
|
||||
- usage: adds space between widgets
|
||||
|
||||
### `traversing`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to false to disable traversing gestures
|
||||
|
||||
### `split`
|
||||
- type: `boolean|string`
|
||||
- default: `false`
|
||||
- usage:
|
||||
- `true`: the widget's index will be appended to the matrice's osc `address`
|
||||
- `false`: it will be prepended to the widget's `preArgs`
|
||||
- `string`: will be used to define the widgets' addresses, replacing dollar signs (`$`) with their respective index (to insert the actual dollar sign, it must be escaped with a backslash (`\$`)).
|
||||
|
||||
|
||||
### `options`
|
||||
- see toggle's [`options`](buttons/#toggle)
|
||||
|
||||
|
||||
|
||||
## Multipush
|
||||
```js
|
||||
{
|
||||
type:'multipush',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `matrix`
|
||||
- type: `array`
|
||||
- default: `[2,2]`
|
||||
- usage: defines the number of columns and and rows. Each cell will contain a push button that will inherit its parent's properties and the following ones (where `i` is the fader's index in the row)
|
||||
- `id`: same as the widget's with `/i` appended to it
|
||||
- `label`: `i`
|
||||
- `address`: see `split`
|
||||
|
||||
### `start`
|
||||
- type: `integer`
|
||||
- default: `0`
|
||||
- usage: first push's index
|
||||
|
||||
### `spacing`
|
||||
- type: `integer`
|
||||
- default: `0`
|
||||
- usage: adds space between widgets
|
||||
|
||||
### `traversing`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to false to disable traversing gestures
|
||||
|
||||
### `split`
|
||||
- type: `boolean|string`
|
||||
- default: `false`
|
||||
- usage:
|
||||
- `true`: the widget's index will be appended to the matrice's osc `address`
|
||||
- `false`: it will be prepended to the widget's `preArgs`
|
||||
- `string`: will be used to define the widgets' addresses, replacing dollar signs (`$`) with their respective index (to insert the actual dollar sign, it must be escaped with a backslash (`\$`)).
|
||||
|
||||
### `options`
|
||||
- see push's [`options`](buttons/#push)
|
||||
|
||||
|
||||
|
||||
## Keyboard
|
||||
|
||||
This one works pretty much like the multipush, excepts it looks like a piano keyboard.
|
||||
|
||||
```js
|
||||
{
|
||||
type:'keyboard',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `keys`
|
||||
- type: `integer`
|
||||
- default: `24`
|
||||
- usage: defines the number keys
|
||||
|
||||
### `start`
|
||||
- type: `integer`
|
||||
- default: `60`
|
||||
- usage: MIDI note number to start with (default is C4)
|
||||
|
||||
!!! note ""
|
||||
Standard keyboards settings are:
|
||||
25 keys - start 48
|
||||
49 keys - start 36
|
||||
61 keys - start 36
|
||||
88 keys - start 21
|
||||
|
||||
|
||||
### `traversing`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to false to disable traversing gestures
|
||||
|
||||
### `split`
|
||||
- type: `boolean|string`
|
||||
- default: `false`
|
||||
- usage:
|
||||
- `true`: the widget's index will be appended to the matrice's osc `address`
|
||||
- `false`: it will be prepended to the widget's `preArgs`
|
||||
- `string`: will be used to define the widgets' addresses, replacing dollar signs (`$`) with their respective index (to insert the actual dollar sign, it must be escaped with a backslash (`\$`)).
|
||||
|
||||
### `options`
|
||||
- see push's [`options`](buttons/#push)
|
||||
|
||||
### `css`
|
||||
```css
|
||||
--color-white:color; /* white keys color */
|
||||
--color-black:color; /* black keys color */
|
||||
```
|
||||
|
|
@ -1,163 +0,0 @@
|
|||
# Pads
|
||||
|
||||
Pads are multidimensional widgets that output multiple values.
|
||||
|
||||
|
||||
|
||||
## XY
|
||||
|
||||
```js
|
||||
{
|
||||
type:'xy',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `input`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to `false` to hide the built-in input
|
||||
|
||||
### `rangeX`
|
||||
- type: `object`
|
||||
- default:
|
||||
`{"min":0,"max":1}`
|
||||
- usage: defines the `min` and `max` values for the `x` axis. Same as fader's [`range`](sliders/#fader)
|
||||
|
||||
### `rangeY`
|
||||
- type: `object`
|
||||
- default:
|
||||
`{"min":0,"max":1}`
|
||||
- usage: defines the `min` and `max` values for the `y` axis. Same as fader's [`range`](sliders/#fader)
|
||||
|
||||
|
||||
### `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)
|
||||
|
||||
### `snap`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: by default, dragging the widget will modify it's value starting from its last value. Setting this to `true` will make it snap directly to the mouse/touch position.
|
||||
|
||||
### `spring`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: when set to `true`, the widget will go back to its `default` value when released.
|
||||
|
||||
### `doubleTap`
|
||||
- type: `boolean|string`
|
||||
- default: `false`
|
||||
- usage: set to `true` to make the fader reset to its `default` value when receiving a double tap. `doubleTap` can also be an osc address, which case the widget will just send an osc message (`/<doubleTap> <preArgs>`),
|
||||
|
||||
|
||||
### `split`
|
||||
- type: `boolean|object`
|
||||
- default: `false`
|
||||
- usage:
|
||||
- set to `true` to send separate osc messages for `x` and `y` axis. The `address` will be the same as the widget's with `/x` or `/y` appended to it
|
||||
- can be set as an object to specify a different `address` : `['/osc_address_x', '/osc_address_y']`
|
||||
- note: the widget will only respond to its original osc address, not to the splitted version
|
||||
|
||||
|
||||
|
||||
## MultiXy
|
||||
|
||||
```js
|
||||
{
|
||||
type:'multixy',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `points`
|
||||
- type: `integer|array`
|
||||
- default: `2`
|
||||
- usage: defines the number of points on the pad. Can be an `array` of `strings` that will be used as labels for the points (ex: `['A', 'B']`)
|
||||
|
||||
### `pointSize`
|
||||
- type: `integer`
|
||||
- default: `15`
|
||||
- usage: defines the points's size
|
||||
|
||||
### `rangeX`
|
||||
- type: `object`
|
||||
- default:
|
||||
`{"min":0,"max":1}`
|
||||
- usage: defines the `min` and `max` values for the `x` axis. Same as fader's [`range`](sliders/#fader)
|
||||
|
||||
### `rangeY`
|
||||
- type: `object`
|
||||
- default:
|
||||
`{"min":0,"max":1}`
|
||||
- usage: defines the `min` and `max` values for the `y` axis. Same as fader's [`range`](sliders/#fader)
|
||||
|
||||
|
||||
### `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)
|
||||
|
||||
### `split`
|
||||
- type: `boolean|object`
|
||||
- default: `false`
|
||||
- usage:
|
||||
- set to `true` to send separate osc messages for each point's `x` and `y` axis. The `address` will be the same as the widget's with `/N/x` or `/N/y` appended to it, where `N` is the point's id (or the point's label if `points` is an `array`).
|
||||
- can be set as an object to specify a different `address` : `['/0/x', '/0/y', '/1/x', '/2/y']`
|
||||
- note: the widget will only respond to its original osc address, not to the splitted version
|
||||
|
||||
### `snap`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: by default, the points are dragged from their initial position; if set to `true`, touching anywhere on the widget's surface will make them snap to the touching coordinates (one per touch).
|
||||
|
||||
|
||||
|
||||
## RGB
|
||||
|
||||
RGB is a variant of XY, it outputs rgb values between 0 and 255.
|
||||
|
||||
|
||||
```js
|
||||
{
|
||||
type:'rgb',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `input`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to `false` to hide the built-in input
|
||||
|
||||
### `precision`
|
||||
- default:`0`
|
||||
|
||||
### `snap`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: by default, dragging the widget will modify it's value starting from its last value. Setting this to true will make it snap directly to the mouse/touch position.
|
||||
|
||||
### `range`
|
||||
- type: `object`
|
||||
- default: `{"min":0,"max":255}`
|
||||
- usage: `range` defines the widget's output scale.
|
||||
|
||||
### `split`
|
||||
- type: `boolean|object`
|
||||
- default: `false`
|
||||
- usage:
|
||||
- set to `true` to send separate osc messages for `r` and `g` & `b`. The `address` will be the same as the widget's with `/r`, `/g` or `/b` appended to it
|
||||
- can be set as an object to specify a different `address` : `['/r', '/b', '/b']`
|
||||
- note: the widget will only respond to its original osc address, not to the splitted version
|
||||
|
|
@ -1,330 +0,0 @@
|
|||
# Plots
|
||||
|
||||
Plots are tools that display other widgets' state or incomming osc messages. They are not sensitive to mouse and touch interactions.
|
||||
|
||||
## Led
|
||||
```js
|
||||
{
|
||||
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
|
||||
|
||||
### `logScale`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to true to use logarithmic scaling
|
||||
|
||||
## RgbLed
|
||||
|
||||
```js
|
||||
{
|
||||
type:'rgbled',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
This one is like the `led` except it takes either three arguments (red, green and blue values between 0 and 255) with an optionnal forth argument (alpha, between 0 and 1), or one argument (a valid css color name).
|
||||
|
||||
## Plot
|
||||
|
||||
The plot receives an array of coordinates and draws them on a chart. Coordinates can be :
|
||||
- `y` values evenly spaced on the `x` axis
|
||||
- `[x, y]` coordinates arrays
|
||||
|
||||
!!! info
|
||||
Coordinates also can be sent as a stringified array (`[]`). A stringified object can also be sent to change specific points' coordinates (e.g. `{0:1, 4:0}` will change the 1st and 5th points' coordinates) .
|
||||
|
||||
```js
|
||||
{
|
||||
type:'plot',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `value`
|
||||
- type: `array|string`
|
||||
- default: `['']`
|
||||
- usage:
|
||||
- as an `array`: where items can be
|
||||
- `number`
|
||||
- `string` (widget's `id`)
|
||||
- `[x, y]`: array of `number` or `string`
|
||||
|
||||
### `range`
|
||||
- type: `object`
|
||||
- default:
|
||||
`{
|
||||
x:{"min":0,"max":1},
|
||||
y:{"min":0,"max":1}
|
||||
}`
|
||||
- usage: defines the `min` and `max` values for the `x` and `y` axis
|
||||
|
||||
### `bars`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to use draw bars instead (disables `logScaleX` and forces `x-axis` even spacing)
|
||||
|
||||
### `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)
|
||||
|
||||
### `smooth`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to make the line smooth. Float values are also acceptable (works fine between 0 and 0.5)
|
||||
|
||||
### `origin`
|
||||
- type: `number`
|
||||
- default: `auto`
|
||||
- usage: defines the y-axis origin. Set to `false` to disable it.
|
||||
|
||||
## Eq
|
||||
|
||||
The Eq receives an array of filter objects and draws their frequency response between 20Hz and 22050Hz.
|
||||
|
||||
```js
|
||||
{
|
||||
type:'eq',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `value`
|
||||
- type: `array`
|
||||
- default: `[]`
|
||||
- usage:
|
||||
- each item must be an object of the form below
|
||||
- all filters parameters can be filled with widget ids, whose value will be used
|
||||
|
||||
```
|
||||
{
|
||||
type:[string], // "highpass", "highshelf", "lowpass", "lowshelf", "peak", "notch"
|
||||
freq:[number], //
|
||||
q:[number], //
|
||||
gain:[number], //
|
||||
on:[bool] // 1 or true = active, 0 or false = bypassed
|
||||
}
|
||||
```
|
||||
|
||||
### `resolution`
|
||||
- type: `number`
|
||||
- default: `128`
|
||||
- usage: defines the number of points used to compute the frequency response
|
||||
|
||||
### `rangeY`
|
||||
- type: `object`
|
||||
- default:
|
||||
`{"min":-20,"max":20}`
|
||||
- usage: defines the `min` and `max` values for the `y` axis (dB level)
|
||||
|
||||
### `logScaleX`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to use logarithmic scale for the `x` axis (log10)
|
||||
|
||||
### `smooth`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to true to make the line smooth. Float values are also acceptable (works fine between 0 and 0.5)
|
||||
|
||||
### `origin`
|
||||
- type: `number`
|
||||
- default: `auto`
|
||||
- usage: defines the y-axis origin. Set to `false` to disable it.
|
||||
|
||||
## Visualizer
|
||||
|
||||
The visualizer displays the evolution in time of a received value (through osc) *or* another widget's value.
|
||||
|
||||
```js
|
||||
{
|
||||
type:'visualizer',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `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 (log10)
|
||||
|
||||
### `smooth`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to true to make the line smooth. Float values are also acceptable (works fine between 0 and 0.5)
|
||||
|
||||
### `origin`
|
||||
- type: `number`
|
||||
- default: `auto`
|
||||
- usage: defines the y-axis origin. Set to `false` to disable it.
|
||||
|
||||
## Text
|
||||
|
||||
Text displays incoming values (via osc) as text. Sending a message with no argument to the widget will reset it to its default text.
|
||||
|
||||
```js
|
||||
{
|
||||
type:'text',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `vertical`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` display vertically
|
||||
|
||||
### `wrap`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to wrap long lines automatically. This will not break overflowing words by default, word-breaking can be enabled by adding `word-break: break-all;` to the `css` property.
|
||||
|
||||
### `align`
|
||||
- type: `string`
|
||||
- default: `''`
|
||||
- usage: set to `left` or `right` to change text alignment (otherwise `center`)
|
||||
|
||||
## 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)
|
||||
|
||||
### `gradient`
|
||||
- type: `array`
|
||||
- default: `[]`
|
||||
- usage: when set, the meter's gauge will be filled with a linear color gradient : each item must be a color string. Example: `["blue", "red"]`
|
||||
|
||||
### `css`
|
||||
```css
|
||||
--color-gauge:color;
|
||||
--color-knob:color; /* transparent by default */
|
||||
--color-pips:color;
|
||||
--gauge-opacity:number;
|
||||
```
|
||||
|
||||
## Image
|
||||
|
||||
Image displays an image from a file path/url or from a base64 encoded image string. Sending an empty message resets the widget to its initial `value`.
|
||||
|
||||
```js
|
||||
{
|
||||
type:'image',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `size`
|
||||
- type: `string`
|
||||
- default: `cover`
|
||||
- usage: css [background-size](https://www.w3schools.com/CSSref/css3_pr_background-size.asp)
|
||||
|
||||
|
||||
### `position`
|
||||
- type: `string`
|
||||
- default: `cover`
|
||||
- usage: css [background-position](https://www.w3schools.com/CSSref/pr_background-position.asp)
|
||||
|
||||
|
||||
### `repeat`
|
||||
- type: `string`
|
||||
- default: `no-repeat`
|
||||
- usage: css [background-repeat](https://www.w3schools.com/CSSref/pr_background-repeat.asp)
|
||||
|
||||
|
||||
### `border`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to disable the image's borders and background-color.
|
||||
|
||||
### `cache`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to `false` to disable image caching (forces file reload when updating or editing the widget). When `true`, sending `'reload'` to the widget reloads its image without changing its value.
|
||||
|
||||
### `value`
|
||||
- type: `string`
|
||||
- default: `''`
|
||||
- usage : initial image
|
||||
- file url or absolute path
|
||||
- [base64 encoded image](https://duckduckgo.com/?q=base64+encode+image&ia=web) : `data:image/...`
|
||||
|
||||
|
||||
## Svg
|
||||
|
||||
```js
|
||||
{
|
||||
type:'svg',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `svg`
|
||||
- type: `string`
|
||||
- default: `''`
|
||||
- usage : svg xml definition
|
||||
- will be wrapped in a `<svg></svg>` element
|
||||
- `<path>` commands support a special percent notation (`%x` and `%y`)
|
||||
|
||||
|
||||
!!! tip ""
|
||||
An exemple session called `svg.json` is shipped with the app.
|
||||
|
||||
|
||||
## Frame
|
||||
|
||||
Frame loads and diplays an external web page, using its own value as URL. Only local URLs are allowed (starting with `http://127.0.0.1/`, `http://10.x.x.x/`, `http://192.168.x.x/`, etc).
|
||||
|
||||
```js
|
||||
{
|
||||
type:'frame',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `border`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to disable the frame's borders and background-color.
|
||||
|
||||
!!! note ""
|
||||
If `label` is set to `false`, all pointer-events will be disabled on the frame as long as the editor is enabled to ensure it can be selected.
|
||||
|
|
@ -1,272 +0,0 @@
|
|||
# Sliders
|
||||
|
||||
Sliders are unidimensional widgets that output one value at a time.
|
||||
|
||||
|
||||
|
||||
## Fader
|
||||
```js
|
||||
{
|
||||
type:'fader',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `horizontal`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to display the fader horizontally
|
||||
|
||||
### `alignRight`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to invert the pip's and fader's position
|
||||
|
||||
### `pips`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to `false` to hide the scale
|
||||
|
||||
### `input`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to `false` to hide the built-in input
|
||||
|
||||
### `compact`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to display a compact alternative for the widget. Disables default mouse/touch focusing on the value display.
|
||||
|
||||
### `dashed`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to display a dashed gauge
|
||||
|
||||
### `range`
|
||||
- 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 `number` or `object` if a custom label is needed
|
||||
- example:
|
||||
```js
|
||||
range: {
|
||||
"min":0,
|
||||
"50%":1,
|
||||
"max": {"inf":10} // "inf" will be used as a custom label on the scale
|
||||
}
|
||||
```
|
||||
|
||||
### `origin`
|
||||
- type: `number`
|
||||
- default: `auto`
|
||||
- usage: `origin` defines the starting point's value of the fader's gauge
|
||||
|
||||
### `logScale`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` use logarithmic scaling between breakpoints (log10)
|
||||
|
||||
|
||||
### `unit`
|
||||
- type: `string`
|
||||
- default: `empty`
|
||||
- usage: `unit` will be appended to the displayed widget's value (it doesn't affect osc messages)
|
||||
|
||||
|
||||
### `snap`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: by default, dragging the widget will modify it's value starting from its last value. Setting this to `true` will make it snap directly to the mouse/touch position.
|
||||
|
||||
### `spring`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: when set to `true`, the widget will go back to its `default` value when released.
|
||||
|
||||
|
||||
### `doubleTap`
|
||||
- type: `boolean|string`
|
||||
- default: `false`
|
||||
- usage: set to `true` to make the fader reset to its `default` value when receiving a double tap. `doubleTap` can also be an osc address, which case the widget will just send an osc message (`/<doubleTap> <preArgs>`),
|
||||
|
||||
### `meter`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to true to display a vu-meter next in the fader
|
||||
- the meter's `id` will be the same as the widget's with `/meter` appended to it
|
||||
- the meter's `address `will be the same as the widget's with `/meter` appended to it
|
||||
|
||||
### `meterAddress`
|
||||
- type: `boolean`
|
||||
- default: `empty`
|
||||
- usage: overrides the `meter`'s osc address
|
||||
|
||||
### `css`
|
||||
```css
|
||||
--color-gauge:color;
|
||||
--color-knob:color;
|
||||
--color-pips:color;
|
||||
--gauge-opacity:number; /* compact mode only */
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Knob
|
||||
|
||||
```js
|
||||
{
|
||||
type:'knob',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### `pips`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to `false` to hide the scale
|
||||
|
||||
### `input`
|
||||
- type: `boolean`
|
||||
- default: `true`
|
||||
- usage: set to `false` to hide the built-in input
|
||||
|
||||
### `angle`
|
||||
- type: `number`
|
||||
- default: `270`
|
||||
- usage: `angle` defines the angle's width of the knob, in degrees
|
||||
|
||||
### `range`
|
||||
- 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 `number` or `object` if a custom label is needed
|
||||
- example:
|
||||
```js
|
||||
range: {
|
||||
"min":0,
|
||||
"50%":1,
|
||||
"max": {"inf":10} // "inf" will be used as a custom label on the scale
|
||||
}
|
||||
```
|
||||
|
||||
### `origin`
|
||||
- type: `number`
|
||||
- default: `auto`
|
||||
- usage: `origin` defines the starting point's value of the knob's gauge
|
||||
|
||||
### `logScale`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` use logarithmic scaling between breakpoints
|
||||
|
||||
|
||||
### `unit`
|
||||
- type: `string`
|
||||
- default: `empty`
|
||||
- usage: `unit` will be appended to the displayed widget's value (it doesn't affect osc messages)
|
||||
|
||||
|
||||
### `snap`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: by default, dragging the widget *vertically* will modify it's value starting from its last value. Setting this to `true` will make it snap directly to the mouse/touch position.
|
||||
|
||||
### `spring`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: when set to `true`, the widget will go back to its `default` value when released.
|
||||
|
||||
### `doubleTap`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to make the knob reset to its `default` value when receiving a double tap
|
||||
|
||||
### `css`
|
||||
```
|
||||
--color-gauge:color;
|
||||
--color-knob:color;
|
||||
--color-pips:color;
|
||||
```
|
||||
|
||||
## Encoder
|
||||
|
||||
An endless knob that only responds to rotative gestures.
|
||||
|
||||
```js
|
||||
{
|
||||
type:'encoder',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `ticks`
|
||||
- type: `number`
|
||||
- default: `360`
|
||||
- usage: defines the granularity / verbosity of the encoder (number of step for a 360° arc)
|
||||
|
||||
### `back`
|
||||
- type: `string|number|object`
|
||||
- default: `-1`
|
||||
- usage: defines which value is sent when rotating the encoder anticlockwise
|
||||
- can be an `object` if the type needs to be specified (see [preArgs](./widgets.md#preargs))
|
||||
|
||||
### `forth`
|
||||
- type: `string|number|object`
|
||||
- default: `1`
|
||||
- usage: defines which value is sent when rotating the encoder clockwise
|
||||
- can be an `object` if the type needs to be specified (see [preArgs](./widgets.md#preargs))
|
||||
|
||||
### `release`
|
||||
- type: `string|number|object`
|
||||
- default: `empty`
|
||||
- usage: defines which value is sent when releasing the encoder
|
||||
- set to `null` to send send no argument in the osc message
|
||||
- can be an `object` if the type needs to be specified (see [preArgs](./widgets.md#preargs))
|
||||
|
||||
|
||||
### `snap`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: by default, dragging the widget will modify it's value starting from its last value. Setting this to `true` will make it snap directly to the mouse/touch position.
|
||||
|
||||
### `doubleTap`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to make the encoder reset to its initial value when receiving a double tap
|
||||
|
||||
### `css`
|
||||
```
|
||||
--color-knob:color;
|
||||
```
|
||||
|
||||
|
||||
## Range
|
||||
|
||||
A range is a fader with two handles. To move the range (both handles at once), hold the `shift` key or use two fingers.
|
||||
|
||||
```js
|
||||
{
|
||||
type:'range',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `split`
|
||||
- type: `boolean|object`
|
||||
- default: `false`
|
||||
- usage:
|
||||
- set to `true` to send separate osc messages for `low` and `high` handles. The `address` will be the same as the widget's with `/low` or `/high` appended to it
|
||||
- can be set as an object to specify a different `address` : `['/osc_address_low', '/osc_address_high']`
|
||||
- note: the widget will only respond to its original osc address, not to the splitted version
|
||||
|
||||
|
||||
### `css`
|
||||
```css
|
||||
--color-gauge:color;
|
||||
--color-knob:color;
|
||||
--color-pips:color;
|
||||
--gauge-opacity:number; /* compact mode only */
|
||||
```
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
# Switchers
|
||||
|
||||
Switcher can store and recall the state of other widgets.
|
||||
|
||||
|
||||
|
||||
## Switcher
|
||||
|
||||
The switcher looks like the [`switch`](buttons/#switch). Each of its possible values represent a bank that stores the values from the widgets listed in its `linkedWidgets` attribute.
|
||||
|
||||
|
||||
```js
|
||||
{
|
||||
type:'switcher',
|
||||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `linkedWidgets`
|
||||
- type: `array|string`
|
||||
- default:
|
||||
`empty`
|
||||
- usage:
|
||||
- as a `string`: a widget's `id` whose state changes will be stored
|
||||
- as an `array`: a list of widget `id` `strings`
|
||||
|
||||
|
||||
### `values`
|
||||
- type: `array|object`
|
||||
- default: `["A", "B"]`
|
||||
- usage:
|
||||
- `array` of possible values to switch between : `[1,2,3]`
|
||||
- `object` of `"label":value` pairs
|
||||
|
||||
|
||||
## Crossfader
|
||||
|
||||
The crossfader is a 2-states-only switcher that comes with a slider allowing to fade from one state to the other by interpolating the values.
|
||||
|
|
@ -1,146 +0,0 @@
|
|||
# Widgets properties
|
||||
|
||||
All widgets share a set of generic properties described below.
|
||||
|
||||
## Basics
|
||||
|
||||
### `type`
|
||||
- type: `string`
|
||||
- default: `fader`
|
||||
|
||||
### `id`
|
||||
- type: `string`
|
||||
- default: generated unique 'widget_n'
|
||||
- usage: widgets sharing the same `id` will act as clones and update each other's value(s) without sending extra osc messages.
|
||||
|
||||
### `linkId`
|
||||
- type: `string|array`
|
||||
- default: `empty`
|
||||
- usage:
|
||||
- widgets sharing the same `linkId` update each other's value(s) AND send their respective osc messages.
|
||||
- when prefixed with `>>`, the linkId will make the widget act as a master (sending but not receiving)
|
||||
- when prefixed with `<<`, the linkId will make the widget act as a slave (receiving but not sending)
|
||||
|
||||
## Style
|
||||
|
||||
### `label`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `string|false`
|
||||
- default: `auto`, which displays `id`
|
||||
- usage:
|
||||
- set to `false` to hide completely
|
||||
- insert icons from [FontAwesome](https://fontawesome.com/icons?d=gallery&s=solid&m=free) using the prefix `^` followed by the icon's name : `made with ^heart`, etc
|
||||
|
||||
### `top`<i class="dynamic-prop-icon" title="dynamic"></i> / `left`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `number|percentage`
|
||||
- default: `auto`
|
||||
- usage:
|
||||
- when both `top` and `left` are set to `auto`, the widget is positioned according to the normal flow of the page (from left to right, by order of creation).
|
||||
- otherwise, the widget will be absolutely positioned
|
||||
|
||||
|
||||
### `width`<i class="dynamic-prop-icon" title="dynamic"></i> / `height`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `number|percentage`
|
||||
- default: `auto`
|
||||
|
||||
### `color`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `string`
|
||||
- default: `auto`, inherited accent color
|
||||
- usage: any valid `css` color code is valid, this will change the default accent color for the widget and all its children
|
||||
|
||||
|
||||
### `css`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `string`
|
||||
- default: *empty*
|
||||
- usage: applies CSS rules to widget. See [css tips](../extras/css-tips.md).
|
||||
|
||||
## Value
|
||||
|
||||
### `default`
|
||||
- type: `*`
|
||||
- default: `empty`
|
||||
- usage: if set, the widget will be initialized with this `value` when the session is loaded. Some widgets use this property under specific conditions (see fader's `doubleTap` for example).
|
||||
|
||||
|
||||
### `value`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `*`
|
||||
- default: `empty`
|
||||
- usage: set `value` to define a widget's value depending on other widget's values / properties using [property inheritance and property maths](../extras/advanced-property-syntax.md). When updated by an osc-sending event (e.g. dragging a slider), the widget will send its own osc message as well.
|
||||
|
||||
!!! note ""
|
||||
`default` and `value` must match the widget's value type (ie a `number` for sliders, an `array` for pads, etc) and restrictions (equal to `on` or `off` for a push/toggle button)
|
||||
|
||||
|
||||
## OSC
|
||||
|
||||
### `precision`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `integer|string`
|
||||
- default: `2`
|
||||
- usage: the `precision` property defines the number of decimals to display and to send.
|
||||
- set to `0` to send `integers` only.
|
||||
- a specific data type can be specified by appending a valid osc type tag to the precision value, for example : `3d` will make the widget send double precision numbers rounded to three decimals
|
||||
|
||||
### `target`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `array|string`
|
||||
- default: `[]`
|
||||
- usage:
|
||||
- this defines the targets of the widget's osc messages
|
||||
- each element of the `array` must be a string formatted as follows : `"ip:port"`
|
||||
- multiple targets can be specified : `["ip1:port1","ip2:port2"]`
|
||||
- a single target can be set : `ip:port`
|
||||
- if [`midi`](../extras/midi.md) is enabled, targets can be `"midi:device_name"`
|
||||
- special item `"self"` can be used to refer to the emitting client directly
|
||||
- if no target is set (empty array `[]`), messages can still be sent if the server has defaults targets (`-s / --send`)
|
||||
- to disable the default global osc targets (set via the app's `--send` option), set one of the array's item as `null` (unquoted).
|
||||
|
||||
### `address`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `string`
|
||||
- default: `/widgets_id`
|
||||
- usage: this is the `address` of the osc messages sent by the widget, it must start with a `/`
|
||||
|
||||
### `touchAddress`
|
||||
- type: `string`
|
||||
- default: `empty`
|
||||
- usage: sliders and pads can send special osc messages to inform weither they are currently touched or not. The osc message will be of the following form :
|
||||
```
|
||||
/touch/address [preArgs] 0/1
|
||||
```
|
||||
|
||||
### `preArgs`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `array|*`
|
||||
- default: `[]`
|
||||
- usage:
|
||||
- each element of the `array` defines a constant value that will be prepended to the osc message
|
||||
- values can be defined as objects if the osc data type needs to be specified (ie different from the default implied by the `precision` option)
|
||||
- a single non-array value can be set
|
||||
- example:
|
||||
```js
|
||||
preArgs: [
|
||||
"1", // this will always be sent as a string
|
||||
0.5, // this will be sent as an integer if precision equals 0
|
||||
1, // this will be sent as float if precision is different from 0
|
||||
{
|
||||
type:"f",
|
||||
value:0.5
|
||||
},
|
||||
{
|
||||
type:"i",
|
||||
value:1
|
||||
},
|
||||
{
|
||||
type:"T",
|
||||
value:true
|
||||
},
|
||||
{
|
||||
type:"F",
|
||||
value:false
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### `bypass`<i class="dynamic-prop-icon" title="dynamic"></i>
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to prevent the widget from sending any osc message
|
||||
|
||||
!!! note ""
|
||||
Changing OSC properties dynamically using advanced property syntax is likely to break synchronisation between multiple clients.
|
||||
BIN
resources/images/logo_discourse.png
Normal file
BIN
resources/images/logo_discourse.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
|
|
@ -6,49 +6,41 @@ copyright: "Open Stage Control is an <a href='http://ammd.net'>AMMD</a> software
|
|||
site_description: "Libre and modular OSC / MIDI controller"
|
||||
|
||||
theme:
|
||||
name: 'material'
|
||||
custom_dir: 'mkdocs-material/material'
|
||||
feature:
|
||||
tabs: true
|
||||
name: null
|
||||
custom_dir: 'theme/'
|
||||
favicon: 'img/logo-nobadge.png?1'
|
||||
language: 'en'
|
||||
logo: 'img/logo-nobadge.svg'
|
||||
palette:
|
||||
primary: 'blue grey'
|
||||
accent: 'light blue'
|
||||
font:
|
||||
text: 'Roboto'
|
||||
code: 'Roboto Mono'
|
||||
include_search_page: true
|
||||
static_templates:
|
||||
- 404.html
|
||||
|
||||
extra_css:
|
||||
- 'css/extra.css'
|
||||
|
||||
pages:
|
||||
- OSC Control Surface: index.md
|
||||
- Getting started: getting-started.md
|
||||
- User interface: interface.md
|
||||
- Editing sessions: editing-sessions.md
|
||||
- Widgets reference: widgets-reference.md
|
||||
# - Widget properties: widgets/widgets.md
|
||||
# - Containers: widgets/containers.md
|
||||
# - Sliders: widgets/sliders.md
|
||||
# - Pads: widgets/pads.md
|
||||
# - Buttons: widgets/buttons.md
|
||||
# - Switchers: widgets/switchers.md
|
||||
# - Plots: widgets/plots.md
|
||||
# - Matrices: widgets/matrices.md
|
||||
# - Inputs: widgets/inputs.md
|
||||
# - Maths: widgets/maths.md
|
||||
- Extras:
|
||||
- Advanced property syntax: extras/advanced-property-syntax.md
|
||||
- CSS Tips: extras/css-tips.md
|
||||
- Theming: extras/theming.md
|
||||
- URL options: extras/url-options.md
|
||||
- Remote control: extras/remote-control.md
|
||||
- Custom module: extras/custom-module.md
|
||||
- Midi: extras/midi.md
|
||||
- Examples: examples.md
|
||||
- Credits: credits.md
|
||||
extra:
|
||||
links:
|
||||
-
|
||||
title: Download
|
||||
url: https://github.com/jean-emmanuel/open-stage-control/releases
|
||||
primary: true
|
||||
-
|
||||
title: Demo (requires chromium 50+)
|
||||
url : http://openstagecontrol.herokuapp.com
|
||||
|
||||
nav:
|
||||
- Open Stage Control: index.md
|
||||
- Docs: docs.md
|
||||
- Docs:
|
||||
- Getting started: docs/getting-started.md
|
||||
- User interface: docs/interface.md
|
||||
- Editing sessions: docs/editing-sessions.md
|
||||
- Widgets reference: docs/widgets-reference.md
|
||||
- Advanced property syntax: docs/advanced-property-syntax.md
|
||||
- CSS Tips: docs/css-tips.md
|
||||
- Theming: docs/theming.md
|
||||
- URL options: docs/url-options.md
|
||||
- Remote control: docs/remote-control.md
|
||||
- Custom module: docs/custom-module.md
|
||||
- Midi: docs/midi.md
|
||||
- Examples: docs/examples.md
|
||||
- Credits: docs/credits.md
|
||||
|
||||
markdown_extensions:
|
||||
- markdown.extensions.admonition
|
||||
|
|
@ -68,3 +60,6 @@ markdown_extensions:
|
|||
- pymdownx.superfences
|
||||
- pymdownx.tasklist(custom_checkbox=true)
|
||||
- pymdownx.tilde
|
||||
|
||||
plugins:
|
||||
- search
|
||||
|
|
|
|||
8
resources/theme/404.html
Normal file
8
resources/theme/404.html
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h2>404</h2>
|
||||
<p>Page not found.</p>
|
||||
|
||||
{% endblock %}
|
||||
119
resources/theme/base.html
Normal file
119
resources/theme/base.html
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="description" content="{{ config.site_description }}" />
|
||||
<link rel="shortcut icon" href="{{ config.theme.favicon|url }}">
|
||||
|
||||
<title>{% if page.title and not page.is_homepage %}{{ page.title }} - {% endif %}{{ config.site_name }}</title>
|
||||
|
||||
<link rel="stylesheet" href="https://unpkg.com/spectre.css/dist/spectre.min.css">
|
||||
<link rel="stylesheet" href="{{ "/extensions/admonition.css"|url }}">
|
||||
<link rel="stylesheet" href="{{ "/extensions/codehilite.css"|url }}">
|
||||
<link rel="stylesheet" href="{{ "/styles.css"|url }}">
|
||||
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.6/styles/default.min.css">
|
||||
{% block extrahead %}
|
||||
{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
<div class="d-header">
|
||||
<div class="wrap">
|
||||
<div class="contents">
|
||||
<div class="title">
|
||||
<a href="{{ "/"|url }}"><img src="{{ "/img/logo_discourse.png"|url }}"/></a>
|
||||
</div>
|
||||
<div class="header-buttons-panel">
|
||||
<span class="header-buttons">
|
||||
<div role="search">
|
||||
<form action="{{ "search.html"|url }}" method="get">
|
||||
<input id="mkdocs-search-query" type="search" name="q" placeholder="Search" />
|
||||
</form>
|
||||
</div>
|
||||
<a href="{{ "/"|url}}" class="{% if page.is_homepage %}active{% endif %}">Home</a>
|
||||
<a href="{{ "/docs"|url }}" class="{% if not page.is_homepage %}active{% endif %}">Docs</a>
|
||||
<a href="https://github.com/jean-emmanuel/open-stage-control" target="_blank">Bug Tracker</a>
|
||||
<a href="https://openstagecontrol.discourse.group">Community</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if page.is_homepage %}
|
||||
<div id="jumbotron" class="bg-secondary">
|
||||
<!-- <div class="bg" style="background-image:url({{base_url}}/img/ardour-osc.png)"></div> -->
|
||||
<div class="wrap">
|
||||
<h1 class="text-dark">{{ config.site_name }}</h1>
|
||||
<h2 class="text-dark">{{ config.site_description }}</h2>
|
||||
<br/>
|
||||
<div class="">
|
||||
{% for link in config.extra.links %}
|
||||
<a class="btn {% if link.primary %}btn-primary{% endif %}" href="{{link.url}}">{{link.title}}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div id="main" class="wrap">
|
||||
{% if not page.is_homepage %}
|
||||
{% set ns = namespace(navigation=[]) %}
|
||||
{% for nav_item in nav %}
|
||||
{% if nav_item.children %}
|
||||
{% set ns.navigation = nav_item %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<div class="col-left">
|
||||
<ul class="nav">
|
||||
{% for nav_item in ns.navigation.children %}
|
||||
{% if nav_item.active or nav_item.abs_url == '/docs/getting-started/' and page.abs_url == '/docs/' %}
|
||||
{% set active = True %}
|
||||
{% endif %}
|
||||
<li class="nav-item {% if active%}active{% endif %}">
|
||||
<a href="{{ nav_item.url }}">{{ nav_item.title }}</a>
|
||||
{% if active %}
|
||||
{% set toc_ = page.toc %}
|
||||
|
||||
<!--
|
||||
(@MaterialMkdocs)
|
||||
Hack: check whether the content contains a h1 headline. If it does, the
|
||||
top-level anchor must be skipped, since it would be redundant to the link
|
||||
to the current page that is located just above the anchor. Therefore we
|
||||
directly continue with the children of the anchor.
|
||||
-->
|
||||
{% if toc_ | first is defined and "\x3ch1 id=" in page.content %}
|
||||
{% set toc_ = (toc_ | first).children %}
|
||||
{% endif %}
|
||||
{% if toc_ | first is defined %}
|
||||
<ul class="nav">
|
||||
{% for toc_item in toc_ %}
|
||||
<li><a href="{{ toc_item.url }}">{{ toc_item.title }}</a></li>
|
||||
{% for toc_item in toc_item.children %}
|
||||
<li><a href="{{ toc_item.url }}">{{ toc_item.title }}</a></li>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
<div class="col-right">
|
||||
{% block content %}
|
||||
{{ page.content }}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="{{ "/scripts.js"|url }}"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.6/highlight.min.js"></script>
|
||||
<script src="{{ "search/main.js"|url }}" defer></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
57
resources/theme/extensions/admonition.css
Normal file
57
resources/theme/extensions/admonition.css
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
div.admonition {
|
||||
font-size: 0.9em;
|
||||
border: 1px solid #cccccc;
|
||||
background-color: #fafafa;
|
||||
padding: 0;
|
||||
border-radius: 3px;
|
||||
margin: 0 0 1.2rem;
|
||||
}
|
||||
|
||||
div.admonition p {
|
||||
margin: 0.5em 1em 0.5em 1em;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
div.admonition li p {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
div.admonition pre, div.warning pre {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
div.admonition p.admonition-title {
|
||||
margin: 0;
|
||||
padding: 0.5em;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
background-color: #165e83;
|
||||
}
|
||||
|
||||
div.danger { border: 1px solid #b7282e;}
|
||||
div.error { border: 1px solid #b7282e;}
|
||||
div.warning { border: 1px solid #f19072;}
|
||||
div.caution { border: 1px solid #f19072;}
|
||||
div.attention { border: 1px solid #f19072;}
|
||||
div.important { border: 1px solid #f8b862;}
|
||||
div.note { border: 1px solid #f8b862;}
|
||||
div.hint { border: 1px solid #7ebea5;}
|
||||
div.tip { border: 1px solid #7ebea5;}
|
||||
|
||||
div.danger p.admonition-title, div.error p.admonition-title {
|
||||
background-color: #b7282e;
|
||||
}
|
||||
|
||||
div.caution p.admonition-title,
|
||||
div.warning p.admonition-title,
|
||||
div.attention p.admonition-title {
|
||||
background-color: #f19072;
|
||||
}
|
||||
|
||||
div.note p.admonition-title, div.important p.admonition-title {
|
||||
background-color: #f8b862;
|
||||
}
|
||||
|
||||
div.hint p.admonition-title, div.tip p.admonition-title {
|
||||
background-color: #7ebea5;
|
||||
}
|
||||
316
resources/theme/extensions/codehilite.css
Normal file
316
resources/theme/extensions/codehilite.css
Normal file
|
|
@ -0,0 +1,316 @@
|
|||
/* https://raw.githubusercontent.com/simonsmith/syntax.css */
|
||||
|
||||
.codehilite {
|
||||
background: #ffffff;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.codehilite .c {
|
||||
color: #999988;
|
||||
font-style: italic
|
||||
}
|
||||
|
||||
/* Comment */
|
||||
.codehilite .err {
|
||||
color: #a61717;
|
||||
background-color: #e3d2d2
|
||||
}
|
||||
|
||||
/* Error */
|
||||
.codehilite .k {
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
/* Keyword */
|
||||
.codehilite .o {
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
/* Operator */
|
||||
.codehilite .cm {
|
||||
color: #999988;
|
||||
font-style: italic
|
||||
}
|
||||
|
||||
/* Comment.Multiline */
|
||||
.codehilite .cp {
|
||||
color: #999999;
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
/* Comment.Preproc */
|
||||
.codehilite .c1 {
|
||||
color: #999988;
|
||||
font-style: italic
|
||||
}
|
||||
|
||||
/* Comment.Single */
|
||||
.codehilite .cs {
|
||||
color: #999999;
|
||||
font-weight: bold;
|
||||
font-style: italic
|
||||
}
|
||||
|
||||
/* Comment.Special */
|
||||
.codehilite .gd {
|
||||
color: #000000;
|
||||
background-color: #ffdddd
|
||||
}
|
||||
|
||||
/* Generic.Deleted */
|
||||
.codehilite .gd .x {
|
||||
color: #000000;
|
||||
background-color: #ffaaaa
|
||||
}
|
||||
|
||||
/* Generic.Deleted.Specific */
|
||||
.codehilite .ge {
|
||||
font-style: italic
|
||||
}
|
||||
|
||||
/* Generic.Emph */
|
||||
.codehilite .gr {
|
||||
color: #aa0000
|
||||
}
|
||||
|
||||
/* Generic.Error */
|
||||
.codehilite .gh {
|
||||
color: #999999
|
||||
}
|
||||
|
||||
/* Generic.Heading */
|
||||
.codehilite .gi {
|
||||
color: #000000;
|
||||
background-color: #ddffdd
|
||||
}
|
||||
|
||||
/* Generic.Inserted */
|
||||
.codehilite .gi .x {
|
||||
color: #000000;
|
||||
background-color: #aaffaa
|
||||
}
|
||||
|
||||
/* Generic.Inserted.Specific */
|
||||
.codehilite .go {
|
||||
color: #888888
|
||||
}
|
||||
|
||||
/* Generic.Output */
|
||||
.codehilite .gp {
|
||||
color: #555555
|
||||
}
|
||||
|
||||
/* Generic.Prompt */
|
||||
.codehilite .gs {
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
/* Generic.Strong */
|
||||
.codehilite .gu {
|
||||
color: #aaaaaa
|
||||
}
|
||||
|
||||
/* Generic.Subheading */
|
||||
.codehilite .gt {
|
||||
color: #aa0000
|
||||
}
|
||||
|
||||
/* Generic.Traceback */
|
||||
.codehilite .kc {
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
/* Keyword.Constant */
|
||||
.codehilite .kd {
|
||||
font-weight: bold;
|
||||
|
||||
}
|
||||
|
||||
/* Keyword.Declaration */
|
||||
.codehilite .kp {
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
/* Keyword.Pseudo */
|
||||
.codehilite .kr {
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
/* Keyword.Reserved */
|
||||
.codehilite .kt {
|
||||
color: #445588;
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
/* Keyword.Type */
|
||||
.codehilite .m {
|
||||
color: #009999
|
||||
}
|
||||
|
||||
/* Literal.Number */
|
||||
.codehilite .s {
|
||||
color: #d14
|
||||
}
|
||||
|
||||
/* Literal.String */
|
||||
.codehilite .na {
|
||||
color: #008080
|
||||
}
|
||||
|
||||
/* Name.Attribute */
|
||||
.codehilite .nb {
|
||||
color: #0086B3
|
||||
}
|
||||
|
||||
/* Name.Builtin */
|
||||
.codehilite .nc {
|
||||
color: #445588;
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
/* Name.Class */
|
||||
.codehilite .no {
|
||||
color: #008080
|
||||
}
|
||||
|
||||
/* Name.Constant */
|
||||
.codehilite .ni {
|
||||
color: #800080
|
||||
}
|
||||
|
||||
/* Name.Entity */
|
||||
.codehilite .ne {
|
||||
color: #990000;
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
/* Name.Exception */
|
||||
.codehilite .nf {
|
||||
color: #990000;
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
/* Name.Function */
|
||||
.codehilite .nn {
|
||||
color: #555555
|
||||
}
|
||||
|
||||
/* Name.Namespace */
|
||||
.codehilite .nt {
|
||||
color: #000080
|
||||
}
|
||||
|
||||
/* Name.Tag */
|
||||
.codehilite .nv {
|
||||
color: #008080
|
||||
}
|
||||
|
||||
/* Name.Variable */
|
||||
.codehilite .ow {
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
/* Operator.Word */
|
||||
.codehilite .w {
|
||||
color: #bbbbbb
|
||||
}
|
||||
|
||||
/* Text.Whitespace */
|
||||
.codehilite .mf {
|
||||
color: #009999
|
||||
}
|
||||
|
||||
/* Literal.Number.Float */
|
||||
.codehilite .mh {
|
||||
color: #009999
|
||||
}
|
||||
|
||||
/* Literal.Number.Hex */
|
||||
.codehilite .mi {
|
||||
color: #009999
|
||||
}
|
||||
|
||||
/* Literal.Number.Integer */
|
||||
.codehilite .mo {
|
||||
color: #009999
|
||||
}
|
||||
|
||||
/* Literal.Number.Oct */
|
||||
.codehilite .sb {
|
||||
color: #d14
|
||||
}
|
||||
|
||||
/* Literal.String.Backtick */
|
||||
.codehilite .sc {
|
||||
color: #d14
|
||||
}
|
||||
|
||||
/* Literal.String.Char */
|
||||
.codehilite .sd {
|
||||
color: #d14
|
||||
}
|
||||
|
||||
/* Literal.String.Doc */
|
||||
.codehilite .s2 {
|
||||
color: #d14
|
||||
}
|
||||
|
||||
/* Literal.String.Double */
|
||||
.codehilite .se {
|
||||
color: #d14
|
||||
}
|
||||
|
||||
/* Literal.String.Escape */
|
||||
.codehilite .sh {
|
||||
color: #d14
|
||||
}
|
||||
|
||||
/* Literal.String.Heredoc */
|
||||
.codehilite .si {
|
||||
color: #d14
|
||||
}
|
||||
|
||||
/* Literal.String.Interpol */
|
||||
.codehilite .sx {
|
||||
color: #d14
|
||||
}
|
||||
|
||||
/* Literal.String.Other */
|
||||
.codehilite .sr {
|
||||
color: #009926
|
||||
}
|
||||
|
||||
/* Literal.String.Regex */
|
||||
.codehilite .s1 {
|
||||
color: #d14
|
||||
}
|
||||
|
||||
/* Literal.String.Single */
|
||||
.codehilite .ss {
|
||||
color: #990073
|
||||
}
|
||||
|
||||
/* Literal.String.Symbol */
|
||||
.codehilite .bp {
|
||||
color: #999999
|
||||
}
|
||||
|
||||
/* Name.Builtin.Pseudo */
|
||||
.codehilite .vc {
|
||||
color: #008080
|
||||
}
|
||||
|
||||
/* Name.Variable.Class */
|
||||
.codehilite .vg {
|
||||
color: #008080
|
||||
}
|
||||
|
||||
/* Name.Variable.Global */
|
||||
.codehilite .vi {
|
||||
color: #008080
|
||||
}
|
||||
|
||||
/* Name.Variable.Instance */
|
||||
.codehilite .il {
|
||||
color: #009999
|
||||
}
|
||||
1
resources/theme/icons.min.css
vendored
Normal file
1
resources/theme/icons.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
resources/theme/main.html
Normal file
1
resources/theme/main.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
{% extends "base.html" %}
|
||||
349
resources/theme/normalize.css
vendored
Normal file
349
resources/theme/normalize.css
vendored
Normal file
|
|
@ -0,0 +1,349 @@
|
|||
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
|
||||
|
||||
/* Document
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Correct the line height in all browsers.
|
||||
* 2. Prevent adjustments of font size after orientation changes in iOS.
|
||||
*/
|
||||
|
||||
html {
|
||||
line-height: 1.15; /* 1 */
|
||||
-webkit-text-size-adjust: 100%; /* 2 */
|
||||
}
|
||||
|
||||
/* Sections
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the margin in all browsers.
|
||||
*/
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the `main` element consistently in IE.
|
||||
*/
|
||||
|
||||
main {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the font size and margin on `h1` elements within `section` and
|
||||
* `article` contexts in Chrome, Firefox, and Safari.
|
||||
*/
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
/* Grouping content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in Firefox.
|
||||
* 2. Show the overflow in Edge and IE.
|
||||
*/
|
||||
|
||||
hr {
|
||||
box-sizing: content-box; /* 1 */
|
||||
height: 0; /* 1 */
|
||||
overflow: visible; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
pre {
|
||||
font-family: monospace, monospace; /* 1 */
|
||||
font-size: 1em; /* 2 */
|
||||
}
|
||||
|
||||
/* Text-level semantics
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the gray background on active links in IE 10.
|
||||
*/
|
||||
|
||||
a {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Remove the bottom border in Chrome 57-
|
||||
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
||||
*/
|
||||
|
||||
abbr[title] {
|
||||
border-bottom: none; /* 1 */
|
||||
text-decoration: underline; /* 2 */
|
||||
text-decoration: underline dotted; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font weight in Chrome, Edge, and Safari.
|
||||
*/
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: monospace, monospace; /* 1 */
|
||||
font-size: 1em; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font size in all browsers.
|
||||
*/
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent `sub` and `sup` elements from affecting the line height in
|
||||
* all browsers.
|
||||
*/
|
||||
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
/* Embedded content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the border on images inside links in IE 10.
|
||||
*/
|
||||
|
||||
img {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
/* Forms
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Change the font styles in all browsers.
|
||||
* 2. Remove the margin in Firefox and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {
|
||||
font-family: inherit; /* 1 */
|
||||
font-size: 100%; /* 1 */
|
||||
line-height: 1.15; /* 1 */
|
||||
margin: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the overflow in IE.
|
||||
* 1. Show the overflow in Edge.
|
||||
*/
|
||||
|
||||
button,
|
||||
input { /* 1 */
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inheritance of text transform in Edge, Firefox, and IE.
|
||||
* 1. Remove the inheritance of text transform in Firefox.
|
||||
*/
|
||||
|
||||
button,
|
||||
select { /* 1 */
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the inability to style clickable types in iOS and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
[type="button"],
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner border and padding in Firefox.
|
||||
*/
|
||||
|
||||
button::-moz-focus-inner,
|
||||
[type="button"]::-moz-focus-inner,
|
||||
[type="reset"]::-moz-focus-inner,
|
||||
[type="submit"]::-moz-focus-inner {
|
||||
border-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore the focus styles unset by the previous rule.
|
||||
*/
|
||||
|
||||
button:-moz-focusring,
|
||||
[type="button"]:-moz-focusring,
|
||||
[type="reset"]:-moz-focusring,
|
||||
[type="submit"]:-moz-focusring {
|
||||
outline: 1px dotted ButtonText;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the padding in Firefox.
|
||||
*/
|
||||
|
||||
fieldset {
|
||||
padding: 0.35em 0.75em 0.625em;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the text wrapping in Edge and IE.
|
||||
* 2. Correct the color inheritance from `fieldset` elements in IE.
|
||||
* 3. Remove the padding so developers are not caught out when they zero out
|
||||
* `fieldset` elements in all browsers.
|
||||
*/
|
||||
|
||||
legend {
|
||||
box-sizing: border-box; /* 1 */
|
||||
color: inherit; /* 2 */
|
||||
display: table; /* 1 */
|
||||
max-width: 100%; /* 1 */
|
||||
padding: 0; /* 3 */
|
||||
white-space: normal; /* 1 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
||||
*/
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the default vertical scrollbar in IE 10+.
|
||||
*/
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in IE 10.
|
||||
* 2. Remove the padding in IE 10.
|
||||
*/
|
||||
|
||||
[type="checkbox"],
|
||||
[type="radio"] {
|
||||
box-sizing: border-box; /* 1 */
|
||||
padding: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the cursor style of increment and decrement buttons in Chrome.
|
||||
*/
|
||||
|
||||
[type="number"]::-webkit-inner-spin-button,
|
||||
[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the odd appearance in Chrome and Safari.
|
||||
* 2. Correct the outline style in Safari.
|
||||
*/
|
||||
|
||||
[type="search"] {
|
||||
-webkit-appearance: textfield; /* 1 */
|
||||
outline-offset: -2px; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner padding in Chrome and Safari on macOS.
|
||||
*/
|
||||
|
||||
[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inability to style clickable types in iOS and Safari.
|
||||
* 2. Change font properties to `inherit` in Safari.
|
||||
*/
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
-webkit-appearance: button; /* 1 */
|
||||
font: inherit; /* 2 */
|
||||
}
|
||||
|
||||
/* Interactive
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
* Add the correct display in Edge, IE 10+, and Firefox.
|
||||
*/
|
||||
|
||||
details {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add the correct display in all browsers.
|
||||
*/
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
/* Misc
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 10+.
|
||||
*/
|
||||
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 10.
|
||||
*/
|
||||
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
||||
9
resources/theme/scripts.js
Normal file
9
resources/theme/scripts.js
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
var offset = 82
|
||||
function offsetScroll(){
|
||||
if (document.location.hash) {
|
||||
var el = document.getElementById(document.location.hash.substring(1))
|
||||
if (el) document.body.scrollTop = document.documentElement.scrollTop = el.offsetTop - offset
|
||||
}
|
||||
}
|
||||
window.addEventListener('hashchange', offsetScroll)
|
||||
setTimeout(offsetScroll, 250)
|
||||
14
resources/theme/search.html
Normal file
14
resources/theme/search.html
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block extrahead %}
|
||||
<script>var base_url = '{{ "/"|url }}';</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h2 id="search">Search Results</h2>
|
||||
|
||||
<div id="mkdocs-search-results">
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
246
resources/theme/styles.css
Normal file
246
resources/theme/styles.css
Normal file
|
|
@ -0,0 +1,246 @@
|
|||
body {
|
||||
color: #333;
|
||||
font-family: Helvetica,Arial,sans-serif;
|
||||
font-size: 15px;
|
||||
line-height: 1.4;
|
||||
background-color: #fff;
|
||||
overflow-y: scroll;
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.wrap {
|
||||
max-width: 1110px;
|
||||
}
|
||||
@media (max-width: 570px)
|
||||
.wrap, .full-width {
|
||||
min-width: 0;
|
||||
}
|
||||
.wrap {
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
padding: 0 8px;
|
||||
}
|
||||
.d-header>.wrap {
|
||||
width: calc(100% - 16px);
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
.d-header {
|
||||
left: 0;
|
||||
height: 4em;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.d-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
background-color: #333;
|
||||
box-shadow: 0 2px 4px -1px rgba(0,0,0,0.25);
|
||||
}
|
||||
|
||||
.d-header>.wrap .contents {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.wrap .contents {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.d-header .title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.d-header .title img {
|
||||
height: 2.57em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
|
||||
.d-header .header-buttons-panel {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex: 0 0 auto;
|
||||
margin-left: auto;
|
||||
align-items: center;
|
||||
}
|
||||
.d-header .header-buttons {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 0.2em;
|
||||
}
|
||||
|
||||
.d-header .header-buttons a {
|
||||
padding: 6px 10px;
|
||||
color: #fff;
|
||||
font-size: 1.1487em;
|
||||
}
|
||||
|
||||
.d-header .header-buttons a {
|
||||
opacity: 0.5;
|
||||
transition: opacity .25s;
|
||||
text-decoration: none;
|
||||
}
|
||||
.d-header .header-buttons a:hover {
|
||||
opacity: 0.75;
|
||||
}
|
||||
.d-header .header-buttons a.active {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#jumbotron {
|
||||
text-align: center;
|
||||
position: relative;
|
||||
padding: 8em 0 4em;
|
||||
}
|
||||
#jumbotron .bg {
|
||||
position: absolute;
|
||||
top:0px;left:0px;right:0px;bottom:0px;
|
||||
background-size: cover;
|
||||
z-index: -1;
|
||||
opacity: 0.5;
|
||||
/* filter: blur(5px); */
|
||||
|
||||
}
|
||||
|
||||
#jumbotron + #main {
|
||||
padding-top: 2em;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
|
||||
#main {
|
||||
padding-top: 5.8572em;
|
||||
padding-bottom: 4em;
|
||||
display: flex;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.col-left {
|
||||
width:240px;
|
||||
}
|
||||
.col-left > ul {
|
||||
top: 5.8572em;
|
||||
width: 230px;
|
||||
position: fixed;
|
||||
overflow-y: auto;
|
||||
bottom: 0;
|
||||
padding-left: 2px;
|
||||
}
|
||||
.col-left > ul ul {
|
||||
line-height: 1
|
||||
}
|
||||
.col-right {
|
||||
flex: 1
|
||||
}
|
||||
|
||||
#main img {
|
||||
max-width: 100%;
|
||||
border-radius: 3px;
|
||||
/* box-shadow: 0 2px 8px 0 rgba(0,0,0,0.5); */
|
||||
}
|
||||
|
||||
.codehilite {
|
||||
background-color: #fafafa;
|
||||
color: #37474f;
|
||||
line-height: 1em;
|
||||
}
|
||||
|
||||
.codehilite pre {
|
||||
padding: 12px;
|
||||
white-space: pre;
|
||||
font-feature-settings: "kern";
|
||||
/* font-family: "Roboto Mono","Courier New",Courier,monospace; */
|
||||
direction: ltr;
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
table {
|
||||
border: 1px solid #eee;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
font-size: 100%;
|
||||
font: inherit;
|
||||
margin: 0 0 1.2rem;
|
||||
}
|
||||
|
||||
table tr:nth-child(2n +1) {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
table td {
|
||||
padding: 10px;
|
||||
}
|
||||
table h4 {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
table th {
|
||||
font-weight: bold;
|
||||
background-color: #888;
|
||||
color: #fff;
|
||||
vertical-align: top;
|
||||
text-align: left;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
code, tt {
|
||||
padding: 0 5px;
|
||||
white-space: nowrap;
|
||||
border: 1px solid #eaeaea;
|
||||
border-radius: 3px;
|
||||
background-color: #f8f8f8;
|
||||
color: #333333; }
|
||||
|
||||
|
||||
code {
|
||||
background-color: #fafafa;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
table code {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
table .thead2 {
|
||||
background: #ddd!important;
|
||||
color: #666;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
|
||||
.headerlink {
|
||||
font-size:50%;
|
||||
opacity: 0.25;
|
||||
vertical-align: super;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
h1:first-child {
|
||||
margin-top:0;
|
||||
}
|
||||
|
||||
#mkdocs-search-query {
|
||||
border: 1px solid #333;
|
||||
background:rgba(0,0,0,0.25);
|
||||
border-radius: 15px;
|
||||
color: #eee;
|
||||
outline: none;
|
||||
padding:6px 12px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue