docs: more

This commit is contained in:
bordun 2020-04-06 15:50:03 +02:00
parent fceddd3cb4
commit f5682fe9db
8 changed files with 60 additions and 13 deletions

View file

@ -5,10 +5,11 @@ Client options can be set either with the server's `--client-options` option, or
|----|----|----|----|
| hdpi | 1 / 0 | 0 | enable high resolution canvas |
| forceHdpi | number | 0 | force canvas scaling (ignore `hdpi`) |
| doubletab | number | 375 | sets the double tap/click time thershold in milliseconds |
| doubletab | number | 375 | sets the double tap/click time threshold in milliseconds |
| zoom | number | 1 | sets the initial zoom |
| framerate | number | 60 | limit canvas drawing framerate |
| lang | string | *system_default* | use a different language than the default if available (available languages: en, fr, ru) |
| lang | string | *system_default* | use a different language than the default if available (available languages: en, fr) |
| id | string | *random_id* | client's unique id (use with caution: two clients should never have the same id) |
Example:

View file

@ -1 +0,0 @@
!!! warning "Incomplete documentation"

View file

@ -11,7 +11,7 @@
- Export: export a session file to the client's filesystem
- State
- Store: save all widgets' state to a persistent slot (stored in the client's cache)
- Recall: apply state storer in the persistent slot
- Recall: apply state storer in the persistent slot (updated widgets may send messages)
- Send All: make all widgets send their current value
- Open: browse state files on the server
- Save / Save as: save state file on the server

View file

@ -34,6 +34,7 @@ Selected widget's properties are displayed and can be modified in the inspector.
- 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.
- Clicking on a property name spawns a help modal window
## Project tree

View file

@ -1,13 +1,60 @@
!!! warning "Incomplete documentation"
## Interaction
## Receiving / sending messages
## Interactions
These are interaction events widgets are likely to respond to:
| Mouse | Touch | Description |
|---|---|---|
| Click | Tap | Handled at pressing time, not releasing. |
| Double Click | Double Tap | Some widgets handle double click / tap events. |
| Mousedown | Tap | Handled at pressing time, not releasing. |
| Click | Click | Handled at release time. |
| Double Click | Double Tap | Some widgets handle double click / double tap events. |
| Drag | Drag | The widgets respond to mouse and touch drag gestures with a 1:1 precision ratio. |
Widgets sensibility can be tuned with the `sensibility` property. Single-touch widgets (i.e. all widgets except `mutlixy` and `range`) also accept an alternate interaction event for fine control.
| Mouse | Touch | Description |
|---|---|---|
| `Ctrl` + Drag | / | Holding the `Ctrl` key while dragging with the mouse increases the gesture's precision by 10.|
| / | Two-fingers drag (single target) | Using two fingers on a single-touch target increases the gesture's precision by 10. |
| / | Two-fingers drag | Using two fingers on a single-touch target increases the gesture's precision by 10. |
## Sending messages
When interacted with, widgets with at least one target (including the server's defaults) send osc messages of the following form:
```
/address ...preArgs ...value
```
If they widget has MIDI targets, the server will try to convert the osc message into a MIDI message (see [MIDI messages](../midi/midi-messages.md)).
## Receiving messages
When an osc message is received, it updates every widgets that meet the following conditions
- exact same `address`
- same `preArgs`
The remaining arguments after `preArgs` are passed to the widget.
When a MIDI message is received, it's converted into an osc message (see [MIDI messages](../midi/midi-messages.md)) and follows the same rules, except that only the widgets that include the emitting MIDI device in their targets will be able to receive it.
## Widget synchronization
Within a single client's scope, there are multiple ways to synchronize widgets:
- If they share the same `id`: in this case, the synchronized widget doesn't send any osc/midi message. This case is mostly used for widget cloning.
- If they share a `linkId`: in this case, the synchronized widget sends its osc/midi message normally.
- If their `value` properties depend on each other using the [advanced syntaxes](./advances-syntaxes.md)
- Using [scripting](./scripting.md)
## Client synchronization
From a client to another, widgets are automatically synchronized if they share the following properties:
- `address`
- `preArgs`
- `targets`

View file

@ -44,7 +44,6 @@ nav:
- MIDI messages: docs/midi/midi-messages.md
- Custom module:
- docs/custom-module/custom-module.md
- docs/custom-module/examples.md
- docs/custom-module/managing-big-modules.md
- Customization:
- docs/customization/themes.md

View file

@ -124,6 +124,7 @@ class Widget extends EventEmitter {
'- If no target is set, messages can still be sent if the server has default targets',
'- The server\'s default targets can be bypassed by setting one of the items to `null`'
]},
ignoreDefaults: {type: 'boolean', value: false, help: 'Set to `true` to ignore the server\'s default targets'},
bypass: {type: 'boolean', value: false, help: 'Set to `true` to prevent the widget from sending any osc message'}
}