|
@@ -1,5 +1,5 @@
|
|
|
import { Uint16BufferAttribute, Uint32BufferAttribute } from '../../core/BufferAttribute.js';
|
|
|
-import { arrayMax } from '../../utils.js';
|
|
|
+import { arrayNeedsUint32 } from '../../utils.js';
|
|
|
|
|
|
function WebGLGeometries( gl, attributes, info, bindingStates ) {
|
|
|
|
|
@@ -133,7 +133,7 @@ function WebGLGeometries( gl, attributes, info, bindingStates ) {
|
|
|
|
|
|
}
|
|
|
|
|
|
- const attribute = new ( arrayMax( indices ) > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( indices, 1 );
|
|
|
+ const attribute = new ( arrayNeedsUint32( indices ) ? Uint32BufferAttribute : Uint16BufferAttribute )( indices, 1 );
|
|
|
attribute.version = version;
|
|
|
|
|
|
// Updating index buffer in VAO now. See WebGLBindingStates
|