|
@@ -829,18 +829,11 @@ THREE.BufferGeometry.prototype = {
|
|
|
|
|
|
/* Create a copy of all attributes for reordering. */
|
|
/* Create a copy of all attributes for reordering. */
|
|
var sortedAttributes = {};
|
|
var sortedAttributes = {};
|
|
- var types = [ Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array ];
|
|
|
|
for ( var attr in this.attributes ) {
|
|
for ( var attr in this.attributes ) {
|
|
if ( attr == 'index' )
|
|
if ( attr == 'index' )
|
|
continue;
|
|
continue;
|
|
var sourceArray = this.attributes[ attr ].array;
|
|
var sourceArray = this.attributes[ attr ].array;
|
|
- for ( var i = 0, il = types.length; i < il; i ++ ) {
|
|
|
|
- var type = types[ i ];
|
|
|
|
- if ( sourceArray instanceof type ) {
|
|
|
|
- sortedAttributes[ attr ] = new type( this.attributes[ attr ].itemSize * vertexCount );
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ sortedAttributes[ attr ] = new sourceArray.constructor( this.attributes[ attr ].itemSize * vertexCount );
|
|
}
|
|
}
|
|
|
|
|
|
/* Move attribute positions based on the new index map */
|
|
/* Move attribute positions based on the new index map */
|