Skip to content

Commit

Permalink
Editor: More Viewport.Info fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Sep 2, 2015
1 parent a32599e commit 7b7699a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions editor/js/Viewport.Info.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ Viewport.Info = function ( editor ) {

} else if ( geometry instanceof THREE.BufferGeometry ) {

vertices += geometry.attributes.position.array.length / 3;
if ( geometry.index !== null ) {

if ( geometry.index !== undefined ) {

triangles += geometry.index.array.length / 3;
vertices += geometry.index.count * 3;
triangles += geometry.index.count;

} else {

triangles += geometry.attributes.position.array.length / 9;
vertices += geometry.attributes.position.count;
triangles += geometry.attributes.position.count / 3;

}

Expand Down

0 comments on commit 7b7699a

Please sign in to comment.