2
0
Эх сурвалжийг харах

VideoTexture: Ensure clone does not call constructor without a video

  Fixes `TypeError: video is not an Object.` regression in #19906
Ian Purvis 5 жил өмнө
parent
commit
4a8e387c52

+ 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 () {