소스 검색

Stupid-proofed TextureCubeNode a little bit better

Daniel Sturk 6 년 전
부모
커밋
b1a14ec505
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      examples/js/nodes/misc/TextureCubeNode.js

+ 2 - 1
examples/js/nodes/misc/TextureCubeNode.js

@@ -27,7 +27,8 @@ TextureCubeNode.prototype.generate = function ( builder, output ) {
 			uv_20 = this.uv.build( builder ) + '.uv_20',
 			t = this.uv.build( builder ) + '.t';
 
-		var format = this.value.value.encoding || THREE.LinearEncoding;
+		var texture = this.value && this.value.value;
+		var format = texture && texture.encoding || THREE.LinearEncoding;
 		var decoding = ColorSpaceNode.prototype.getDecodingMethod(format);
 		function decode(input) {
 			return decoding[0] + '( ' + input +