Procházet zdrojové kódy

Stupid-proofed TextureCubeNode a little bit better

Daniel Sturk před 6 roky
rodič
revize
b1a14ec505
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  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 +