【问题标题】:Video Texture Not Showing On Cube多维数据集上未显示视频纹理
【发布时间】:2013-01-11 08:11:55
【问题描述】:

嘿,伙计们,我想弄清楚为什么我的Cube 没有显示我添加的视频纹理...它显示了一个图像,实现起来非常简单。但是当尝试映射视频纹理时它没有做它...

video = document.createElement('video');
video.width = 320;
video.height = 240;
video.autoplay = true;
video.src = "my video.....";

var videoTexture = new THREE.Texture( video );

var material = new THREE.MeshBasicMaterial( { vertexColors: THREE.FaceColors,
 map:texture, map: videoTexture} );

// render update....
 if( video.readyState === video.HAVE_ENOUGH_DATA ){ videoTexture.needsUpdate = true; }

但它仍然没有在立方体上显示我的视频。

感谢任何帮助。

【问题讨论】:

    标签: javascript three.js webgl


    【解决方案1】:

    您在那里定义了 2 个地图:

    map:texture, map: videoTexture
    

    也许第一个覆盖了第二个。

    【讨论】:

      猜你喜欢
      • 2020-01-28
      • 2016-10-24
      • 1970-01-01
      • 1970-01-01
      • 2016-07-28
      • 1970-01-01
      • 1970-01-01
      • 2023-03-04
      相关资源
      最近更新 更多