|
|
@@ -509,7 +509,20 @@ class RenderObject {
|
|
|
|
|
|
const index = this.getIndex();
|
|
|
const hasIndex = ( index !== null );
|
|
|
- const instanceCount = geometry.isInstancedBufferGeometry ? geometry.instanceCount : ( object.count > 1 ? object.count : 1 );
|
|
|
+
|
|
|
+ let instanceCount = 1;
|
|
|
+
|
|
|
+ if ( geometry.isInstancedBufferGeometry === true ) {
|
|
|
+
|
|
|
+ instanceCount = geometry.instanceCount;
|
|
|
+
|
|
|
+ } else if ( object.count !== undefined ) {
|
|
|
+
|
|
|
+ instanceCount = Math.max( 0, object.count );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ //const instanceCount = geometry.isInstancedBufferGeometry ? geometry.instanceCount : ( object.count !== undefined ? Math.max( 0, object.count ) : 1 );
|
|
|
|
|
|
if ( instanceCount === 0 ) return null;
|
|
|
|