Browse Source

BufferGeometry .MaxReferenceableIndex to .MaxIndex. See #6373

Mr.doob 10 years ago
parent
commit
f4782d999a
2 changed files with 4 additions and 4 deletions
  1. 3 3
      src/core/BufferGeometry.js
  2. 1 1
      src/renderers/WebGLRenderer.js

+ 3 - 3
src/core/BufferGeometry.js

@@ -773,14 +773,14 @@ THREE.BufferGeometry.prototype = {
 	*/
 	computeOffsets: function ( size ) {
 
-		if ( size === undefined ) size = THREE.BufferGeometry.MaxReferenceableIndex; 
+		if ( size === undefined ) size = THREE.BufferGeometry.MaxIndex;
 
 		var indices = this.attributes.index.array;
 		var vertices = this.attributes.position.array;
 
 		var facesCount = ( indices.length / 3 );
 
-		var UintArray = ( ( vertices.length / 3 ) > 65535 && THREE.BufferGeometry.MaxReferenceableIndex > 65535 ) ? Uint32Array : Uint16Array;
+		var UintArray = ( ( vertices.length / 3 ) > 65535 && THREE.BufferGeometry.MaxIndex > 65535 ) ? Uint32Array : Uint16Array;
 
 		/*
 		THREE.log("Computing buffers in offsets of "+size+" -> indices:"+indices.length+" vertices:"+vertices.length);
@@ -1072,4 +1072,4 @@ THREE.BufferGeometry.prototype = {
 
 THREE.EventDispatcher.prototype.apply( THREE.BufferGeometry.prototype );
 
-THREE.BufferGeometry.MaxReferenceableIndex = 65535;
+THREE.BufferGeometry.MaxIndex = 65535;

+ 1 - 1
src/renderers/WebGLRenderer.js

@@ -219,7 +219,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 	if ( extensions.get( 'OES_element_index_uint' ) ) {
 
-		THREE.BufferGeometry.MaxReferenceableIndex = 4294967296;
+		THREE.BufferGeometry.MaxIndex = 4294967296;
 
 	}