Reputation: 2171
I'm really confused about the use of GIF animations in threejs. There are no examples on google, I can't find any statement about gifs, are they supported or no?
I can not believe that threejs has a problem with GIF animations. Is it really hard to implement?
I only want to add to my space rocket prepared to fire from my graphic designer.
Any clues? Please I'm run out of the ideas.
Upvotes: 3
Views: 2010
Reputation: 31026
You can't directly use an animated GIF
in three.js
as a texture. You have the following options:
GIF
to a video (e.g. MP4
) and then use THREE.VideoTexture.THREE.Texture
. The animation is done by offsetting the respective texture coordinates per frame.SuperGif
like describe in another stackoverflow post. Related discussion at the three.js
forum: GIF as animated texture?
three.js R103
Upvotes: 6