@@ -12,7 +12,7 @@ THREE.HDRCubeTextureLoader = function (manager) {
}
THREE.HDRCubeTextureLoader.prototype.load = function(type, urls, onLoad, onProgress, onError) {
- var texture = new THREE.CubeTexture( [] );
+ var texture = new THREE.CubeTexture();
texture.type = type;
texture.encoding = (type === THREE.UnsignedByteType) ? THREE.RGBEEncoding : THREE.LinearEncoding;
@@ -14,7 +14,7 @@ THREE.CubeTextureLoader.prototype = {
load: function ( urls, onLoad, onProgress, onError ) {
var loader = new THREE.ImageLoader( this.manager );
loader.setCrossOrigin( this.crossOrigin );
@@ -4,6 +4,7 @@
THREE.CubeTexture = function ( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ) {
+ images = images !== undefined ? images : [];
mapping = mapping !== undefined ? mapping : THREE.CubeReflectionMapping;
THREE.Texture.call( this, images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );