Compare commits
No commits in common. "42eb01257b95683182933378034c9fc0256cdf73" and "761a33e5407b2eee85287845dcb2515fdcee9153" have entirely different histories.
42eb01257b
...
761a33e540
@ -678,19 +678,25 @@ class Networker {
|
||||
let key = dv.getUint8(1);
|
||||
let velocity = dv.getUint8(2) / 255;
|
||||
let id = dv.getUint8(3);
|
||||
piano.keyDown(key, velocity, id);
|
||||
if (id != this.id) {
|
||||
piano.keyDown(key, velocity, id);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 1: { // Key up
|
||||
let key = dv.getUint8(1);
|
||||
let sustain = dv.getUint8(2);
|
||||
let id = dv.getUint8(3);
|
||||
piano.keyUp(key, sustain, id);
|
||||
if (id != this.id) {
|
||||
piano.keyUp(key, sustain, id);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 2: { // Sustain release
|
||||
let id = dv.getUint8(1);
|
||||
piano.releaseSustain(id);
|
||||
if (id != this.id) {
|
||||
piano.releaseSustain(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user