如何在Aframe(毛刺)中的平面上加载gif(透明)? [英] How to load a gif (with transparency) on a plane in Aframe (glitch)?
问题描述
嘿,我是Aframe的新手,他们正在尝试在空间网络环境中设置一堆gif.
Hey guys I'm new to Aframe and trying to set up a whole bunch of gifs in a spatial web environment.
我在将gif加载到飞机上时有些卡住.
I'm getting a bit stuck in loading a gif on a plane.
我已经通过Aframe(小故障)的资产文件夹加载了图片, 当前看起来像这样:
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>
现在会显示gif,但它是静态的.我怎样才能开始玩呢?
Right now the gif shows up, but it is static. How could I get it to start playing?
推荐答案
默认情况下,A帧不支持GIF.您需要使用第三方组件来呈现GIF: https://github.com/mayognaise /aframe-gif-shader
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
这篇关于如何在Aframe(毛刺)中的平面上加载gif(透明)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!