Added docs and layer support for UDP
This commit is contained in:
parent
dd549617b5
commit
fc46080e4b
@ -16,6 +16,15 @@ npm install
|
||||
npm start
|
||||
```
|
||||
|
||||
## UDP Controls
|
||||
|
||||
Dotgrid can be controlled by UDP via the port `49160`. It expects messages of 6 characters.
|
||||
|
||||
- **layer** `0/1/2`
|
||||
- **type** `l/a/r/c`
|
||||
- **from** `0-z``0-z`
|
||||
- **to** `0-z``0-z`
|
||||
|
||||
## Extras
|
||||
|
||||
- This application supports the [Ecosystem Theme](https://github.com/hundredrabbits/Themes).
|
||||
|
@ -18,6 +18,8 @@ function Listener (dotgrid) {
|
||||
}
|
||||
|
||||
function operate (data) {
|
||||
if(!dotgrid.tool.layers[data.layer]){ return }
|
||||
dotgrid.tool.index = data.layer
|
||||
dotgrid.tool.addSegment(data.type, [data.from, data.to])
|
||||
dotgrid.renderer.update()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user