performance
This commit is contained in:
parent
273d212568
commit
52bc3dff87
1 changed files with 0 additions and 15 deletions
15
index.js
15
index.js
|
@ -9,8 +9,6 @@ audio_element.src = "Jamie xx - Sleep Sound.mp3"
|
|||
let track
|
||||
let audio_context_analyzer
|
||||
|
||||
let prev_data = new Array()
|
||||
|
||||
function main() {
|
||||
audio_context = new AudioContext()
|
||||
|
||||
|
@ -61,19 +59,6 @@ function animate() {
|
|||
path += `Z `
|
||||
path = `<path width="100%" height="100%" d="${path}" stroke="none" fill="#c084fc"/>`
|
||||
|
||||
/**
|
||||
* compare FFTData to previous ones
|
||||
*/
|
||||
let matched_amount = 0
|
||||
for (let prev_dat in prev_data) {
|
||||
if (prev_dat == fft_data_array) {
|
||||
matched_amount += 1
|
||||
}
|
||||
}
|
||||
console.log(`Matched ${matched_amount} times!`)
|
||||
|
||||
prev_data.push(fft_data_array)
|
||||
|
||||
svg_canvas.innerHTML = path
|
||||
|
||||
const drawVisual = requestAnimationFrame(animate)
|
||||
|
|
Loading…
Reference in a new issue