Explorar o código

Update WebGLRenderer.js

Fix for geometry.maxInstancedCount == 0
jfranc %!s(int64=9) %!d(string=hai) anos
pai
achega
86fed4c410
Modificáronse 1 ficheiros con 4 adicións e 3 borrados
  1. 4 3
      src/renderers/WebGLRenderer.js

+ 4 - 3
src/renderers/WebGLRenderer.js

@@ -901,9 +901,10 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 		}
 
-		if ( geometry instanceof THREE.InstancedBufferGeometry && geometry.maxInstancedCount > 0 ) {
-
-			renderer.renderInstances( geometry, drawStart, drawCount );
+		if ( geometry instanceof THREE.InstancedBufferGeometry ) {
+			if( geometry.maxInstancedCount > 0 ) {
+				renderer.renderInstances( geometry, drawStart, drawCount );
+			}
 
 		} else {