Преглед на файлове

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 );
 
 		}