|
@@ -5721,8 +5721,8 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
|
|
|
_gl.pixelStorei( _gl.UNPACK_FLIP_Y_WEBGL, texture.flipY );
|
|
|
|
|
|
- var isCompressed = texture instanceof THREE.CompressedTexture,
|
|
|
- isDataTexture = texture.image[0] instanceof THREE.DataTexture;
|
|
|
+ var isCompressed = texture instanceof THREE.CompressedTexture;
|
|
|
+ var isDataTexture = texture.image[ 0 ] instanceof THREE.DataTexture;
|
|
|
|
|
|
var cubeImage = [];
|
|
|
|
|
@@ -5751,14 +5751,16 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
|
|
|
if ( ! isCompressed ) {
|
|
|
|
|
|
- if ( isDataTexture )
|
|
|
+ if ( isDataTexture ) {
|
|
|
|
|
|
- _gl.texImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, glFormat, cubeImage[i].width, cubeImage[i].height, 0, glFormat, glType, cubeImage[i].data );
|
|
|
+ _gl.texImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, glFormat, cubeImage[ i ].width, cubeImage[ i ].height, 0, glFormat, glType, cubeImage[ i ].data );
|
|
|
|
|
|
- else
|
|
|
+ } else {
|
|
|
|
|
|
_gl.texImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, glFormat, glFormat, glType, cubeImage[ i ] );
|
|
|
|
|
|
+ }
|
|
|
+
|
|
|
} else {
|
|
|
|
|
|
var mipmap, mipmaps = cubeImage[ i ].mipmaps;
|