jaames / flipnote-player

🎬 Web player and video converter for animations made with Flipnote Studio; an animation app for the Nintendo DSi and 3DS
https://flipnote.rakujira.jp
MIT License
115 stars 8 forks source link

Background of canvas does not match white paper in dark mode #8

Closed thejsa closed 6 years ago

thejsa commented 6 years ago

image Presumably this could be fixed by adjusting the background of the canvas to match the paper colour - I'll take a look at this when I get home today.

jaames commented 6 years ago

Hey thanks for the report! That's... certainly odd. I haven't experienced this before.

A few things that would help diagnose the issue:

jaames commented 6 years ago

Also forgot to mention this is technically a flipnote.js issue.

You can see the default options being passed to getContext here -- maybe this needs alpha:false? Otherwise I expect it might be some weird browser thing with the call to clearColor here

thejsa commented 6 years ago
* What OS / browser / GPU was this on?

Debian 9; Mozilla Firefox ESR 60; Intel HD Graphics

  • Is it behaving like the canvas is totally transparent? That is, if you change the background colour of the element behind it, can you see that colour through the canvas? Seems so!
  • Is this the only sample Flipnote affected? No, all are
  • Any errors in the devtools console and/or network tab? Unable to check this at the moment, but I can later.
jaames commented 6 years ago

Thanks, I think I found the issue!

Firstly, setPaperColor was expecting colors to have an alpha channel (they don't), plus the webgl canvas was being created without using alpha : false to disable the transparency buffer.

Just pushed a fix to flipnote.js, so I'll pull that in here and rebuild in a second. :)

jaames commented 6 years ago

Should be live now, although I didn't bump the version since it's technically a dependency issue :P