Browse Source

Fixed renderer error caused by unknown material.defaultAttributeValues

James Baicoianu 11 years ago
parent
commit
b11df4cda4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/renderers/WebGLRenderer.js

+ 1 - 1
src/renderers/WebGLRenderer.js

@@ -2493,7 +2493,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 					enableAttribute( attributePointer );
 					enableAttribute( attributePointer );
 					_gl.vertexAttribPointer( attributePointer, attributeSize, _gl.FLOAT, false, 0, startIndex * attributeSize * 4 ); // 4 bytes per Float32
 					_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 ) {
 					if ( material.defaultAttributeValues[ attributeName ].length === 2 ) {