From 3c1b0a32852dddf52c4cb222cb906c50348fe879 Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Mon, 23 Oct 2023 00:22:38 +0200 Subject: [PATCH] cleaning --- src/AudioVisualisation.ts | 5 ++--- src/main.ts | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/AudioVisualisation.ts b/src/AudioVisualisation.ts index b28fcae..5ce3192 100644 --- a/src/AudioVisualisation.ts +++ b/src/AudioVisualisation.ts @@ -147,7 +147,6 @@ export const runOscilloscope = ( return; } - // Update analyzer and dataArray if fftSize changes if (analyzer.fftSize !== app.osc.fftSize) { analyzer = getAnalyser(app.osc.fftSize); dataArray = new Float32Array(analyzer.frequencyBinCount); @@ -180,7 +179,7 @@ export const runOscilloscope = ( } else if (app.osc.orientation === "horizontal") { let x = 0; const sliceWidth = (WIDTH * 1.0) / dataArray.length; - const yOffset = HEIGHT / 4; // Adjust this to move the oscilloscope up + const yOffset = HEIGHT / 4; for (let i = 0; i < dataArray.length; i++) { const v = dataArray[i] * 0.5 * HEIGHT * app.osc.size; const y = v + yOffset; @@ -191,7 +190,7 @@ export const runOscilloscope = ( } else { let y = 0; const sliceHeight = (HEIGHT * 1.0) / dataArray.length; - const xOffset = WIDTH / 4; // Adjust this to move the oscilloscope to the side + const xOffset = WIDTH / 4; for (let i = 0; i < dataArray.length; i++) { const v = dataArray[i] * 0.5 * WIDTH * app.osc.size; const x = v + xOffset; diff --git a/src/main.ts b/src/main.ts index 471b9c0..c7a9ac8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -60,7 +60,7 @@ export class Editor { interface: ElementMap = {}; blinkTimeouts: Record = {}; osc: OscilloscopeConfig = { - enabled: true, + enabled: false, color: "#fdba74", thickness: 4, fftSize: 256,