We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 702b698 commit 0c7cf78Copy full SHA for 0c7cf78
src/renderers/common/RenderObject.js
@@ -233,7 +233,18 @@ export default class RenderObject {
233
234
}
235
236
- const itemCount = hasIndex === true ? index.count : geometry.attributes.position.count;
+ const position = geometry.attributes.position;
237
+ let itemCount = Infinity;
238
+
239
+ if ( hasIndex ) {
240
241
+ itemCount = index.count;
242
243
+ } else if ( position !== undefined && position !== null ) {
244
245
+ itemCount = position.count;
246
247
+ }
248
249
firstVertex = Math.max( firstVertex, 0 );
250
lastVertex = Math.min( lastVertex, itemCount );
0 commit comments