Explorar o código

WebGLRenderer: Fixed non-indexed geometry in projectObject

Mugen87 %!s(int64=9) %!d(string=hai) anos
pai
achega
974001fca1
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/renderers/WebGLRenderer.js

+ 2 - 2
src/renderers/WebGLRenderer.js

@@ -1438,7 +1438,7 @@ function WebGLRenderer( parameters ) {
 
 
 							if ( groups.length === 0 ) {
 							if ( groups.length === 0 ) {
 
 
-								if ( geometry.index !== undefined ) {
+								if ( geometry.index !== null ) {
 
 
 									// indexed geometry
 									// indexed geometry
 
 
@@ -1448,7 +1448,7 @@ function WebGLRenderer( parameters ) {
 
 
 									// non-indexed geometry
 									// non-indexed geometry
 
 
-									geometry.addGroup( 0, geometry.position.count / 3 );
+									geometry.addGroup( 0, geometry.attributes.position.count );
 
 
 								}
 								}
 
 

粤ICP备19079148号