From ad9bbbc2b942fcf60d7877c603160c3787e8d210 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 17 Sep 2023 19:57:32 +0200 Subject: [PATCH] Cleanup random --- front/components/PartitionVisualizer/PhaserCanvas.tsx | 3 +-- front/views/PlayView.tsx | 10 +--------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/front/components/PartitionVisualizer/PhaserCanvas.tsx b/front/components/PartitionVisualizer/PhaserCanvas.tsx index 50c1b56..848ab41 100644 --- a/front/components/PartitionVisualizer/PhaserCanvas.tsx +++ b/front/components/PartitionVisualizer/PhaserCanvas.tsx @@ -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, diff --git a/front/views/PlayView.tsx b/front/views/PlayView.tsx index fb7df8a..790a556 100644 --- a/front/views/PlayView.tsx +++ b/front/views/PlayView.tsx @@ -154,8 +154,6 @@ const PlayView = ({ songId, type, route }: RouteProps) => { 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) => { } }; 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) => { }) ); }; - inputIndex++; }); }; const onMIDIFailure = () => {