未验证 提交 59a211d8 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #13143 from donmccurdy/editor-tri-count

Editor: Fix triangle counting for indexed buffer geometry.
......@@ -53,14 +53,14 @@ Viewport.Info = function ( editor ) {
} else if ( geometry instanceof THREE.BufferGeometry ) {
vertices += geometry.attributes.position.count;
if ( geometry.index !== null ) {
vertices += geometry.index.count * 3;
triangles += geometry.index.count;
triangles += geometry.index.count / 3;
} else {
vertices += geometry.attributes.position.count;
triangles += geometry.attributes.position.count / 3;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册