Explorar o código

Fixed renderer error caused by unknown material.defaultAttributeValues

James Baicoianu %!s(int64=11) %!d(string=hai) anos
pai
achega
b11df4cda4
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/renderers/WebGLRenderer.js

+ 1 - 1
src/renderers/WebGLRenderer.js

@@ -2493,7 +2493,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 					enableAttribute( attributePointer );
 					_gl.vertexAttribPointer( attributePointer, attributeSize, _gl.FLOAT, false, 0, startIndex * attributeSize * 4 ); // 4 bytes per Float32
 
-				} else if ( material.defaultAttributeValues ) {
+				} else if ( material.defaultAttributeValues && material.defaultAttributeValues[ attributeName ] ) {
 
 					if ( material.defaultAttributeValues[ attributeName ].length === 2 ) {