|
@@ -239,7 +239,8 @@ class BatchedMesh extends Mesh {
|
|
|
|
|
|
if ( reference.getIndex() !== null ) {
|
|
|
|
|
|
- const indexArray = maxVertexCount > 65536
|
|
|
+ // Reserve last u16 index for primitive restart.
|
|
|
+ const indexArray = maxVertexCount > 65535
|
|
|
? new Uint32Array( maxIndexCount )
|
|
|
: new Uint16Array( maxIndexCount );
|
|
|
|