Skip to content

Commit

Permalink
Merge pull request #5 from Wolfyxon/revert-4-master
Browse files Browse the repository at this point in the history
Revert "Updated JS to actually invert properly."
  • Loading branch information
Wolfyxon authored May 20, 2024
2 parents 233bb56 + 57eb156 commit 884dff2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/test/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ window.addEventListener("load", () => {
for(let x = 0; x < frame.width; x++) {
const c = frame.getColor(x, y);

if(chkInvert.checked) ctx.fillStyle = `rgb(${c.r},${c.g},${c.b})`;
else ctx.fillStyle = `rgb(${c.b},${c.g},${c.r})`;
if(chkInvert.checked) ctx.fillStyle = `rgb(${c.b},${c.g},${c.r})`;
else ctx.fillStyle = `rgb(${c.r},${c.g},${c.b})`;

const w = canvas.width / video.width;
const h = canvas.height / video.height;
Expand Down Expand Up @@ -80,4 +80,4 @@ window.addEventListener("load", () => {

btnPlay.addEventListener("click", play);

});
});

0 comments on commit 884dff2

Please sign in to comment.