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

Having the possibility to set a maximum size for the sprite? #35

Closed
tleunen opened this issue Feb 13, 2014 · 6 comments
Closed

Having the possibility to set a maximum size for the sprite? #35

tleunen opened this issue Feb 13, 2014 · 6 comments

Comments

@tleunen
Copy link

tleunen commented Feb 13, 2014

Is there a limit in the size (width/height or even weight) of the sprite we shouldn't use in a browser (web or mobile) ? If yes, having the possibility to put a limit and having spritesmith automatically creating a second sprite image could be nice.

I'm starting having a pretty big sprite (2000x2000) and wondering the impact on the browser if I reach 3k or 4k...

@twolfson
Copy link
Owner

Unfortunately, paging was not a thought in the initial design of spritesmith and does not feel like it would easily be introduced. Can you explain why there is such a large sprite you are working with?

@tleunen
Copy link
Author

tleunen commented Feb 13, 2014

I'm using the tool for the spritesheet for a pretty big project with a lot of images. So one of my spritesheet (composed of jpeg images only) is about 2300x1700 at the moment.

I can still split it manually but it would be nice to have it done automatically.

@twolfson
Copy link
Owner

I think we are focusing on the wrong problem. The point of sprites is to save HTTP requests. However, when you are sending a very large image, it increases perceived page load and is more detrimental than beneficial.

In cases like this, it is best to have small set of sprites which are needed for the initial page load. Then, any larger images can be lazy loaded in.

@tleunen
Copy link
Author

tleunen commented Feb 13, 2014

In my project, I need to preload everything before starting the app. So I can't really do lazy loading in this case.

@twolfson
Copy link
Owner

Even so, spritesmith was built/designed for websites. It does not have a good channel for adding in paging. If we add anything for it, it will be more of an after thought. There is probably some benefit to building a sprite generator for gaming engines, both in focus and feature set.

@tleunen
Copy link
Author

tleunen commented Feb 13, 2014

Yep for sure. Thanks ;)

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