瀏覽代碼

Bug fix in toNonIndexed - normalized

When using a normalized buffer attribute toNonIndexed loses it.
Shai Ghelberg 5 年之前
父節點
當前提交
0c7b98d987
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/core/BufferGeometry.js

+ 2 - 1
src/core/BufferGeometry.js

@@ -891,6 +891,7 @@ BufferGeometry.prototype = Object.assign( Object.create( EventDispatcher.prototy
 
 			var array = attribute.array;
 			var itemSize = attribute.itemSize;
+			var normalized = attribute.normalized === true;
 
 			var array2 = new array.constructor( indices.length * itemSize );
 
@@ -908,7 +909,7 @@ BufferGeometry.prototype = Object.assign( Object.create( EventDispatcher.prototy
 
 			}
 
-			return new BufferAttribute( array2, itemSize );
+			return new BufferAttribute( array2, itemSize, normalized );
 
 		}