Skip to content

Commit

Permalink
added a small comment for later
Browse files Browse the repository at this point in the history
  • Loading branch information
Geoxor committed Jun 23, 2022
1 parent 28389e2 commit 8445ef5
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/renderer/components/Spectrum.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,17 @@ onMounted(() => {
canvasCtx.value.fillRect(i * barWidth, SPECTRUM_HEIGHT - barHeight, 1, barHeight);
}
// // Downscale the canvas to pixelize so it fits with the aesthetic of the app
// canvasCtx.value.drawImage(spectrum, 0, 0, DOWNSCALED_WIDTH, DOWNSCALED_HEIGHT);
// canvasCtx.value.clearRect(0, DOWNSCALED_HEIGHT, SPECTRUM_WIDTH, SPECTRUM_HEIGHT - (DOWNSCALED_HEIGHT))
// canvasCtx.value.clearRect(DOWNSCALED_WIDTH, 0, SPECTRUM_WIDTH, DOWNSCALED_HEIGHT);
// canvasCtx.value.drawImage(spectrum, 0, 0, DOWNSCALED_WIDTH, DOWNSCALED_HEIGHT, 0, 0, SPECTRUM_WIDTH, SPECTRUM_HEIGHT);
// // this line clears the downscaled image thats drawn at the
// // top left of the canvas by drawing a white rectangle over it
// // its kinda trollface but it works i guess
// // TODO: refactor this later because some low freq values get clipped under it
// canvasCtx.value.clearRect(0, 0, DOWNSCALED_WIDTH, DOWNSCALED_HEIGHT);
// TODO: make this into a toggleable option in the settings
// Downscale the canvas to pixelize so it fits with the aesthetic of the app
canvasCtx.value.drawImage(spectrum, 0, 0, DOWNSCALED_WIDTH, DOWNSCALED_HEIGHT);
canvasCtx.value.clearRect(0, DOWNSCALED_HEIGHT, SPECTRUM_WIDTH, SPECTRUM_HEIGHT - (DOWNSCALED_HEIGHT))
canvasCtx.value.clearRect(DOWNSCALED_WIDTH, 0, SPECTRUM_WIDTH, DOWNSCALED_HEIGHT);
canvasCtx.value.drawImage(spectrum, 0, 0, DOWNSCALED_WIDTH, DOWNSCALED_HEIGHT, 0, 0, SPECTRUM_WIDTH, SPECTRUM_HEIGHT);
// this line clears the downscaled image thats drawn at the
// top left of the canvas by drawing a white rectangle over it
// its kinda trollface but it works i guess
// TODO: refactor this later because some low freq values get clipped under it
canvasCtx.value.clearRect(0, 0, DOWNSCALED_WIDTH, DOWNSCALED_HEIGHT);
!shouldFuckOff && requestAnimationFrame(draw);
Expand Down

0 comments on commit 8445ef5

Please sign in to comment.