How to load a gif (with transparency) on a plane in Aframe (glitch)?

情到浓时终转凉″ 提交于 2020-12-06 15:34:59

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/55960135/how-to-load-a-gif-with-transparency-on-a-plane-in-aframe-glitch

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!