Browse Source

VideoTexture: Set format to RGBFormat by default.

Mr.doob 6 years ago
parent
commit
714f3377e7
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/textures/VideoTexture.js

+ 3 - 0
src/textures/VideoTexture.js

@@ -2,10 +2,13 @@
  * @author mrdoob / http://mrdoob.com/
  * @author mrdoob / http://mrdoob.com/
  */
  */
 
 
+import { RGBFormat } from '../constants.js';
 import { Texture } from './Texture.js';
 import { Texture } from './Texture.js';
 
 
 function VideoTexture( video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ) {
 function VideoTexture( video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ) {
 
 
+	if ( format === undefined ) format = RGBFormat;
+
 	Texture.call( this, video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );
 	Texture.call( this, video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );
 
 
 	this.generateMipmaps = false;
 	this.generateMipmaps = false;