如何将动画 gif 添加到场景中?

How can I add an animated gif to a scene?

在 three.js 中,如何添加动画 gif?

var materialTextured = new THREE.MeshBasicMaterial( {
        map: THREE.ImageUtils.loadTexture('images/pin.gif'),
        transparent: true,
        side: THREE.DoubleSide
    });
    var plane = new THREE.Mesh(new THREE.PlaneGeometry(200, 150), materialTextured);
    plane.position.x=250;
    plane.scale.x = 1;
    scene.add(plane);

据我所知Three.js不支持GIF贴图,但是可以将GIF文件转成视频,然后使用VideoTexture

同时,视频文件比GIF文件具有更好的压缩率,这将提高网络性能。