2

Hey guys I'm new to Aframe and trying to set up a whole bunch of gifs in a spatial web environment.

I'm getting a bit stuck in loading a gif on a plane.

I've loaded the image through the assets folder of Aframe (glitch), currently it looks like this:

   <a-assets>

    <img id="dance" src="https://cdn.glitch.com/89b3ce36-3eac-4bb0-865c-585a7fe58409%2Fdance.gif?1556817051483.gif"  >

  </a-assets>

  <a-plane src="#dance" position="5 3 -5" transparent="true" ></a-plane>

Right now the gif shows up, but it is static. How could I get it to start playing?

Marijn
  • 21
  • 1
  • 5

1 Answers1

2

A-Frame does not support GIFs by default. You need to use a third-party component to render GIFs: https://github.com/mayognaise/aframe-gif-shader

brianpeiris
  • 10,735
  • 1
  • 31
  • 44
  • 1
    I tried with gifs with a transparent background, and somehow the frames all overlap instead of show one by one. (non-transparent gif load normally, as you can see here: https://franks.glitch.me/ ) Any ideas on how to fix that? :) – Marijn May 05 '19 at 11:08
  • 1
    Hi @Marijn, I did some test and have found that aframe-gif-shader works OK with aframe v 0.9.0 ... Unfortunately with 1.0.x it doesn't. If you found the solution, it would be great you share :) Regards – Litta Hervi Jul 29 '20 at 22:38