-
Notifications
You must be signed in to change notification settings - Fork 842
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
Support variable-size custom sprite sheets #211
Comments
Makes sense, I can see how that would be useful for anyone providing a custom sprite sheet. Just to be sure this is really what you want though: The 52x52 is the sprite columns per rows, not the size of the emojis themselves. Having a different sprite rows/columns also implies that you’re using a different custom dataset, because the one that is provided by Emoji Mart is based on a 52x52 grid and provides the If by too small you meant you need bigger emojis (Emoji Mart can provide up to 64px), then all you need to do is build a new sprite with bigger emojis with the same position as the ones provided. The data also account for a gutter between each emoji (I think there’s a 1px space between each). For example, see the difference between these 2 sheets: Quite different in size, but both still have a 52x52 grid. |
@EtienneLem yup! I actually want to use a sprite sheet that isn't based on a square 52x52 grid, but a rectangular grid instead. I'm providing a custom dataset as well which takes this into account when calculating the x and y positions on the sheet. Opened the PR for this: #212. |
Use case: Allow custom sprite sheets to use variable sizes (i.e. non-52x52). Currently, you can use a custom sprite sheet, but that sprite sheet is required to be 52x52. This is too small for one of my sprite sheets, but passing in sprite sheet sizes as props isn't allowed by emoji-mart.
I'm currently working on a PR for this.
The text was updated successfully, but these errors were encountered: