Cleanup random

This commit is contained in:
Clément Le Bihan
2023-09-17 19:57:32 +02:00
parent 58af78b1d3
commit ad9bbbc2b9
2 changed files with 2 additions and 11 deletions

View File

@@ -77,7 +77,7 @@ const getPianoScene = (
this.cameras.main.setBounds(0, 0, this.partition.width, this.partition.height);
const dims = this.partition.getBounds();
// base ref normal cursor is 350px by 30px
// base ref normal cursor is 276px by 30px
this.cursor = this.add
.rectangle(0, 0, (dims.height * 30) / 276, dims.height, 0x31ef8c, 0.5)
.setOrigin(0, 0);
@@ -89,7 +89,6 @@ const getPianoScene = (
follow: this.cursor,
speed: { min: 10, max: 20 },
scale: { start: 0, end: 0.4 },
// rotate: { start: 0, end: 360 },
emitZone: { type: 'edge', source: this.cursor.getBounds(), quantity: 50 },
emitting: false,

View File

@@ -154,8 +154,6 @@ const PlayView = ({ songId, type, route }: RouteProps<PlayViewProps>) => {
return;
}
setMidiKeyboardFound(true);
// eslint-disable-next-line @typescript-eslint/no-unused-vars
let inputIndex = 0;
webSocket.current = new WebSocket(scoroBaseApiUrl);
webSocket.current.onopen = () => {
webSocket.current!.send(
@@ -257,13 +255,8 @@ const PlayView = ({ songId, type, route }: RouteProps<PlayViewProps>) => {
}
};
inputs.forEach((input) => {
// if (inputIndex != 0) {
// return;
// }
input.onmidimessage = (message) => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { command, channel, note, velocity } = parseMidiMessage(message);
const { command, note } = parseMidiMessage(message);
const keyIsPressed = command == 9;
if (keyIsPressed) {
setPressedKeys((prev) => {
@@ -286,7 +279,6 @@ const PlayView = ({ songId, type, route }: RouteProps<PlayViewProps>) => {
})
);
};
inputIndex++;
});
};
const onMIDIFailure = () => {