소스 검색

Editor: Fixed cubemaps.

Mr.doob 12 년 전
부모
커밋
63e8599d65
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      editor/js/libs/ui.three.js

+ 2 - 2
editor/js/libs/ui.three.js

@@ -104,7 +104,7 @@ UI.CubeTexture = function ( position ) {
 
 	var scope = this;
 
-	this.texture = new THREE.Texture( [], new THREE.CubeReflectionMapping() );
+	this.texture = null;
 
 	this.dom = document.createElement( 'input' );
 	this.dom.type = 'file';
@@ -124,7 +124,7 @@ UI.CubeTexture = function ( position ) {
 				var image = document.createElement( 'img' );
 				image.addEventListener( 'load', function( event ) {
 
-					scope.texture.image = [ this, this, this, this, this, this ];
+					scope.texture = new THREE.Texture( [ this, this, this, this, this, this ], new THREE.CubeReflectionMapping() )
 					scope.texture.needsUpdate = true;
 
 					if ( scope.onChangeCallback ) scope.onChangeCallback();