-
-
Notifications
You must be signed in to change notification settings - Fork 183
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
loadAnimation() fails parsing filenames with short non-numeric prefix #197
Comments
Sorry, I can't reproduce that. I encounter no issues when using assets named cog0001 etc |
Hello, the issue actually lies if there is one or more digits in the whole path before the file name itself. In such conditions, for my file names to be taken into account.. I have to rename them with an additional padding 0 and have my loadAnimation() calls use one 0 of padding fewer as reality... In my above comment's code excerpt, variables digits1 and digits2 should be computed on |
This does not prevent me from telling you, thanks for p5.play!! It spares me a lot of work.. :) |
Related to myselfhimself/BerlinWallBreaker#1 |
This is fixed in this PR https://github.com/molleindustria/p5.play/pull/175 |
It says there is a conflict in the PR, I have no idea of how to solve it |
I can try to make a new fresher PR or alter it
čt 27. 5. 2021 v 14:25 odesílatel Paolo Pedercini ***@***.***>
napsal:
… It says there is a conflict in the PR, I have no idea of how to solve it
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://github.com/molleindustria/p5.play/issues/197#issuecomment-849588511>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJU5QSWRI7GMDH6J3D3GW3TPY23ZANCNFSM4XXKL5VA>
.
|
Fixes quinton-ashley#197 . This is a tiny mergeable variant of PR https://github.com/molleindustria/p5.play/pull/175 which covers other things.
I created a simpler PR thanks to @keithohara 's former work on PR #175 , feel free to merge. |
Thank you so much! |
Thank you too! |
Hello,
for a call like:
var cog1 = loadAnimation('sprites/food/level3/bricks/cog0001.png', 'sprites/food/level3/bricks/cog0002.png');
an error will be raised by p5.js:
Warning undefined frame 0
Step by step debugging of p5.play.js shows:
I suspect that the issue is related to the filename prefix is too short (cog) vs. the
4+digits1
hardcoded substring value which should be computed dynamically instead.:)
The text was updated successfully, but these errors were encountered: