瀏覽代碼

Merge pull request #20449 from ianpurvis/fix/video-texture-clone

VideoTexture: Fix error when detecting requestVideoFrameCallback
Mr.doob 4 年之前
父節點
當前提交
261c809e41
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      src/textures/VideoTexture.js

+ 6 - 0
src/textures/VideoTexture.js

@@ -33,6 +33,12 @@ VideoTexture.prototype = Object.assign( Object.create( Texture.prototype ), {
 
 	constructor: VideoTexture,
 
+	clone: function () {
+
+		return new this.constructor( this.image ).copy( this );
+
+	},
+
 	isVideoTexture: true,
 
 	update: function () {