Browse Source

Fixed renderer error caused by unknown material.defaultAttributeValues

James Baicoianu 11 năm trước cách đây
mục cha
commit
b11df4cda4
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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 ) {