This commit is contained in:
Devine Lu Linvega 2019-06-22 08:17:56 +09:00
parent df4bf423f0
commit a3e43ccaa1
2 changed files with 4 additions and 4 deletions

View File

@ -18,7 +18,7 @@ npm start
## UDP Controls
Dotgrid can be controlled by UDP via the port `49160`. It expects messages up to 6 characters.
Dotgrid can be controlled by UDP via the port `49161`. It expects messages up to 6 characters.
- **layer** `0/1/2`
- **type** `l/c/r/z` (`l`:line, `c`:clock-wise arc, `r`: cc-wise arc, `z`: close, `.`:clear, `*`: draw)

View File

@ -28,11 +28,11 @@ function Listener (dotgrid) {
}
function draw () {
dotgrid.renderer.update()
dotgrid.renderer.update(true)
}
function parse (msg) {
if (msg === '') {
if (msg === '' || msg === '*') {
return draw()
}
if (['0', '1', '2'].indexOf(msg) > -1) {
@ -65,5 +65,5 @@ function Listener (dotgrid) {
server.close()
})
this.server.bind(49160)
this.server.bind(49161)
}