-
Notifications
You must be signed in to change notification settings - Fork 83
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
GIF does not animate in runtime, only first frame shown (C2 GIFs animated in runtime) #1077
Comments
Did you import animation from (gif) file? I ask as there is no animation in your example. you cant just add a gif as sprite you need to import it |
I imported GIF into sprite animation (import file from animation mode) |
OK, strange, there are no animation frames in your example so there is nothing for construct to animate. Which indicates that the import didn't work. Not that the animation isn't playing. |
I'm not in the office today, but thought I'd chime in. I believe this has come up before, and the outcome was that there's no method for extracting animations from GIF files in the web browser. So short of writing a GIF decoder ( a lot of complex code with weird edge cases ) there wasn't much that could be done. So tl;dr GIF files are treated as a static image. |
Oh yea youre right I tried it on my phone. That's a bit pants, |
I can't find any related issue to it, so maybe it never made it as far as github or I could just be making it up. I'll mark it as a C2 parity bug and will discuss it with the others when I'm back in the office. @AshleyScirra might chime in when he has a chance, he might remember better. |
The project only has one frame in the sprite which is why it doesn't animate. Unfortunately C3 can only import the first frame of a .gif, because browsers don't provide the necessary APIs to split apart their frames. It should be straightforward to find a tool to extract a gif to a sequence or strip of PNG images, which can be imported to C3. GIF is an ancient format now and is already falling out of use - often on the web today when you see an animated image labelled "gif", it's really an MPEG-4 or WebM video, because GIF has poor compression ratios. APNG is a more modern equivalent, but we're still missing the browser APIs to read them. File a feature request here if you really want support for importing animated image formats: https://construct3.ideas.aha.io/ |
Ok, will file enhancement request. Likely not GIF, but animated texture / sprite (e.g. WebM), native playback (not decompose to sprites, which blows up memory.) |
make gif import happen, this is terrible |
Problem description
GIFs on sprite do no animate during runtime.
Attach a .c3p
GIFFail.zip
A minimal Construct 3 project (.c3p) is required to be attached. Please see the guidelines
Steps to reproduce
Observed result
GIF does not animate.
Expected result
GIF animated as it does in C2
Affected browsers
System details
Windows 10, Chrome
The text was updated successfully, but these errors were encountered: