Pārlūkot izejas kodu

Bug fix in toNonIndexed - normalized

When using a normalized buffer attribute toNonIndexed loses it.
Shai Ghelberg 5 gadi atpakaļ
vecāks
revīzija
0c7b98d987
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  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 array = attribute.array;
 			var itemSize = attribute.itemSize;
 			var itemSize = attribute.itemSize;
+			var normalized = attribute.normalized === true;
 
 
 			var array2 = new array.constructor( indices.length * itemSize );
 			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 );
 
 
 		}
 		}