Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace base64 CSS images with regular sprite PNGs/WEBPs? #20

Open
nolanlawson opened this issue Nov 26, 2015 · 5 comments
Open

Replace base64 CSS images with regular sprite PNGs/WEBPs? #20

nolanlawson opened this issue Nov 26, 2015 · 5 comments

Comments

@nolanlawson
Copy link
Owner

I think there may be a clever way to do this without having to download the PNG/WEBP files invidivually (also HTTP2 ought to help here). As is, I believe this is contributing to a startup lag on Chrome and may be the cause of perf issues in Firefox OS.

@samccone
Copy link
Contributor

could do the ol spritesheet hack here :)

@nolanlawson
Copy link
Owner Author

Spritesheets caused crazy bad performance on mobile, presumably due to the fact that each of the visible Pokémon was holding onto the entire spritesheet. :/

I'm wondering if a better solution is:

  • normal PNGs/WEBPs with url(/path/to/png)
  • service worker downloads one big binary (multipart?) and then stores them in IndexedDB as blobs.

@samccone
Copy link
Contributor

I was thinking a single spritesheet and then canvas elements to paint the single pokemon via a imagedata blob extracted from the master sheet :)

@nolanlawson
Copy link
Owner Author

Okay, that's actually really clever! :) I like it.

@samccone
Copy link
Contributor

it might be way worse though :) hard to say without trying

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants