Browse Source

fixed early-out for geometry that has index, but no position attribute

Tomasz Dysinski 5 years ago
parent
commit
905b55a4a3
1 changed files with 9 additions and 2 deletions
  1. 9 2
      src/renderers/WebGLRenderer.js

+ 9 - 2
src/renderers/WebGLRenderer.js

@@ -742,8 +742,15 @@ function WebGLRenderer( parameters ) {
 
 		//
 
-		if ( index !== null && index.count === 0 ) return;
-		if ( position === undefined || position.count === 0 ) return;
+		if ( index === null ) {
+
+			if ( position === undefined || position.count === 0 ) return;
+
+		} else if ( index.count === 0 ) {
+
+			return;
+
+		}
 
 		//