提交 129a32c7 编写于 作者: M Mugen87

VideoTexture: Start update when first frame is loaded

上级 d35ce017
......@@ -9,7 +9,16 @@ function VideoTexture( video, mapping, wrapS, wrapT, magFilter, minFilter, forma
Texture.call( this, video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );
this.generateMipmaps = false;
this.needsUpdate = true;
var scope = this;
// fires when the first frame of the media has finished loading.
video.addEventListener( 'loadeddata', function () {
scope.needsUpdate = true;
} );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册