|
@@ -170,7 +170,7 @@ class Mesh extends Object3D {
|
|
const groupMaterial = material[ group.materialIndex ];
|
|
const groupMaterial = material[ group.materialIndex ];
|
|
|
|
|
|
const start = Math.max( group.start, drawRange.start );
|
|
const start = Math.max( group.start, drawRange.start );
|
|
- const end = Math.min( ( group.start + group.count ), ( drawRange.start + drawRange.count ) );
|
|
|
|
|
|
+ const end = Math.min( index.count, Math.min( ( group.start + group.count ), ( drawRange.start + drawRange.count ) ) );
|
|
|
|
|
|
for ( let j = start, jl = end; j < jl; j += 3 ) {
|
|
for ( let j = start, jl = end; j < jl; j += 3 ) {
|
|
|
|
|
|
@@ -228,7 +228,7 @@ class Mesh extends Object3D {
|
|
const groupMaterial = material[ group.materialIndex ];
|
|
const groupMaterial = material[ group.materialIndex ];
|
|
|
|
|
|
const start = Math.max( group.start, drawRange.start );
|
|
const start = Math.max( group.start, drawRange.start );
|
|
- const end = Math.min( ( group.start + group.count ), ( drawRange.start + drawRange.count ) );
|
|
|
|
|
|
+ const end = Math.min( position.count, Math.min( ( group.start + group.count ), ( drawRange.start + drawRange.count ) ) );
|
|
|
|
|
|
for ( let j = start, jl = end; j < jl; j += 3 ) {
|
|
for ( let j = start, jl = end; j < jl; j += 3 ) {
|
|
|
|
|