-
Notifications
You must be signed in to change notification settings - Fork 491
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
Bug when no frameMax parameter is specified to Loader.spritesheet #448
Comments
The spritesheet loaded has 57x31 square sprites of size 16 pixels. I think the code should be:
|
Does this work as expected if you use |
Yes, this would give the correct result result mathematically:
However, this is still a bug ! Passing If this spritesheet had a 2 pixels margin, we could not use the |
I think The definition is unclear, and it may not be the best one, but since it's always worked this way, I'd rather just change the documentation to explain it better. I'm open to feedback though. margin = -1, spacing = 1margin = 0, spacing = 1margin = 1, spacing = 1 |
I dislike the negative margin concept, but I don't have any strong argument against simply clarifying this in the documentation. |
I think even my understanding was wrong, and the docs are incorrect. |
So according to the code,
So that would give a layout something like
|
This bug occurs only from the 1680th frame in the spritesheet
This is a bug in the API:
?1767
query string fixing theframeMax
parameter toLoader.spritesheet
, the same sprite should be displayedframeMax
is passed toLoader.spritesheet
(default value is-1
), the first sprite of the spritesheet is displayed instead. But all is fine if we try to render the sprite before (1679th one)There is the code used in the live example:
The API function called is
Loader.spritesheet
, but I think the issue relies inAnimationParser.spriteSheet
The text was updated successfully, but these errors were encountered: