浏览代码

CubeTexture: Use RGBFormat by default.

Mr.doob 6 年之前
父节点
当前提交
fe45bddec7
共有 1 个文件被更改,包括 2 次插入1 次删除
  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 );