From 0fe654daa94760c54867daf494201b1b02676cef Mon Sep 17 00:00:00 2001 From: WestLangley Date: Wed, 31 Jan 2018 14:39:36 -0500 Subject: [PATCH] Honor groups in toNonIndexed() --- src/core/BufferGeometry.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/core/BufferGeometry.js b/src/core/BufferGeometry.js index c18bdb089ce63d..c6763df5754e6f 100644 --- a/src/core/BufferGeometry.js +++ b/src/core/BufferGeometry.js @@ -895,6 +895,15 @@ BufferGeometry.prototype = Object.assign( Object.create( EventDispatcher.prototy } + var groups = this.groups; + + for ( var i = 0, l = groups.length; i < l; i ++ ) { + + var group = groups[ i ]; + geometry2.addGroup( group.start, group.count, group.materialIndex ); + + } + return geometry2; },