|
@@ -667,24 +667,18 @@ THREE.BufferGeometry.prototype = {
|
|
},
|
|
},
|
|
|
|
|
|
/*
|
|
/*
|
|
- computeOffsets
|
|
|
|
- Compute the draw offset for large models by chunking the index buffer into chunks of 65k addressable vertices.
|
|
|
|
- This method will effectively rewrite the index buffer and remap all attributes to match the new indices.
|
|
|
|
- WARNING: This method will also expand the vertex count to prevent sprawled triangles across draw offsets.
|
|
|
|
- indexBufferSize - Defaults to 65535, but allows for larger or smaller chunks.
|
|
|
|
|
|
+ Compute the draw offset for large models by chunking the index buffer into chunks of 65k addressable vertices.
|
|
|
|
+ This method will effectively rewrite the index buffer and remap all attributes to match the new indices.
|
|
|
|
+ WARNING: This method will also expand the vertex count to prevent sprawled triangles across draw offsets.
|
|
|
|
+ size - Defaults to 65535, but allows for larger or smaller chunks.
|
|
*/
|
|
*/
|
|
- computeOffsets: function ( indexBufferSize ) {
|
|
|
|
|
|
+ computeOffsets: function ( size ) {
|
|
|
|
|
|
- var size = indexBufferSize;
|
|
|
|
- if ( indexBufferSize === undefined )
|
|
|
|
- size = 65535; //WebGL limits type of index buffer values to 16-bit.
|
|
|
|
-
|
|
|
|
- //var s = Date.now();
|
|
|
|
|
|
+ if ( size === undefined ) size = 65535; // WebGL limits type of index buffer values to 16-bit.
|
|
|
|
|
|
var indices = this.attributes.index.array;
|
|
var indices = this.attributes.index.array;
|
|
var vertices = this.attributes.position.array;
|
|
var vertices = this.attributes.position.array;
|
|
|
|
|
|
- //var verticesCount = ( vertices.length / 3 );
|
|
|
|
var facesCount = ( indices.length / 3 );
|
|
var facesCount = ( indices.length / 3 );
|
|
|
|
|
|
/*
|
|
/*
|