Browse Source

CubeTexture: Use RGBFormat by default.

Mr.doob 6 years ago
parent
commit
fe45bddec7
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/textures/CubeTexture.js

+ 2 - 1
src/textures/CubeTexture.js

@@ -3,12 +3,13 @@
  */
 
 import { Texture } from './Texture.js';
-import { CubeReflectionMapping } from '../constants.js';
+import { CubeReflectionMapping, RGBFormat } from '../constants.js';
 
 function CubeTexture( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding ) {
 
 	images = images !== undefined ? images : [];
 	mapping = mapping !== undefined ? mapping : CubeReflectionMapping;
+	format = format !== undefined ? format : RGBFormat;
 
 	Texture.call( this, images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding );