|
|
@@ -233,7 +233,18 @@ export default class RenderObject {
|
|
|
|
|
|
}
|
|
|
|
|
|
- const itemCount = hasIndex === true ? index.count : geometry.attributes.position.count;
|
|
|
+ const position = geometry.attributes.position;
|
|
|
+ let itemCount = Infinity;
|
|
|
+
|
|
|
+ if ( hasIndex ) {
|
|
|
+
|
|
|
+ itemCount = index.count;
|
|
|
+
|
|
|
+ } else if ( position !== undefined && position !== null ) {
|
|
|
+
|
|
|
+ itemCount = position.count;
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
firstVertex = Math.max( firstVertex, 0 );
|
|
|
lastVertex = Math.min( lastVertex, itemCount );
|